From bf4012291a878c3f22fa318595e2ca7881c2978a Mon Sep 17 00:00:00 2001 From: rub Date: Wed, 27 Feb 2008 20:25:18 +0000 Subject: Resolved issue 0000807: New slideshow features git-svn-id: http://piwigo.org/svn/trunk@2218 68402e56-0260-453c-a942-63ccdbb3a9ee --- index.php | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 3a084147e..815b9376c 100644 --- a/index.php +++ b/index.php @@ -2,7 +2,7 @@ // +-----------------------------------------------------------------------+ // | PhpWebGallery - a PHP based picture gallery | // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | -// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | +// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net | // +-----------------------------------------------------------------------+ // | file : $Id$ // | last update : $Date$ @@ -67,7 +67,7 @@ if (isset($page['category'])) check_restrictions($page['category']['id']); } -if ( count($page['items']) > $user['nb_image_page']) +if (count($page['items']) > $user['nb_image_page']) { $page['navigation_bar'] = create_navigation_bar( duplicate_index_url(array(), array('start')), @@ -99,7 +99,7 @@ $page['body_id'] = 'theCategoryPage'; $template->set_filenames( array('index'=>'index.tpl') ); //-------------------------------------------------------------- category title $template_title = $page['title']; -if ( count($page['items']) > 0) +if (count($page['items']) > 0) { $template_title.= ' ['.count($page['items']).']'; } @@ -192,7 +192,7 @@ if (isset($page['category']) and is_admin()) ); } -if (is_admin() and !empty($page['items']) ) +if (is_admin() and !empty($page['items'])) { $template->assign_block_vars( 'caddie', @@ -262,6 +262,21 @@ if ( !empty($page['items']) ) } //------------------------------------------------------- category informations +// slideshow +// execute after init thumbs in order to have all picture informations +if (!empty($page['cat_slideshow_url'])) +{ + if (isset($_GET['slideshow'])) + { + redirect($page['cat_slideshow_url']); + } + else + { + $template->assign_block_vars( + 'slideshow', array('URL' => $page['cat_slideshow_url'])); + } +} + // navigation bar if ($page['navigation_bar'] != '') { -- cgit v1.2.3