Changeset 12908 for trunk/include
- Timestamp:
- Jan 17, 2012, 7:09:32 AM (12 years ago)
- Location:
- trunk/include
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/category_default.inc.php
r12887 r12908 3 3 // | Piwigo - a PHP based photo gallery | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2008-201 1Piwigo Team http://piwigo.org |5 // | Copyright(C) 2008-2012 Piwigo Team http://piwigo.org | 6 6 // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | 7 7 // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | … … 105 105 ); 106 106 107 if (isset($nb_comments_of) 107 if (isset($nb_comments_of)) 108 108 { 109 $row[' nb_comments'] = (int)@$nb_comments_of[$row['id']];109 $row['NB_COMMENTS'] = $row['nb_comments'] = (int)@$nb_comments_of[$row['id']]; 110 110 } 111 111 112 112 $name = get_picture_title($row); 113 113 114 $tpl_var = array( 115 'ID' => $row['id'], 114 $tpl_var = array_merge( $row, array( 116 115 'TN_SRC' => DerivativeImage::thumb_url($row), 117 116 'TN_ALT' => htmlspecialchars(strip_tags($name)), 118 117 'TN_TITLE' => get_thumbnail_title($row), 119 118 'URL' => $url, 119 'src_image' => new SrcImage($row), 120 ) ); 120 121 121 // Extra fields for usage in extra themes122 'FILE_PATH' => $row['path'],123 'FILE_POSTED' => $row['date_available'],124 'FILE_CREATED' => $row['date_creation'],125 'FILE_DESC' => $row['comment'],126 'FILE_AUTHOR' => $row['author'],127 'FILE_HIT' => $row['hit'],128 'FILE_SIZE' => $row['filesize'],129 'FILE_WIDTH' => $row['width'],130 'FILE_HEIGHT' => $row['height'],131 'FILE_METADATE' => $row['date_metadata_update'],132 'FILE_HAS_HD' => $row['has_high'],133 'FILE_HD_WIDTH' => $row['high_width'],134 'FILE_HD_HEIGHT' => $row['high_height'],135 'FILE_HD_FILESIZE' => $row['high_filesize'],136 'FILE_RATING_SCORE' => $row['rating_score'],137 );138 139 122 if ($conf['index_new_icon']) 140 123 { … … 146 129 $tpl_var['NB_HITS'] = $row['hit']; 147 130 } 148 131 149 132 switch ($page['section']) 150 133 { … … 163 146 } 164 147 } 165 148 166 149 $tpl_var['NAME'] = $name; 167 168 if (isset($row['nb_comments']))169 {170 $tpl_var['NB_COMMENTS'] = $row['nb_comments'];171 }172 173 150 $tpl_thumbnails_var[] = $tpl_var; 174 151 } 175 152 176 $template->assign('SHOW_THUMBNAIL_CAPTION', $conf['show_thumbnail_caption']); 153 $derivative_params = ImageStdParams::get_by_type( pwg_get_session_var('index_deriv', IMG_THUMB) ); 154 155 $template->assign( array( 156 'derivative_params' =>$derivative_params, 157 'SHOW_THUMBNAIL_CAPTION' =>$conf['show_thumbnail_caption'], 158 ) ); 177 159 $tpl_thumbnails_var = trigger_event('loc_end_index_thumbnails', $tpl_thumbnails_var, $pictures); 178 160 $template->assign('thumbnails', $tpl_thumbnails_var); 179 161 180 162 $template->assign_var_from_handle('THUMBNAILS', 'index_thumbnails'); 181 163 unset($pictures, $selection, $tpl_thumbnails_var); 164 $template->clear_assign( array('thumbnails') ); 182 165 pwg_debug('end include/category_default.inc.php'); 183 166 ?> -
trunk/include/config_default.inc.php
r12802 r12908 3 3 // | Piwigo - a PHP based photo gallery | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2008-201 1Piwigo Team http://piwigo.org |5 // | Copyright(C) 2008-2012 Piwigo Team http://piwigo.org | 6 6 // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | 7 7 // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | … … 467 467 // gives an empty value '' to deactivate 468 468 $conf['show_php_errors'] = E_ALL; 469 470 // enable log for i derivative script 471 $conf['enable_i_log'] = false; 469 472 470 473 // +-----------------------------------------------------------------------+ -
trunk/include/derivative.inc.php
r12865 r12908 101 101 public $src_image; 102 102 103 private $requested_type;104 105 103 private $flags = 0; 106 104 private $params; … … 112 110 if (is_string($type)) 113 111 { 114 $this->requested_type = $type;115 112 $this->params = ImageStdParams::get_by_type($type); 116 113 } 117 114 else 118 115 { 119 $this->requested_type = IMG_CUSTOM;120 116 $this->params = $type; 121 117 } … … 126 122 static function thumb_url($infos) 127 123 { 128 $src_image = new SrcImage($infos); 129 self::build($src_image, ImageStdParams::get_by_type(IMG_THUMB), $rel_path, $rel_url); 130 return get_root_url().$rel_url; 124 return self::url(IMG_THUMB, $infos); 131 125 } 132 126 133 127 static function url($type, $infos) 134 128 { 135 $src_image = new SrcImage($infos);129 $src_image = is_object($infos) ? $infos : new SrcImage($infos); 136 130 $params = is_string($type) ? ImageStdParams::get_by_type($type) : $type; 137 131 self::build($src_image, $params, $rel_path, $rel_url); … … 258 252 if ($size) 259 253 { 260 return 'width= "'.$size[0].'" height="'.$size[1].'"';254 return 'width='.$size[0].' height='.$size[1]; 261 255 } 262 256 } -
trunk/include/derivative_params.inc.php
r12881 r12908 316 316 } 317 317 318 function max_width() 319 { 320 return $this->sizing->ideal_size[0]; 321 } 322 323 function max_height() 324 { 325 return $this->sizing->ideal_size[1]; 326 } 327 318 328 function is_identity($in_size) 319 329 { -
trunk/include/template.class.php
r12874 r12908 3 3 // | Piwigo - a PHP based photo gallery | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2008-201 1Piwigo Team http://piwigo.org |5 // | Copyright(C) 2008-2012 Piwigo Team http://piwigo.org | 6 6 // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | 7 7 // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | … … 843 843 return call_user_func_array('sprintf', $args ); 844 844 } 845 846 function derivative_url($type, $img) 847 { 848 return DerivativeImage::url($type, $img); 849 } 845 850 } 846 851
Note: See TracChangeset
for help on using the changeset viewer.