Changeset 1020 for trunk/tools
- Timestamp:
- Feb 1, 2006, 3:46:26 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/create_listing_file.php
r954 r1020 281 281 282 282 /** 283 * returns an array with high quality/resolution picture files of a directory 284 * according to $conf['picture_ext'] 285 * 286 * @param string $dir 287 * @return array 288 */ 289 function get_high_files($dir) 290 { 291 global $conf; 292 293 $pictures = array(); 294 if ($opendir = @opendir($dir.'/pwg_high')) 295 { 296 while ($file = readdir($opendir)) 297 { 298 if (in_array(get_extension($file), $conf['picture_ext'])) 299 { 300 array_push($pictures, $file); 301 } 302 } 303 } 304 return $pictures; 305 } 306 307 /** 283 308 * search in $basedir the sub-directories and calls get_pictures 284 309 * … … 348 373 $fs_thumbnails = get_thumb_files($dir); 349 374 $fs_representatives = get_representative_files($dir); 375 $fs_highs = get_high_files($dir); 350 376 351 377 $elements = array(); … … 378 404 379 405 // 2 cases : the element is a picture or not. Indeed, for a picture 380 // thumbnail is mandatory and for non picture element, thumbnail and381 // representative is optionnal406 // thumbnail is mandatory, high is optional and for non picture element, 407 // thumbnail and representative is optionnal 382 408 if (in_array(get_extension($fs_file), $conf['picture_ext'])) 383 409 { … … 389 415 $element['width'] = $image_size[0]; 390 416 $element['height'] = $image_size[1]; 417 } 418 419 if ( in_array($fs_file, $fs_highs) ) 420 { 421 $element['has_high'] = 'true'; 391 422 } 392 423 … … 453 484 $attributes = array('file','tn_ext','representative_ext','filesize', 454 485 'width','height','date_creation','author','keywords', 455 'name','comment',' path');486 'name','comment','has_high', 'path'); 456 487 foreach ($elements as $element) 457 488 {
Note: See TracChangeset
for help on using the changeset viewer.