diff options
author | vdigital <vdigital@piwigo.org> | 2008-09-18 21:26:33 +0000 |
---|---|---|
committer | vdigital <vdigital@piwigo.org> | 2008-09-18 21:26:33 +0000 |
commit | bff424f8d9de0c258071e6e99f92f9960b13fbb7 (patch) | |
tree | 331b6c66e2158ba489e04ae7ca78677c439fe605 | |
parent | c502ebd43a1b8917b8c93a7a1ee896bf4c9a7be0 (diff) |
Extend_for_templates include slideshow.tpl overides.
menubar.tpl is no longer supported by Extend_for_templates.
Titling_categories.tpl was in error (Wrong recent icon var)
git-svn-id: http://piwigo.org/svn/trunk@2549 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r-- | admin/extend_for_templates.php | 4 | ||||
-rw-r--r-- | picture.php | 24 | ||||
-rw-r--r-- | template-extension/distributed/samples/titling_categories.tpl | 2 |
3 files changed, 19 insertions, 11 deletions
diff --git a/admin/extend_for_templates.php b/admin/extend_for_templates.php index 04fd0177f..938b83fed 100644 --- a/admin/extend_for_templates.php +++ b/admin/extend_for_templates.php @@ -112,14 +112,13 @@ $eligible_templates = array( 'mainpage_categories.tpl' => 'index_category_thumbnails', 'thumbnails.tpl' => 'index_thumbnails', 'redirect.tpl' => 'redirect', - 'menubar.tpl' => 'menubar', + // 'menubar.tpl' => 'menubar', // TODO by blocks 'header.tpl' => 'header', 'footer.tpl' => 'tail', 'index.tpl' => 'index', 'nbm.tpl' => 'nbm', 'notification.tpl' => 'notification', 'picture_content.tpl' => 'default_content', - 'slideshow.tpl' => 'picture', /* => slideshow is missing */ 'picture.tpl' => 'picture', 'popuphelp.tpl' => 'popuphelp', 'profile.tpl' => 'profile', @@ -127,6 +126,7 @@ $eligible_templates = array( 'register.tpl' => 'register', 'search.tpl' => 'search', 'search_rules.tpl' => 'search_rules', + 'slideshow.tpl' => 'slideshow', 'tags.tpl' => 'tags', 'upload.tpl' => 'upload',); $flip_templates = array_flip($eligible_templates); diff --git a/picture.php b/picture.php index 7448461bb..cb8491cd0 100644 --- a/picture.php +++ b/picture.php @@ -550,13 +550,14 @@ else { $page['slideshow'] = false; } - -$template->set_filenames( - array( - 'picture' => - (($page['slideshow'] and $conf['light_slideshow']) ? 'slideshow.tpl' : 'picture.tpl'), - )); - +if ($page['slideshow'] and $conf['light_slideshow']) +{ + $template->set_filenames( array('slideshow' => 'slideshow.tpl')); +} +else +{ + $template->set_filenames( array('picture' => 'picture.tpl')); +} $title = $picture['current']['name']; $title_nb = ($page['current_rank'] + 1).'/'.count($page['items']); @@ -948,7 +949,14 @@ if ($metadata_showable and pwg_get_session_var('show_metadata') <> null ) include(PHPWG_ROOT_PATH.'include/page_header.php'); trigger_action('loc_end_picture'); -$template->pparse('picture'); +if ($page['slideshow'] and $conf['light_slideshow']) +{ + $template->pparse('slideshow'); +} +else +{ + $template->pparse('picture'); +} //------------------------------------------------------------ log informations pwg_log($picture['current']['id'], 'picture'); include(PHPWG_ROOT_PATH.'include/page_tail.php'); diff --git a/template-extension/distributed/samples/titling_categories.tpl b/template-extension/distributed/samples/titling_categories.tpl index df608666b..83040e3bc 100644 --- a/template-extension/distributed/samples/titling_categories.tpl +++ b/template-extension/distributed/samples/titling_categories.tpl @@ -16,7 +16,7 @@ {foreach from=$category_thumbnails item=cat} <div class="unbordered"> {* W3C HTML non conform *} <h3> {* 2nd difference: h3 is outside of description *} - <a href="{$cat.URL}">{$cat.NAME}</a>{$cat.ICON} + <a href="{$cat.URL}">{$cat.NAME}</a>{$cat.ICON_TS} </h3> <li> <div class="thumbnailCategory"> |