Luxbum.net - Script de galerie photo

Changeset 274

Show
Ignore:
Timestamp:
03/01/08 15:15:48 (9 months ago)
Author:
nicolas
Message:

remise en etat de la consultation des galeries

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/luxbum-0.6/_fonctions/class/files.php

    r68 r274  
    77    */ 
    88   function addTailSlash ($dir) { 
     9      if ($dir == '') { 
     10         return $dir; 
     11      } 
    912      if ($dir[strlen ($dir) - 1] != '/') { 
    1013         $dir = $dir.'/'; 
  • branches/luxbum-0.6/_fonctions/class/luxbumgallery.class.php

    r68 r274  
    3131    * @param String $dir Dossier de la galerie 
    3232    */ 
    33    function luxBumGallery ($dir, $preview = '') { 
    34       $list= split('/', $dir); 
    35       print_r($list); 
    36       $this->name = $this->dir = $list[count($list)-1]; 
    37       $this->setPhotoDir($list[0]);echo "<strong>$this->dir</strong> : <em>$this->photoDir</em>"; 
     33   function luxBumGallery ($name, $preview = '') { 
     34      $this->name = $this->dir = $name;  
    3835      $this->preview = $preview; 
    3936      $this->size = 0; 
     
    5148   function _completeInfos () { 
    5249      if ($fd = dir ($this->getDirPath($this->dir))) { 
    53          while ($current_file = $fd->read ()) {echo "$current_file<br>"; 
     50         while ($current_file = $fd->read ()) { 
    5451            if (files::isPhotoFile($this->dir, $current_file)) { 
    5552               $the_file = $this->getImage ($this->dir, $current_file); 
     
    305302     
    306303         // Parcours des photos du dossiers 
    307          while ($current_file = readdir ($dir_fd)) {echo $current_file.' '; 
     304         while ($current_file = readdir ($dir_fd)) { 
    308305            if (files::isPhotoFile ($this->dir, $current_file)) { 
    309306               $list[$current_file] = new luxBumImage ($this->dir, $current_file); 
     
    376373      $i = 0; 
    377374           
    378       //echo "sortType:$sortType - $sortOrder - "; 
    379375      foreach ($images as $image) { 
    380376         switch ($sortType) { 
     
    404400         $i++; 
    405401      } 
    406       //print_r ($newImageArray); 
    407402           
    408403      // Now natcase sort the array based on the keys  
     
    431426   function saveSort () { 
    432427      $list = $this->_sortImageArray ($this->list, 'manuel', 'asc'); 
    433       //print_r($list); 
    434428      files::deleteFile ($this->getDirPath ($this->dir) . ORDER_FILE, 'a'); 
    435429      if ($fd = fopen ($this->getDirPath ($this->dir).ORDER_FILE, 'a')) { 
  • branches/luxbum-0.6/_fonctions/class/luxbumindex.class.php

    r68 r274  
    1818   function luxBumIndex ($photoDir = PHOTOS_DIR) { 
    1919      if ($photoDir != PHOTOS_DIR) { 
    20          $this->dir = $photoDir;//echo "!^^^^  $photoDir<br>"; 
     20         $this->dir = $photoDir; 
    2121      } 
    2222      $this->setPhotoDir($photoDir); 
     
    104104         $i = 0; 
    105105    
    106          while ($current_dir = readdir ($dir_fd)) {echo $this->getDirPath ($current_dir);echo "<br>"; 
     106         while ($current_dir = readdir ($dir_fd)) { 
    107107    
    108108            // Lecture de tous les dossiers 
    109             echo "**********".$this->getDirPath ($current_dir); 
    110109            if ($current_dir[0] != '.' && is_dir ($this->getDirPath ($current_dir)) 
    111110                && $current_dir != files::removeTailSlash(THUMB_DIR) 
     
    122121               closedir ($apercu_fd); 
    123122    
    124                if ($trouve == true || ($minImage == 0 && $trouve == false)) {echo "<br>ajout galerie : $current_dir<br>"; 
     123               if ($trouve == true || ($minImage == 0 && $trouve == false)) { 
    125124                  $this->addGallery ($current_dir); 
    126125               } 
     
    153152      $i = 0; 
    154153           
    155       //echo "sortType:$sortType - $sortOrder - "; 
    156154      foreach ($galleryList as $gallery) { 
    157155         switch ($sortType) { 
     
    181179         $i++; 
    182180      } 
    183       //print_r ($newImageArray); 
    184181           
    185182      // Now natcase sort the array based on the keys  
     
    208205   function saveSort () { 
    209206      $list = $this->_sortGalleryArray ($this->galleryList, 'manuel', 'asc'); 
    210       //print_r($list); 
    211207      files::deleteFile ($this->photoDir.ORDER_FILE, 'a'); 
    212208      if ($fd = fopen ($this->photoDir.ORDER_FILE, 'a')) { 
     
    238234            $position++; 
    239235         } 
    240          //print_r($this->sortList); 
    241236         fclose ($fd); 
    242237      } 
  • branches/luxbum-0.6/_fonctions/index.php

    r68 r274  
    1010} 
    1111else { 
    12    exit ('manque des paramètres.')
     12   $photoDir = ''
    1313} 
    1414 
  • branches/luxbum-0.6/_fonctions/luxbum.class.php

    r68 r274  
    5454    */ 
    5555   function niceName ($name) { 
    56       $pattern = array ('_'); 
    57       $repl = array (' '); 
     56      $pattern = array ('_', '/'); 
     57      $repl = array (' ', ' '); 
    5858      return str_replace ($pattern, $repl, $name); 
    5959   } 
  • branches/luxbum-0.6/index.php

    r68 r274  
    2525   $page->MxText('titre_page', $titre_page); 
    2626} 
    27 /* 
    28 class link {    
    29    function prefix () { 
    30       return (USE_REWRITE == 'on') ? '' : '?/'; 
    31    } 
    32     
    33    // Le lien pour les pages de vignettes 
    34    function vignette ($page, $dir) { 
    35       return link::prefix()."vignette-$page-$dir.html"; 
    36    } 
    37     
    38    // Le lien pour les pages de vignettes 
    39    function vignette_redirect ($page, $dir, $img) { 
    40       return link::prefix()."vignette-$page-$dir-$img.html"; 
    41    } 
    42     
    43    // Le lien pour les pages des aperçus 
    44    function apercu ($dir, $image, $page) { 
    45       $page--; 
    46       return link::prefix().'affichage-'.$page.'-'.$dir.'-'.$image.'.html'; 
    47    } 
    48     
    49    // Le lien pour les pages de slideshow 
    50    function slideshow ($page) { 
    51       return link::prefix()."slideshow-$page.html"; 
    52    } 
    53     
    54    // Lien pour voir la sélection 
    55    function selection ($page) { 
    56       return link::prefix()."selection_list-$page.html"; 
    57    } 
    58     
    59    // Lien pour sélectionner une photo 
    60    function apercu_select ($dir, $image, $page) { 
    61       $page--; 
    62       return link::prefix().'select-'.$page.'-'.$dir.'-'.$image.'.html'; 
    63    } 
    64     
    65    // Lien pour désélectionner une photo 
    66    function apercu_unselect ($dir, $image, $page) { 
    67       $page--; 
    68       return link::prefix().'unselect-'.$page.'-'.$dir.'-'.$image.'.html'; 
    69    } 
    70 }*/ 
    7127 
    7228$prefix_rewrite = (USE_REWRITE == 'on') ? '' : '?/';