diff options
author | vdigital <vdigital@piwigo.org> | 2007-01-17 23:08:41 +0000 |
---|---|---|
committer | vdigital <vdigital@piwigo.org> | 2007-01-17 23:08:41 +0000 |
commit | e81260cdec75e196feed698a05cad88236d3ed42 (patch) | |
tree | 4ed44f2f56e00420e8b6884e90cc768e45b397c8 /picture.php | |
parent | 8e43a0fec128ad379bcdf432ddb034db66097c7e (diff) |
Issue 0000622: Optional light slideshow
(Active by default - Switch off by $conf['light_slideshow'] = false)
Order by in admin/comments.php
git-svn-id: http://piwigo.org/svn/trunk@1730 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'picture.php')
-rw-r--r-- | picture.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/picture.php b/picture.php index 426585a6c..a177b9b47 100644 --- a/picture.php +++ b/picture.php @@ -456,6 +456,21 @@ if ($metadata_showable) $page['body_id'] = 'thePicturePage'; +//------------------------------------------------------------ light slideshow +// Warning !!! Warning !!! Warning !!! +// Notice for plugins writers check if you have to act on the active template +// like this if ( $page['slideshow'] ) { return false; } +// +if ( isset($_GET['slideshow']) and $conf['light_slideshow'] ) +{ + $page['display_tpl'] = 'slideshow.tpl'; + $page['slideshow'] = true; + unset($picture['current']['high_url']); +} +else { + $page['display_tpl'] = 'picture.tpl'; + $page['slideshow'] = false; +} // maybe someone wants a special display (call it before page_header so that they // can add stylesheets) $element_content = trigger_event('render_element_content', @@ -470,7 +485,9 @@ if ( isset($picture['next']['image_url']) ) ); } -$template->set_filenames(array('picture'=>'picture.tpl')); + +$template->set_filenames(array( 'picture' => $page['display_tpl'] )); + //------------------------------------------------------- navigation management foreach ( array('first','previous','next','last') as $which_image ) |