| 132 |
$output .= "<div style='float: right;'><img src='".$thumbnail."' alt='".$album_title."' class='$class'></div>"; |
$output .= "<div style='float: right;'><img src='".$thumbnail."' alt='".$album_title."' class='$class'></div>"; |
| 133 |
|
|
| 134 |
$output .= "<h2>".$album_title."</h2>"; |
$output .= "<h2>".$album_title."</h2>"; |
| 135 |
$output .= "<p>". format_plural($album['photos'], '1 photo', '%count photos') ." in this album (<a href='flickr/setimages/$album_id'>view locally</a> - <a href='$link_to_photoset_on_flickr'>view on Flickr</a>).</p>"; |
$output .= "<p>". format_plural($album['photos'], '1 photo', '%count photos') ." in this album (".l(t('view locally'), "flickr/setimages/$album_id")." - <a href='$link_to_photoset_on_flickr'>view on Flickr</a>).</p>"; |
| 136 |
$output .= "<p>$album_description</p><br clear='both' />"; |
$output .= "<p>$album_description</p><br clear='both' />"; |
| 137 |
|
|
| 138 |
return $output; |
return $output; |
| 177 |
// do nothing. XXX: Add stats code here. |
// do nothing. XXX: Add stats code here. |
| 178 |
} |
} |
| 179 |
else { |
else { |
| 180 |
$f = fopen($file,"r"); |
if (function_exists('curl_init')) { |
| 181 |
$f2 = fopen($cache_filename,"w+"); |
$ch = curl_init(); |
| 182 |
while ($r = fread($f,8192)) |
curl_setopt($ch, CURLOPT_URL, $file); |
| 183 |
{ |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
| 184 |
fwrite($f2,$r); |
$file_contents = curl_exec($ch); |
| 185 |
} |
curl_close($ch); |
| 186 |
fclose($f2); |
} |
| 187 |
fclose($f); |
else { |
| 188 |
|
$file_contents = file_get_contents($file); |
| 189 |
|
} |
| 190 |
|
|
| 191 |
|
$fh = fopen($cache_filename, 'w+'); |
| 192 |
|
fwrite($fh, $file_contents); |
| 193 |
|
fclose($fh); |
| 194 |
} |
} |
| 195 |
return file_get_contents ($cache_filename); // Return the file contents from the cache |
return file_get_contents ($cache_filename); // Return the file contents from the cache |
| 196 |
} |
} |