From e62950cacc833232618ae76250a27cf24ac72339 Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 13 Aug 2007 06:17:54 +0000 Subject: [PATCH] Fixed some XHTML issues --- blocks/tag_flickr/block_tag_flickr.php | 27 +++++++++++++------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/blocks/tag_flickr/block_tag_flickr.php b/blocks/tag_flickr/block_tag_flickr.php index 86d710af2a..e306b12c1e 100644 --- a/blocks/tag_flickr/block_tag_flickr.php +++ b/blocks/tag_flickr/block_tag_flickr.php @@ -100,8 +100,8 @@ class block_tag_flickr extends block_base { //render the list of photos $text = ''; foreach ($photos as $photo) { - $text .= ""; - $text .= '' ; + $text .= ''; + $text .= ''.$photo['title'].'' ; } @@ -142,29 +142,28 @@ class block_tag_flickr extends block_base { return $response; } - function build_photo_url ($photo, $size = "Medium") - { + function build_photo_url ($photo, $size='medium') { //receives an array (can use the individual photo data returned //from an API call) and returns a URL (doesn't mean that the //file size exists) $sizes = array( - "square" => "_s", - "thumbnail" => "_t", - "small" => "_m", - "medium" => "", - "large" => "_b", - "original" => "_o" + 'square' => '_s', + 'thumbnail' => '_t', + 'small' => '_m', + 'medium' => '', + 'large' => '_b', + 'original' => '_o' ); $size = strtolower($size); if (!array_key_exists($size, $sizes)) { - $size = "medium"; + $size = 'medium'; } - if ($size == "original") { - $url = "http://farm" . $photo['farm'] . ".static.flickr.com/" . $photo['server'] . "/" . $photo['id'] . "_" . $photo['originalsecret'] . "_o" . "." . $photo['originalformat']; + if ($size == 'original') { + $url = 'http://farm' . $photo['farm'] . '.static.flickr.com/' . $photo['server'] . '/' . $photo['id'] . '_' . $photo['originalsecret'] . '_o' . '.' . $photo['originalformat']; } else { - $url = "http://farm" . $photo['farm'] . ".static.flickr.com/" . $photo['server'] . "/" . $photo['id'] . "_" . $photo['secret'] . $sizes[$size] . ".jpg"; + $url = 'http://farm' . $photo['farm'] . '.static.flickr.com/' . $photo['server'] . '/' . $photo['id'] . '_' . $photo['secret'] . $sizes[$size] . '.jpg'; } return $url; } -- 2.39.5