Luxbum.net - Script de galerie photo

Changeset 227

Show
Ignore:
Timestamp:
06/08/07 19:34:41 (1 year ago)
Author:
nicolas
Message:

possibilite de demarrer le diaporama a l'image courante dans la
consultation de la galerie.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/api/process/commongallery.php

    r216 r227  
    195195    */ 
    196196   public function getLinkSlideshow() { 
    197       return link::slideshow($this->dir); 
     197      return link::slideshow($this->dir, $this->f()->getFile()); 
    198198   } 
    199199 
  • trunk/api/process/luxbumimage.php

    r201 r227  
    263263      return link::full($this->dir, $this->file); 
    264264   } 
     265    
     266   /** 
     267    * @return string the link url to consult the gallery as a slideshow 
     268    */ 
     269   public function getLinkSlideshow() { 
     270      return link::slideshow($this->dir, $this->file); 
     271   } 
    265272} 
    266273 
  • trunk/api/ui/link.php

    r216 r227  
    6767 
    6868   // Le lien pour les pages de slideshow 
    69    function slideshow($dir, $start='') { 
     69   function slideshow($dir, $file) { 
    7070      $dir = link::encode($dir); 
    71       if($start == '') { 
    72          return link::prefix().'slide-show/'.$dir; 
    73       } 
    74       else { 
    75          return link::prefix().'slide-show/'.$dir.$start; 
    76       } 
     71      $file = link::encode($file); 
     72      return link::prefix().'slide-show/'.$dir.$file; 
    7773   } 
    7874 
  • trunk/api/ui/public/SlideShow.php

    r222 r227  
    2727          $this->checkFile($dir, $defaultImage); 
    2828      $this->checkPrivate($dir); 
    29  
    30       $GLOBALS['LB']['dir'] = $dir; 
    31       $GLOBALS['LB']['title'] =  ' - '.NOM_GALERIE; 
    32  
     29       
    3330      $gallery = new luxBumGallery($dir, TYPE_IMAGE_FILE); 
    3431      $imgIndex = $gallery->getImageIndex($defaultImage); 
     
    3734 
    3835      $context = new Pluf_Template_Context(array('gallery'  => $gallery,  
     36                                                 'first'    => $imgIndex, 
    3937                                                 'cfg'      => $GLOBALS['_PX_config'])); 
    4038       
  • trunk/index.php

    r216 r227  
    9898 
    9999// Image gallery slideshow 
    100 $dispatcher->registerController('ui_public_SlideShow', 'action', '#^/slide\-show/(.*)$#i'); 
    101 $dispatcher->registerController('ui_public_SlideShow', 'action', '#^/slide\-show/(.*)/([0-9]+)$#i'); 
     100$dispatcher->registerController('ui_public_SlideShow', 'action', '#^/slide\-show/(.*)/(.*)$#i'); 
    102101 
    103102 
  • trunk/templates/common/javascript/slideshow.js

    r226 r227  
    1818// Startup script 
    1919window.onload = function () { 
     20   current_fg_index = first; 
     21   current_bg_index = first + 1;alert(current_fg_index+ ' ' + current_bg_index); 
    2022   idshowcontroltimeout = window.setTimeout(slide_hideControl, 4000); 
    2123 
  • trunk/templates/public/luxbum/gallery.html

    r215 r227  
    111111                  ({$cFile.commentCount})</a> 
    112112                {/if} 
     113 
     114                {if $cFile->isImage() && $cfg['show_slideshow']} 
     115                +  <a href="javascript:void(0);" onclick="window.open('{$cFile.linkSlideshow}', '{i18n 'Slideshow'}', 'width=670,height=530');">{i18n 'Slideshow'}</a> 
     116                {/if} 
    113117              </td> 
    114118 
  • trunk/templates/public/luxbum/slideshow.html

    r226 r227  
    2727      var smoothtrans = {$cfg['slideshow_fading']}; // Set this to false to prevent any fading effect 
    2828      var slide_speed = {$cfg['slideshow_time']}; 
     29      var first = {$first}; 
    2930     --> 
    3031  </script>