Changeset 1730


Ignore:
Timestamp:
Jan 18, 2007, 12:08:41 AM (17 years ago)
Author:
vdigital
Message:

Issue 0000622: Optional light slideshow
(Active by default - Switch off by $conflight_slideshow = false)

Order by in admin/comments.php

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/comments.php

    r1598 r1730  
    140140      ON i.id = c.image_id
    141141  WHERE validated = \'false\'
     142  ORDER BY c.date DESC 
    142143;';
    143144$result = pwg_query($query);
  • trunk/include/config_default.inc.php

    r1728 r1730  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | branch        : BSF (Best So Far)
     
    624624  );
    625625
     626// +-----------------------------------------------------------------------+
     627// | Light slideshow                                                       |
     628// +-----------------------------------------------------------------------+
     629// $conf['light_slideshow'] indicates to use slideshow.tpl in state of
     630// picture.tpl for slideshow
     631// Take care to have slideshow.tpl in all available templates
     632// Or set it false.
     633// Check if Picture's plugins are compliant with it
     634// Every plugin from 1.7 would be design to manage light_slideshow case.
     635$conf['light_slideshow'] = true; 
     636
    626637?>
  • trunk/picture.php

    r1727 r1730  
    457457$page['body_id'] = 'thePicturePage';
    458458
     459//------------------------------------------------------------ light slideshow
     460// Warning !!! Warning !!! Warning !!!
     461// Notice for plugins writers check if you have to act on the active template
     462// like this if ( $page['slideshow'] ) { return false; }
     463//
     464if ( isset($_GET['slideshow']) and $conf['light_slideshow'] )
     465{
     466  $page['display_tpl'] = 'slideshow.tpl';
     467  $page['slideshow'] = true;
     468  unset($picture['current']['high_url']);
     469}
     470else {
     471  $page['display_tpl'] = 'picture.tpl';
     472  $page['slideshow'] = false; 
     473}
    459474// maybe someone wants a special display (call it before page_header so that they
    460475// can add stylesheets)
     
    471486  );
    472487}
    473 $template->set_filenames(array('picture'=>'picture.tpl'));
     488
     489$template->set_filenames(array( 'picture' => $page['display_tpl'] ));
     490
    474491
    475492//------------------------------------------------------- navigation management
Note: See TracChangeset for help on using the changeset viewer.