summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/helpers/core_menu.php9
-rw-r--r--core/libraries/Theme_View.php20
-rw-r--r--modules/comment/helpers/comment_menu.php9
3 files changed, 31 insertions, 7 deletions
diff --git a/core/helpers/core_menu.php b/core/helpers/core_menu.php
index 8a17d030..f9f6dbb0 100644
--- a/core/helpers/core_menu.php
+++ b/core/helpers/core_menu.php
@@ -79,7 +79,7 @@ class core_menu_Core {
->url("#")
->css_id("gHybridLink"));
}
-
+
public static function photo($menu, $theme) {
$menu
->append(Menu::factory("link")
@@ -88,17 +88,12 @@ class core_menu_Core {
->url("#")
->css_id("gFullsizeLink"))
->append(Menu::factory("link")
- ->id("comments")
- ->label(_("View comments on this item"))
- ->url("#comments")
- ->css_id("gCommentsLink"))
- ->append(Menu::factory("link")
->id("album")
->label(_("View album hybrid mode"))
->url("#")
->css_id("gAlbumLink"));
}
-
+
public static function admin($menu, $theme) {
$menu
->append(Menu::factory("link")
diff --git a/core/libraries/Theme_View.php b/core/libraries/Theme_View.php
index 37629f3d..8031b9af 100644
--- a/core/libraries/Theme_View.php
+++ b/core/libraries/Theme_View.php
@@ -79,6 +79,16 @@ class Theme_View_Core extends View {
$menu = new Menu(true);
core_menu::album($menu, $this);
+ foreach (module::installed() as $module) {
+ if ($module->name == "core") {
+ continue;
+ }
+ $class = "{$module->name}_menu";
+ if (method_exists($class, "album")) {
+ call_user_func_array(array($class, "album"), array(&$menu, $this));
+ }
+ }
+
print $menu;
}
@@ -86,6 +96,16 @@ class Theme_View_Core extends View {
$menu = new Menu(true);
core_menu::photo($menu, $this);
+ foreach (module::installed() as $module) {
+ if ($module->name == "core") {
+ continue;
+ }
+ $class = "{$module->name}_menu";
+ if (method_exists($class, "photo")) {
+ call_user_func_array(array($class, "photo"), array(&$menu, $this));
+ }
+ }
+
print $menu;
}
diff --git a/modules/comment/helpers/comment_menu.php b/modules/comment/helpers/comment_menu.php
index 2cc6d789..6b17f57f 100644
--- a/modules/comment/helpers/comment_menu.php
+++ b/modules/comment/helpers/comment_menu.php
@@ -25,4 +25,13 @@ class comment_menu_Core {
->label(_("Comments"))
->url("#"));
}
+
+ public static function photo($menu, $theme) {
+ $menu
+ ->append(Menu::factory("link")
+ ->id("comments")
+ ->label(_("View comments on this item"))
+ ->url("#comments")
+ ->css_id("gCommentsLink"));
+ }
}