302 | | foreach($images as $image) { |
303 | | list($uwidth, $uheight) = get_udims($image['width'], $image['height']); |
304 | | $xpadding = (128 - $uwidth) / 2; |
305 | | $ypadding = (96 - $uheight) / 2; |
306 | | $height_width = 'height="'.$uheight.'" width="'.$uwidth.'"'; |
307 | | $images_style .= "#target$i img { padding: {$ypadding}px {$xpadding}px; }\n"; |
308 | | $images_html .= " |
309 | | <div id='target$i' class='imagewrap left'> |
310 | | <div id='popup$i' class='popup'> |
311 | | "; |
312 | | |
313 | | $images_script .= "flickr_src[$i] = new Array();\n"; |
314 | | foreach($image['size_info'] as $szkey => $size) { |
315 | | $images_script .= "flickr_src[$i]['{$szkey}']= '{$size['url']}';\n"; |
316 | | $use = sprintf($__use_size, $szkey); |
317 | | $prefix = ($szkey == 'Thumbnail') ? '<strong>':''; |
318 | | $postfix = ($szkey == 'Thumbnail') ? '</strong>':''; |
319 | | $images_html .= "<a id=\"I{$i}_{$szkey}\" onclick=\"toggleSize($i,'$szkey');return false;\" href=\"javascript:void();\">{$prefix}{$use}{$postfix}</a>\n"; |
320 | | } |
321 | | $images_html .= " |
322 | | <a onclick=\"popup.style.display='none';return false;\" href=\"javascript:void()\">$__close</a> |
323 | | </div> |
324 | | <a id=\"link$i\" class=\"imagelink\" href=\"{$image['href']}\" onclick=\"imagePopup($i);return false;\" title=\"{$image['post_title']}\"> |
325 | | <img id=\"image$i\" src=\"{$image['thumbnail']}\" alt=\"{$image['post_title']}\" $height_width /> |
326 | | </a> |
327 | | </div> |
328 | | "; |
329 | | $i++; |
| 314 | if (isset($images) && count($images)) { |
| 315 | foreach($images as $image) { |
| 316 | list($uwidth, $uheight) = get_udims($image['width'], $image['height']); |
| 317 | $xpadding = (128 - $uwidth) / 2; |
| 318 | $ypadding = (96 - $uheight) / 2; |
| 319 | $height_width = 'height="'.$uheight.'" width="'.$uwidth.'"'; |
| 320 | $images_style .= "#target$i img { padding: {$ypadding}px {$xpadding}px; }\n"; |
| 321 | $images_html .= " |
| 322 | <div id='target$i' class='imagewrap left'> |
| 323 | <div id='popup$i' class='popup'> |
| 324 | "; |
| 325 | |
| 326 | $images_script .= "flickr_src[$i] = new Array();\n"; |
| 327 | foreach($image['size_info'] as $szkey => $size) { |
| 328 | $images_script .= "flickr_src[$i]['{$szkey}']= '{$size['url']}';\n"; |
| 329 | $use = sprintf($__use_size, $szkey); |
| 330 | $prefix = ($szkey == 'Thumbnail') ? '<strong>':''; |
| 331 | $postfix = ($szkey == 'Thumbnail') ? '</strong>':''; |
| 332 | $images_html .= "<a id=\"I{$i}_{$szkey}\" onclick=\"toggleSize($i,'$szkey');return false;\" href=\"javascript:void();\">{$prefix}{$use}{$postfix}</a>\n"; |
| 333 | } |
| 334 | $images_html .= " |
| 335 | <a onclick=\"popup.style.display='none';return false;\" href=\"javascript:void()\">$__close</a> |
| 336 | </div> |
| 337 | <a id=\"link$i\" class=\"imagelink\" href=\"{$image['href']}\" onclick=\"imagePopup($i);return false;\" title=\"{$image['post_title']}\"> |
| 338 | <img id=\"image$i\" src=\"{$image['thumbnail']}\" alt=\"{$image['post_title']}\" $height_width /> |
| 339 | </a> |
| 340 | </div> |
| 341 | "; |
| 342 | $i++; |
| 343 | } |