08/08/2012, 23:10:11
Le 1er gabarit à modifier est dans fancybox, gabarit de galerie, sample :
Attention, j'ai un peu modifié le début et mis en commentaires, il faudra que tu adaptes par rapport au tien
Il y avait des manque d'apostrophe : value=`$item->... au lieu de value="`$item...
Attention, j'ai un peu modifié le début et mis en commentaires, il faudra que tu adaptes par rapport au tien
Code :
[== Indéfini ==]
{* In fancybox mode, default template used for listing videos of an album *}
{* HostedVideoAlbums action=breadcrumbs *}
<h2>{$leveltitle}{* $parentobj->name *}</h2>
{* <p>{$parentobj->description}</p> *}
{if $itemcount > 0}
<div class="gallery">
{assign var="img" value="<img class='video_thumb' width='$thumbnail_width' height='$thumbnail_height' src="}
{foreach from=$itemlist item="item"}
{if $item->description != ""}
{assign var="title" value="`$item->name`: `$item->description`"}
{else}
{assign var="title" value="`$item->name`"}
{/if}
{assign var="swf" value="class='swf' href="}
<a title="{$title|escape:'html'}"
{if $item->site_namevalue=="youtube"}
{$swf}"http://www.youtube.com/v/{$item->videoid}?fs=1&autoplay=1">
{$img}"http://img.youtube.com/vi/{$item->videoid}/default.jpg">
{elseif $item->site_namevalue=="dailymotion"}
{$swf}"http://www.dailymotion.com/swf/video/{$item->videoid}&autoStart=1">
{$img}"http://www.dailymotion.com/thumbnail/160x120/video/{$item->videoid}">
{elseif $item->site_namevalue=="google videos"}
{$swf}"http://video.google.com/googleplayer.swf?hl={$item->lang}&fs={$item->fullscreen}&docid={$item->videoid}&autoPlay=true">
{$img}{php}
$doc = new DOMDocument();
$item= $this->get_template_vars('item');
$doc->load('http://video.google.com/videofeed?docid='.$item->videoid);
$node = $doc->getElementsByTagName('item')->item(0);
$vid = $node->getElementsByTagNameNS("http://search.yahoo.com/mrss/", 'thumbnail')->item(0);
$url = $vid->attributes->getNamedItem('url')->textContent; echo "'$url'";
{/php}>
{elseif $item->site_namevalue=="vimeo"}
{$swf}"http://vimeo.com/moogaloop.swf?clip_id={$item->videoid}&server=vimeo.com&show_title=true&show_byline=1&color={$item->color1}&fullscreen={$item->fullscreen_int}&autoplay=1">
{$img}{vimeothumb id=$item->videoid}>
{elseif $item->site_namevalue=="yahoo videos"}
{$swf}"http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.46&id={$item->videoid|regex_replace:"#[0-9]+/#":""}&lang={$item->lang}&embed=1&autoPlay=1">
{* YAHOO DOES NOT SUPPORT OEMBED ANYMORE
{$img}{php}
$item= $this->get_template_vars('item');
$id=$item->videoid;
$doc = new DOMDocument();
$doc->load("http://video.yahoo.com/services/oembed?url=http://video.yahoo.com/watch/".$id."&format=xml");
$url = $doc->getElementsByTagName('thumbnail_url')->item(0)->textContent;
echo "'$url'";
{/php}> *}
{$img}"{$item->thumbnail}">
{elseif $item->site_namevalue=="veoh"}
{$swf}"http://www.veoh.com/static/swf/webplayer/WebPlayer.swf?version=AFrontend.5.4.9.1006&permalinkId={$item->videoid}&hl={$item->lang}&player=videodetailsembedded&videoAutoPlay=1&id=anonymous">
{$img}{php}
$doc = new DOMDocument();
$item= $this->get_template_vars('item');
$doc->load('http://www.veoh.com/rest/video/'.$item->videoid.'/details');
$vid = $doc->getElementsByTagName('video')->item(0);
$url = $vid->attributes->getNamedItem('fullMedResImagePath')->textContent;
echo "'$url'";
{/php}>
{elseif $item->site_namevalue=="msn video"}
{$swf}"http://images.video.msn.com/flash/soapbox1_1.swf?c=v&v={$item->videoid}&ifs={$item->fullscreen}&fr=shared&mkt={$item->lang}&ap=true">
{$img}"{$item->thumbnail}">
{elseif $item->site_namevalue=="metacafe"}
{$swf}"http://www.metacafe.com/fplayer/{$item->videoid}/movie.swf?playerVars=autoPlay=yes">
{$img}"http://www.metacafe.com/thumb/{$item->videoid}.jpg">
{elseif $item->site_namevalue=="myspace"}
{$swf}"http://mediaservices.myspace.com/services/media/embed.aspx/m={$item->videoid},t=1,mt=video,ap=1,searchID=,primarycolor={$item->color1},secondarycolor={$item->color2}">
{$img}{php}
$doc = new DOMDocument();
$item= $this->get_template_vars('item');
$doc->load('http://mediaservices.myspace.com/services/rss.ashx?videoID='.$item->videoid);
$xpath = new DOMXPath($doc);
$xpath->registerNamespace("media", "http://search.yahoo.com/mrss/");
$url= $xpath->query('//media:thumbnail/@url')->item(0)->textContent;
echo "'$url'";
{/php}>
{elseif $item->site_namevalue=="local.flv"}
{$swf}"modules/HostedVideoAlbums/JarisFLVPlayer.swf?source={$item->videoid}&type=video&streamtype=file&autostart=true&brightcolor={$item->color1}&darkcolor={$item->color2}">
{$img}"{$item->thumbnail}">
{else}class="swf" href="{$item->fancyurl}">
{$img}"{$item->thumbnail}">
{/if}
</a>
{/foreach}
</div>
{if $page_pagenumbers}
<div id="pagemenu" style="text-align: center;">
{$page_previous} {$page_showing}/{$page_totalitems} {$page_next}<br/>
{$page_pagenumbers}
</div>
{/if}
{else}
<p>{$error_msg}</p>
{/if}