From 34a286ae90ec5b5bdb7702f6bdf560f5f92f4f38 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 27 Nov 2008 11:33:45 +0000 Subject: Add navigation_top() and navigation_bottom() insertion points Move "My Gallery" navigation tab into the user module and only show it if you're logged in --- core/libraries/Theme.php | 24 +++++++++++++----------- modules/user/helpers/user_block.php | 5 +++++ themes/default/views/header.html.php | 3 ++- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/core/libraries/Theme.php b/core/libraries/Theme.php index 484673eb..99a44f9f 100644 --- a/core/libraries/Theme.php +++ b/core/libraries/Theme.php @@ -57,24 +57,26 @@ class Theme_Core { */ public function __call($function, $args) { switch ($function) { + case "album_blocks": + case "album_bottom": + case "album_top": case "head": - case "page_top": - case "page_bottom": - case "header_top": case "header_bottom": - case "sidebar_top": + case "header_top": + case "navigation_top": + case "navigation_bottom": + case "page_bottom": + case "page_top": + case "photo_blocks": + case "photo_top": case "sidebar_blocks": case "sidebar_bottom": - case "album_top": - case "album_blocks": - case "album_bottom": - case "tag_top": + case "sidebar_top": case "tag_bottom": - case "thumbnail_top": + case "tag_top": case "thumbnail_bottom": case "thumbnail_info": - case "photo_top": - case "photo_blocks": + case "thumbnail_top": case "photo_bottom": // @todo: restrict access to this option $debug = Session::instance()->get("debug", false); diff --git a/modules/user/helpers/user_block.php b/modules/user/helpers/user_block.php index 5146cc9f..be72a3fe 100644 --- a/modules/user/helpers/user_block.php +++ b/modules/user/helpers/user_block.php @@ -33,4 +33,9 @@ class user_block_Core { return $view->render(); } + public static function navigation_bottom($theme) { + if (Session::instance()->get('user', null)) { + return "
  • " . _("MY GALLERY") . "
  • "; + } + } } diff --git a/themes/default/views/header.html.php b/themes/default/views/header.html.php index c34486be..29c7a8e0 100644 --- a/themes/default/views/header.html.php +++ b/themes/default/views/header.html.php @@ -4,10 +4,11 @@
    -- cgit v1.2.3