original_string: function buildPhotoURL ($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"
                  );
  
          $size = strtolower($size);
          if (!array_key_exists($size, $sizes)) {
              $size = "medium";
          }
  
          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";
          }
          return $url;
      }
code: function buildPhotoURL ($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"
                  );
  
          $size = strtolower($size);
          if (!array_key_exists($size, $sizes)) {
              $size = "medium";
          }
  
          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";
          }
          return $url;
      }
code_tokens: function buildPhotoURL ( $ 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" ) ; $ size = strtolower ( $ size ) ; if ( ! array_key_exists ( $ size , $ sizes ) ) { $ size = "medium" ; } 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" ; } return $ url ; }
docstring: These functions are front ends for the flickr calls
docstring_tokens: These functions are front ends for the flickr calls