aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin/comments.php3
-rw-r--r--include/config_default.inc.php13
-rw-r--r--picture.php19
-rw-r--r--template/yoga/slideshow.tpl12
4 files changed, 44 insertions, 3 deletions
diff --git a/admin/comments.php b/admin/comments.php
index 1371f72f2..1ca8fc617 100644
--- a/admin/comments.php
+++ b/admin/comments.php
@@ -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))
@@ -179,4 +180,4 @@ $template->assign_vars(
$template->assign_var_from_handle('ADMIN_CONTENT', 'comments');
-?> \ No newline at end of file
+?>
diff --git a/include/config_default.inc.php b/include/config_default.inc.php
index 2b9dd1d24..52190833f 100644
--- a/include/config_default.inc.php
+++ b/include/config_default.inc.php
@@ -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;
+
?>
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 )
diff --git a/template/yoga/slideshow.tpl b/template/yoga/slideshow.tpl
new file mode 100644
index 000000000..ea5bc60b3
--- /dev/null
+++ b/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>