Re: Edit template of the module mytube 1.05!! Help | Titre du sujet : Re: Edit template of the module mytube 1.05!! Help par mokman sur 21/12/2009 02:07:17
Voici la suite: Citation :// ******************************************************* // Function for determining source for creating screenshot // ******************************************************* function xtube_videothumb( $vidid, $title, $source, $picurl, $screenshot, $width = '', $height = '' ) { global $xoopsModuleConfig; if ( $width == '' || $height == '' ) { $width = $xoopsModuleConfig['shotwidth']; $height = $xoopsModuleConfig['shotheight']; } $thumb = ''; switch( $source ) { // YouTube case 0: $thumb = '<img src="http://img.youtube.com/vi/' . $vidid . '/default.jpg" title="' . $title . '" alt="' . $title . '" width="' . $width . '" height="' . $height . '" style="padding: 0px; border-style: none;" />'; break; // MetaCafe case 1: list($metaclip) = split('[/]', $vidid); $videothumb['metathumb'] = $metaclip; $thumb = '<img src="http://www.metacafe.com/thumb/' . $videothumb['metathumb'] . '.jpg" title="' . $title . '" alt="' . $title . '" width="' . $width . '" height="' . $height . '" style="padding: 0px; border-style: none;" />'; break; // iFilm/Spike case 2: $thumb = '<img src="http://img3.ifilmpro.com/resize/image ... /films/resize/istd/' . $vidid . '.jpg?width=' . $width . '" title="' . $title . '" alt="' . $title . '" style="padding: 0px; border-style: none;" />'; break; // Photobucket case 3: $thumb = '<img src="http://i153.photobucket.com/albums/' . $vidid . '.jpg" width="' . $width . '" height="' . $height . '" title="' . $title . '" alt="' . $title . '" style="padding: 0px; border-style: none;" />'; break; // Photobucket case 4: $thumb = '<img src="http://cdn-thumbs.viddler.com/thumbnail_2_' . $vidid . '.jpg" width="' . $width . '" height="' . $height . '" title="' . $title . '" alt="' . $title . '" style="padding: 0px; border-style: none;" />'; break; // Google Video, MySpace TV, DailyMotion, BrightCove, Blip.tv, ClipFish, LiveLeak, Maktoob, Veoh case 100: case 101: case 102: case 103: case 104: case 105: case 106: case 107: case 108: case 109: case 200: $thumb = '<img src="' . $picurl . '" width="' . $width . '" height="' . $height . '" title="' . $title . '" alt="' . $title . '" style="padding: 0px; border-style: none;" />'; break; // Determine if video source is MyTube for thumbnail case 200: $thumb = '<img src="' . XOOPS_URL . '/' . $screenshot . '" width="' . $width . '" height="' . $height . '" title="' . $title . '" alt="' . $title . '" style="padding: 0px; border-style: none;" />'; break; } return $thumb; }
|
|