claro disculpa
Código PHP:
Ver original<ul id="grid-content">
<?php
$feedURL = "http://gdata.youtube.com/feeds/api/playlists/$playlistid?v=2&start-index=1&max-results=10";
// read feed into SimpleXML object
// get summary counts from opensearch: namespace
$counts = $sxml->children('http://a9.com/-/spec/opensearch/1.1/');
$total = $counts->totalResults;
// $sxml->children('http://a9.com/-/spec/opensearch/1.1/');
// $total = $sxml->totalResults;
$startIndex = $counts->startIndex;
$endOffset = ($startIndex-1) + $counts->itemsPerPage;
?>
<h1> <?echo $sxml->title;?> </h1>
<?php
// iterate over entries in feed
foreach ($sxml->entry as $entry) :
// get nodes in media: namespace for media information
$media = $entry->children('http://search.yahoo.com/mrss/');
// get video player URL
$attrs = $media->group->player->attributes();
$watch = $attrs['url'];
// get video thumbnail
$attrs = $media->group->thumbnail[0]->attributes();
$thumbnail = $attrs['url'];
// get <yt:duration> node for video length
$yt = $media->children('http://gdata.youtube.com/schemas/2007');
$attrs = $yt->duration->attributes();
$length = $attrs['seconds'];
// get <yt:stats> node for viewer statistics
$yt = $entry->children('http://gdata.youtube.com/schemas/2007');
$attrs = $yt->statistics->attributes();
$viewCount = $attrs['viewCount'];
// get <gd:rating> node for video ratings
$gd = $entry->children('http://schemas.google.com/g/2005');
if ($gd->rating) {
$attrs = $gd->rating->attributes();
$rating = $attrs['average'];
} else {
$rating = 0;
}
// obtener <yt:videoId> node
$yt = $media->children('http://gdata.youtube.com/schemas/2007');
$videoid = $yt->videoid;
// get <yt:duration> node for video length
$yt = $entry->children('http://gdata.youtube.com/schemas/2007');
$position = $yt->position;
?>
<li>
<div class="view view-first">
<? echo Html
::link("index/ver/$videoid/$playlistid", "<img src=$thumbnail />") ;?>
<div class="mask">
<h2 style="padding: 5px;">
<?php echo Html
::link("index/ver/$videoid/$playlistid", substr($media->group->title,0,20)) ?></h2>
<br> position :<? echo $position ?><br>
<?php echo Html
::link("index/ver/$videoid/$playlistid","Play","class='button .btn-danger'"); ?> </div>
</div>
</li>
<?php endforeach; ?>
</ul>