Changeset 1020 for trunk/picture.php
- Timestamp:
- Feb 1, 2006, 3:46:26 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/picture.php
r1014 r1020 248 248 // if we are working on the "current" element, we search if there is a 249 249 // high quality picture 250 // FIXME : with remote pictures, this "remote fopen" takes long...251 250 if ($i == 'current') 252 251 { 253 if (@fopen($cat_directory.'/pwg_high/'.$row['file'], 'r')) 252 $url_high=$cat_directory.'/pwg_high/'.$row['file']; 253 if (url_is_remote($cat_directory)) 254 254 { 255 $picture[$i]['high'] = $cat_directory.'/pwg_high/'.$row['file']; 255 if ($row['has_high']) 256 { 257 $picture[$i]['high'] = $url_high; 258 } 259 } 260 else 261 { 262 if (@fopen($url_high, 'r')) 263 { 264 $picture[$i]['high'] = $url_high; 265 } 256 266 } 257 267 } … … 527 537 528 538 $page['body_id'] = 'thePicturePage'; 539 //-------------------------------------------------------- navigation management 540 if ($has_prev) 541 { 542 $template->assign_block_vars( 543 'previous', 544 array( 545 'TITLE_IMG' => $picture['prev']['name'], 546 'IMG' => $picture['prev']['thumbnail'], 547 'U_IMG' => $picture['prev']['url'], 548 'U_IMG_SRC' => $picture['prev']['src'] 549 )); 550 } 551 552 if ($has_next) 553 { 554 $template->assign_block_vars( 555 'next', 556 array( 557 'TITLE_IMG' => $picture['next']['name'], 558 'IMG' => $picture['next']['thumbnail'], 559 'U_IMG' => $picture['next']['url'], 560 'U_IMG_SRC' => $picture['next']['src'] // allow navigator to preload 561 )); 562 } 563 529 564 include(PHPWG_ROOT_PATH.'include/page_header.php'); 530 565 $template->set_filenames(array('picture'=>'picture.tpl')); … … 586 621 if (isset($picture['current']['high'])) 587 622 { 588 $full_size = @getimagesize($picture['current']['high']);589 $full_width = $full_size[0];590 $full_height = $full_size[1];591 623 $uuid = uniqid(rand()); 592 624 $template->assign_block_vars('high', array( 593 625 'U_HIGH' => $picture['current']['high'], 594 'UUID'=>$uuid, 595 'WIDTH_IMG'=>($full_width + 40), 596 'HEIGHT_IMG'=>($full_height + 40) 626 'UUID'=>$uuid 597 627 )); 598 628 $template->assign_block_vars( … … 672 702 { 673 703 $template->assign_block_vars('admin', array()); 674 }675 676 //-------------------------------------------------------- navigation management677 if ($has_prev)678 {679 $template->assign_block_vars(680 'previous',681 array(682 'TITLE_IMG' => $picture['prev']['name'],683 'IMG' => $picture['prev']['thumbnail'],684 'U_IMG' => $picture['prev']['url'],685 'U_IMG_SRC' => $picture['prev']['src']686 ));687 }688 689 if ($has_next)690 {691 $template->assign_block_vars(692 'next',693 array(694 'TITLE_IMG' => $picture['next']['name'],695 'IMG' => $picture['next']['thumbnail'],696 'U_IMG' => $picture['next']['url'],697 'U_IMG_SRC' => $picture['next']['src'] // allow navigator to preload698 ));699 704 } 700 705
Note: See TracChangeset
for help on using the changeset viewer.