Skip to content

Commit

Permalink
Issue 0000622: Optional light slideshow
Browse files Browse the repository at this point in the history
(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
  • Loading branch information
vdigital committed Jan 17, 2007
1 parent 8e43a0f commit e81260c
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 3 deletions.
3 changes: 2 additions & 1 deletion admin/comments.php
Expand Up @@ -139,6 +139,7 @@
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))
Expand Down Expand Up @@ -179,4 +180,4 @@

$template->assign_var_from_handle('ADMIN_CONTENT', 'comments');

?>
?>
13 changes: 12 additions & 1 deletion include/config_default.inc.php
Expand Up @@ -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$
Expand Down Expand Up @@ -623,4 +623,15 @@
'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 changes: 18 additions & 1 deletion picture.php
Expand Up @@ -456,6 +456,21 @@ function default_picture_content($content, $element_info)

$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',
Expand All @@ -470,7 +485,9 @@ function default_picture_content($content, $element_info)
)
);
}
$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 )
Expand Down
12 changes: 12 additions & 0 deletions template/yoga/slideshow.tpl
@@ -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>

0 comments on commit e81260c

Please sign in to comment.