Changeset 274
- Timestamp:
- 03/01/08 15:15:48 (9 months ago)
- Files:
-
- branches/luxbum-0.6/_fonctions/class/files.php (modified) (1 diff)
- branches/luxbum-0.6/_fonctions/class/luxbumgallery.class.php (modified) (6 diffs)
- branches/luxbum-0.6/_fonctions/class/luxbumindex.class.php (modified) (7 diffs)
- branches/luxbum-0.6/_fonctions/index.php (modified) (1 diff)
- branches/luxbum-0.6/_fonctions/luxbum.class.php (modified) (1 diff)
- branches/luxbum-0.6/image.php (added)
- branches/luxbum-0.6/index.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/luxbum-0.6/_fonctions/class/files.php
r68 r274 7 7 */ 8 8 function addTailSlash ($dir) { 9 if ($dir == '') { 10 return $dir; 11 } 9 12 if ($dir[strlen ($dir) - 1] != '/') { 10 13 $dir = $dir.'/'; branches/luxbum-0.6/_fonctions/class/luxbumgallery.class.php
r68 r274 31 31 * @param String $dir Dossier de la galerie 32 32 */ 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; 38 35 $this->preview = $preview; 39 36 $this->size = 0; … … 51 48 function _completeInfos () { 52 49 if ($fd = dir ($this->getDirPath($this->dir))) { 53 while ($current_file = $fd->read ()) { echo "$current_file<br>";50 while ($current_file = $fd->read ()) { 54 51 if (files::isPhotoFile($this->dir, $current_file)) { 55 52 $the_file = $this->getImage ($this->dir, $current_file); … … 305 302 306 303 // Parcours des photos du dossiers 307 while ($current_file = readdir ($dir_fd)) { echo $current_file.' ';304 while ($current_file = readdir ($dir_fd)) { 308 305 if (files::isPhotoFile ($this->dir, $current_file)) { 309 306 $list[$current_file] = new luxBumImage ($this->dir, $current_file); … … 376 373 $i = 0; 377 374 378 //echo "sortType:$sortType - $sortOrder - ";379 375 foreach ($images as $image) { 380 376 switch ($sortType) { … … 404 400 $i++; 405 401 } 406 //print_r ($newImageArray);407 402 408 403 // Now natcase sort the array based on the keys … … 431 426 function saveSort () { 432 427 $list = $this->_sortImageArray ($this->list, 'manuel', 'asc'); 433 //print_r($list);434 428 files::deleteFile ($this->getDirPath ($this->dir) . ORDER_FILE, 'a'); 435 429 if ($fd = fopen ($this->getDirPath ($this->dir).ORDER_FILE, 'a')) { branches/luxbum-0.6/_fonctions/class/luxbumindex.class.php
r68 r274 18 18 function luxBumIndex ($photoDir = PHOTOS_DIR) { 19 19 if ($photoDir != PHOTOS_DIR) { 20 $this->dir = $photoDir; //echo "!^^^^ $photoDir<br>";20 $this->dir = $photoDir; 21 21 } 22 22 $this->setPhotoDir($photoDir); … … 104 104 $i = 0; 105 105 106 while ($current_dir = readdir ($dir_fd)) { echo $this->getDirPath ($current_dir);echo "<br>";106 while ($current_dir = readdir ($dir_fd)) { 107 107 108 108 // Lecture de tous les dossiers 109 echo "**********".$this->getDirPath ($current_dir);110 109 if ($current_dir[0] != '.' && is_dir ($this->getDirPath ($current_dir)) 111 110 && $current_dir != files::removeTailSlash(THUMB_DIR) … … 122 121 closedir ($apercu_fd); 123 122 124 if ($trouve == true || ($minImage == 0 && $trouve == false)) { echo "<br>ajout galerie : $current_dir<br>";123 if ($trouve == true || ($minImage == 0 && $trouve == false)) { 125 124 $this->addGallery ($current_dir); 126 125 } … … 153 152 $i = 0; 154 153 155 //echo "sortType:$sortType - $sortOrder - ";156 154 foreach ($galleryList as $gallery) { 157 155 switch ($sortType) { … … 181 179 $i++; 182 180 } 183 //print_r ($newImageArray);184 181 185 182 // Now natcase sort the array based on the keys … … 208 205 function saveSort () { 209 206 $list = $this->_sortGalleryArray ($this->galleryList, 'manuel', 'asc'); 210 //print_r($list);211 207 files::deleteFile ($this->photoDir.ORDER_FILE, 'a'); 212 208 if ($fd = fopen ($this->photoDir.ORDER_FILE, 'a')) { … … 238 234 $position++; 239 235 } 240 //print_r($this->sortList);241 236 fclose ($fd); 242 237 } branches/luxbum-0.6/_fonctions/index.php
r68 r274 10 10 } 11 11 else { 12 exit ('manque des paramètres.');12 $photoDir = ''; 13 13 } 14 14 branches/luxbum-0.6/_fonctions/luxbum.class.php
r68 r274 54 54 */ 55 55 function niceName ($name) { 56 $pattern = array ('_' );57 $repl = array (' ' );56 $pattern = array ('_', '/'); 57 $repl = array (' ', ' '); 58 58 return str_replace ($pattern, $repl, $name); 59 59 } branches/luxbum-0.6/index.php
r68 r274 25 25 $page->MxText('titre_page', $titre_page); 26 26 } 27 /*28 class link {29 function prefix () {30 return (USE_REWRITE == 'on') ? '' : '?/';31 }32 33 // Le lien pour les pages de vignettes34 function vignette ($page, $dir) {35 return link::prefix()."vignette-$page-$dir.html";36 }37 38 // Le lien pour les pages de vignettes39 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çus44 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 slideshow50 function slideshow ($page) {51 return link::prefix()."slideshow-$page.html";52 }53 54 // Lien pour voir la sélection55 function selection ($page) {56 return link::prefix()."selection_list-$page.html";57 }58 59 // Lien pour sélectionner une photo60 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 photo66 function apercu_unselect ($dir, $image, $page) {67 $page--;68 return link::prefix().'unselect-'.$page.'-'.$dir.'-'.$image.'.html';69 }70 }*/71 27 72 28 $prefix_rewrite = (USE_REWRITE == 'on') ? '' : '?/';
