Commit 42131376 authored by nfreear's avatar nfreear
Browse files

Fixes MDL-11430, Flickr & Youtube tag blocks should use list markup.

parent 53420696
......@@ -94,13 +94,13 @@ class block_tag_flickr extends block_base {
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;
......
......@@ -150,24 +150,19 @@ class block_tag_youtube extends block_base {
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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment