if(strcmp($search['stat'], 'ok') != 0) return; //if no results were returned, exit...
- //render the list of photos
- $text = '';
- foreach ($photos as $photo) {
- $text .= '<a href="http://www.flickr.com/photos/' . $photo['owner'] . '/' . $photo['id'] . '/">';
- $text .= '<img title="'.s($photo['title']).'" alt="'.s($photo['title']).'" class="flickr-photos" src="' . $this->build_photo_url($photo, 'square') . '" /></a>' ;
- }
-
+ //Accessibility: render the list of photos
+ $text = '<ul class="inline-list">';
+ foreach ($photos as $photo) {
+ $text .= '<li><a href="http://www.flickr.com/photos/' . $photo['owner'] . '/' . $photo['id'] . '/" title="'.s($photo['title']).'">';
+ $text .= '<img alt="'.s($photo['title']).'" class="flickr-photos" src="'. $this->build_photo_url($photo, 'square') ."\" /></a></li>\n";
+ }
+ $text .= "</ul>\n";
$this->content = new stdClass;
$this->content->text = $text;
function render_video_list($xmlobj){
$text = '';
- $text .= '<table class="yt-video-entry">';
+ $text .= '<ul class="yt-video-entry unlist img-text">';
$videos = $xmlobj['ut_response']['video_list']['video'];
foreach($videos as $video){
- $text .= '<tr>';
- $text .= '<td>';
+ $text .= '<li>';
$text .= '<a href="'. s($video['url']) . '">';
- $text .= '<img alt="'.s($video['title']).'" class="youtube-thumb" title="'.s($video['title']).'" style="padding:3px;" src="' . $video['thumbnail_url'] . '"/>' ;
- $text .= "</a>";
- $text .= "</td>";
- $text .= '<td>';
- $text .= '<a href="'. s($video['url']) . '">'.s($video['title']). '</a>';
+ $text .= '<img alt="" class="youtube-thumb" style="padding:3px;" src="'. $video['thumbnail_url'] .'" /> <span>';
+ $text .= s($video['title']). '</span></a>';
$text .= '<br/>';
$text .= format_time($video['length_seconds']);
- $text .= '</td>';
- $text .= '</tr>';
+ $text .= "</li>\n";
}
- $text .= '</table>';
+ $text .= "</ul>\n";
return $text;
}