From 625d0785572af319b22a523550145b4dacbd6100 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 4 Jan 2009 07:40:37 +0000 Subject: Extend Theme_View to look in modules for photo and album menus. Move "view comments" link to the comment menu helper. --- core/libraries/Theme_View.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'core/libraries/Theme_View.php') 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; } -- cgit v1.2.3