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
This commit is contained in:
parent
8e43a0fec1
commit
e81260cdec
4 changed files with 44 additions and 3 deletions
|
|
@ -139,6 +139,7 @@ SELECT c.id, c.image_id, c.date, c.author, c.content, i.path, i.tn_ext
|
|||
INNER JOIN '.IMAGES_TABLE.' AS i
|
||||
ON i.id = c.image_id
|
||||
WHERE validated = \'false\'
|
||||
ORDER BY c.date DESC
|
||||
;';
|
||||
$result = pwg_query($query);
|
||||
while ($row = mysql_fetch_assoc($result))
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// +-----------------------------------------------------------------------+
|
||||
// | PhpWebGallery - a PHP based picture gallery |
|
||||
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
|
||||
// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
|
||||
// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | branch : BSF (Best So Far)
|
||||
// | file : $RCSfile$
|
||||
|
|
@ -623,4 +623,15 @@ $conf['filter_pages'] = array
|
|||
'upgrade_feed' => array('cancel' => true),
|
||||
);
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Light slideshow |
|
||||
// +-----------------------------------------------------------------------+
|
||||
// $conf['light_slideshow'] indicates to use slideshow.tpl in state of
|
||||
// picture.tpl for slideshow
|
||||
// Take care to have slideshow.tpl in all available templates
|
||||
// Or set it false.
|
||||
// Check if Picture's plugins are compliant with it
|
||||
// Every plugin from 1.7 would be design to manage light_slideshow case.
|
||||
$conf['light_slideshow'] = true;
|
||||
|
||||
?>
|
||||
|
|
|
|||
19
picture.php
19
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 )
|
||||
|
|
|
|||
12
template/yoga/slideshow.tpl
Normal file
12
template/yoga/slideshow.tpl
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<!-- $Id: slideshow.tpl 1672 2006-12-17 11:02:09Z vdigital $ -->
|
||||
<div id="imageHeaderBar">
|
||||
<div class="browsePath">
|
||||
<!-- BEGIN stop_slideshow -->
|
||||
[ <a href="{stop_slideshow.U_SLIDESHOW}">{lang:slideshow_stop}</a> ]
|
||||
<!-- END stop_slideshow -->
|
||||
</div>
|
||||
<div class="imageNumber">{PHOTO}</div>
|
||||
</div>
|
||||
<div id="theImage">
|
||||
{ELEMENT_CONTENT}
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue