Changeset 1992 for trunk/admin/history.php
- Timestamp:
- May 1, 2007, 3:57:52 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/history.php
r1991 r1992 29 29 */ 30 30 31 // echo '<pre>$_POST:32 // '; print_r($_POST); echo '</pre>';33 // echo '<pre>$_GET:34 // '; print_r($_GET); echo '</pre>';35 36 31 // +-----------------------------------------------------------------------+ 37 32 // | functions | … … 60 55 61 56 $types = array('none', 'picture', 'high', 'other'); 57 $display_thumbnails = array('no_display_thumbnail', 'display_thumbnail_classic', 'display_thumbnail_hoverbox'); 62 58 63 59 // +-----------------------------------------------------------------------+ … … 114 110 ); 115 111 } 112 113 $search['fields']['display_thumbnail'] = $_POST['display_thumbnail']; 114 // Display choise are also save to one cookie 115 pwg_set_cookie_var('history_display_thumbnail', $_POST['display_thumbnail']); 116 116 117 117 // TODO manage inconsistency of having $_POST['image_id'] and … … 561 561 ) 562 562 ); 563 564 // <a class="thumbnail" href="#thumb">(1258)<span><img src="./galleries/category/thumbnail/th-dsc1258.png"></span></a> 563 565 564 $element = array( 566 565 'id' => $line['image_id'], … … 569 568 'tn_ext' => $tn_ext_of_image[$line['image_id']], 570 569 ); 571 $image_string = ''; 572 if (!isset($conf['history_no_thumb']) or $conf['history_no_thumb']) { 573 $thumb_mode = "over"; 574 if (isset($conf['history_no_hover']) and $conf['history_no_hover']) { 575 $thumb_mode = "thumbnail"; 576 } 577 $image_string = '<a class="'.$thumb_mode.'" href="#thumb">' 578 .'('.$line['image_id'].') <span><img src="' 579 . get_thumbnail_url( $element ) 580 .'"></span></a><a href="'.$picture_url.'">'; 581 } 582 else { 583 $image_string= '<a href="'.$picture_url.'">'; 584 $image_string.= '('.$line['image_id'].')'; 585 } 586 570 571 $image_title = '('.$line['image_id'].')'; 572 587 573 if (isset($label_of_image[$line['image_id']])) 588 574 { 589 $image_ string.= ' '.$label_of_image[$line['image_id']];575 $image_title.= ' '.$label_of_image[$line['image_id']]; 590 576 } 591 577 else 592 578 { 593 $image_string.= ' unknown filename'; 579 $image_title.= ' unknown filename'; 580 } 581 582 $image_string = ''; 583 584 switch ($page['search']['fields']['display_thumbnail']) 585 { 586 case 'no_display_thumbnail': 587 { 588 $image_string= '<a href="'.$picture_url.'">'.$image_title.'</a>'; 589 break; 590 } 591 case 'display_thumbnail_classic': 592 { 593 $image_string = 594 '<a class="thumbnail" href="'.$picture_url.'">' 595 .'<span><img src="'.get_thumbnail_url($element) 596 .'" alt="'.$image_title.'" title="'.$image_title.'">' 597 .'</span></a>'; 598 break; 599 } 600 case 'display_thumbnail_hoverbox': 601 { 602 $image_string = 603 '<a class="over" href="'.$picture_url.'">' 604 .'<span><img src="'.get_thumbnail_url($element) 605 .'" alt="'.$image_title.'" title="'.$image_title.'">' 606 .'</span>'.$image_title.'</a>'; 607 break; 608 } 594 609 } 595 610 } … … 727 742 $form['image_id'] = @$page['search']['fields']['image_id']; 728 743 $form['filename'] = @$page['search']['fields']['filename']; 744 745 $form['display_thumbnail'] = @$page['search']['fields']['display_thumbnail']; 729 746 } 730 747 else … … 736 753 $form['start_day'] = $form['end_day'] = date('j'); 737 754 $form['types'] = $types; 755 // Hoverbox by default 756 $form['display_thumbnail'] = 757 pwg_get_cookie_var('history_display_thumbnail', $display_thumbnails[2]); 738 758 } 739 759 … … 810 830 ); 811 831 } 812 832 833 foreach ($display_thumbnails as $display_thumbnail) 834 { 835 $selected = ''; 836 837 if ($display_thumbnail === $form['display_thumbnail']) 838 { 839 $selected = 'selected="selected"'; 840 } 841 842 $template->assign_block_vars( 843 'display_thumbnail', 844 array( 845 'VALUE' => $display_thumbnail, 846 'CONTENT' => l10n($display_thumbnail), 847 'SELECTED' => $selected, 848 ) 849 ); 850 } 851 813 852 // +-----------------------------------------------------------------------+ 814 853 // | html code display |
Note: See TracChangeset
for help on using the changeset viewer.