' . "\n"); ?> <?php echo($feedTitle); ?> http://blogs.law.harvard.edu/tech/rss 0) && (strtolower($feedAuthor) == 'yes')) { $imgFeedLoc = $feedMediaLoc . "ws.php?format=json&method=pwg.images.getInfo&image_id=" . $imgId; $imgFeedResp = trim(strip_tags(file_get_contents($imgFeedLoc))); $imgArrResp = json_decode($imgFeedResp, true); if ($imgArrResp['stat'] == "ok") { $imgAuthor = (isset($imgArrResp['result']['author']) ? $imgArrResp['result']['author'] : " "); } } else if ((isset($feedAuthor)) && (!ctype_space($feedAuthor))) { $imgAuthor = $feedAuthor; } else { $imgAuthor = " "; } $imgName = sanitizeRSS($img['name']); if ($imgName == ' ') { $imgName = sanitizeRSS($img['file']); } $imgDescr = sanitizeRSS($img['comment']); $imgPageUrl = sanitizeRSS($img['page_url']); $imgCreated = sanitizeRSS($img['date_creation']); $imgOrigUrl = sanitizeRSS($img['element_url']); if ($imgCreated == ' ') { $imgCreated = sanitizeRSS($img['date_available']); } if ($imgCreated != ' ') { $imgCreated = gmdate(DATE_RSS, strtotime($imgCreated)); } $imgOrigHeight = sanitizeRSS($img['height']); $imgOrigWidth = sanitizeRSS($img['width']); $itemText = "\n"; $itemText .= "\t" . $imgName . "\n"; $itemText .= "\t" . $imgPageUrl . "\n"; $itemText .= "\t" . $imgCreated . "\n"; $imgThumbUrl = " "; $imgThumbHeight = 0; $imgThumbWidth = 0; foreach($img['derivatives'] as $imgType => $imgTypeArr) { if ($imgType <> "square") { $imgUrl = sanitizeRSS($imgTypeArr['url']); $imgHeight = sanitizeRSS($imgTypeArr['height']); $imgWidth = sanitizeRSS($imgTypeArr['width']); if ($imgType == $feedThumbSize) { $imgThumbUrl = $imgUrl; $imgThumbHeight = $imgHeight; $imgThumbWidth = $imgWidth; } $itemText .= "\t\t\n"; } } $itemText .= "\t"; if ((!ctype_space($imgDescr)) && ($imgDescr <> ' ')) { $itemText .= $imgDescr . sanitizeRSS("
\n"); } if (isset($imgThumbUrl) && !ctype_space($imgThumbUrl) && ($imgThumbHeight > 0) && ($imgThumbWidth > 0)) { $itemText .= sanitizeRSS('
thumbnail
'); } $itemText .= "
\n"; // The derivations are all set as thumbnails, also include the original as the default content: $itemText .= "\t\t\n"; $itemText .= "\t\t" . $imgName . "\n"; if (!ctype_space($imgAuthor)) { $itemText .= "\t\t" . $imgAuthor . "\n"; } if ((!ctype_space($imgDescr)) && ($imgDescr <> ' ')) { $itemText .= "\t" . $imgDescr . "\n"; } $itemText .= "\t" . $imgPageUrl . "\n"; $itemText .= "
\n"; echo($itemText); } } ?>