Changeset 29976 for extensions/Fotorama/main.inc.php
- Timestamp:
- Oct 10, 2014, 10:24:01 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Fotorama/main.inc.php
r29974 r29976 151 151 $type = $big_type; 152 152 } 153 154 if ($conf['Fotorama']['nav'] == 'thumbs' or $conf['Fotorama']['fullscreen_nav'] == 'thumbs') 155 { 156 $has_thumbs = true; 157 } 158 else 159 { 160 $has_thumbs = false; 161 } 153 162 163 if ($has_thumbs) 164 { 165 if ($conf['Fotorama']['square_thumb']) 166 { 167 $thumb_params = ImageStdParams::get_custom($conf['Fotorama']['thumbheight'], $conf['Fotorama']['thumbheight'], 1, $conf['Fotorama']['thumbheight'], $conf['Fotorama']['thumbheight']); 168 } 169 else 170 { 171 $thumb_params = ImageStdParams::get_custom(9999, $conf['Fotorama']['thumbheight']); 172 } 173 } 174 154 175 $picture = array(); 155 176 while ($row = pwg_db_fetch_assoc($result)) 156 177 { 157 178 $row['src_image'] = new SrcImage($row); 158 // $row['derivatives'] = DerivativeImage::get_all($row['src_image']);159 179 $row['derivative'] = DerivativeImage::get_one($type, $row['src_image']); 160 180 if ($row['derivative'] == null) … … 168 188 } 169 189 170 if ($conf['Fotorama']['square_thumb']) 171 { 172 $thumb_params = ImageStdParams::get_custom($conf['Fotorama']['thumbheight'], $conf['Fotorama']['thumbheight'], 1, $conf['Fotorama']['thumbheight'], $conf['Fotorama']['thumbheight']); 173 } 174 else 175 { 176 $thumb_params = ImageStdParams::get_custom(9999, $conf['Fotorama']['thumbheight']); 177 } 178 $row['derivative_thumb'] = new DerivativeImage($thumb_params, $row['src_image']);; 179 if ($row['derivative_thumb'] == null) 180 { 181 $row['derivative_thumb'] = $row['src_image']; 190 if ($has_thumbs) 191 { 192 $row['derivative_thumb'] = new DerivativeImage($thumb_params, $row['src_image']);; 193 if ($row['derivative_thumb'] == null) 194 { 195 $row['derivative_thumb'] = $row['src_image']; 196 } 182 197 } 183 198 … … 200 215 $template->assign('current_rank', $page['current_rank']); 201 216 $template->assign(array('Fotorama' => $conf['Fotorama'])); 217 $template->assign('Fotorama_has_thumbs', $has_thumbs); 202 218 if (is_file('./themes/'.$user['theme'].'/template/fotorama.tpl')) 203 219 {
Note: See TracChangeset
for help on using the changeset viewer.