1
mokman
Edit template of the module mytube 1.05!! Help
  • 2009/12/19 17:48

  • mokman

  • Just popping in

  • Posts: 3

  • Since: 2009/12/19


Hi every body
I have some problems with the module mytube 1.05, i want to edit the teamplate of videos to introduce a new videos format like zshare,2shared,stagevu ....
And in mytube there is only:
YouTube,MetaCafe,Photobucket,Google Video,MySpace TV,DailyMotion,Blip.tv,ClipFish,LiveLeak,Maktoob,Veoh,Vimeo,Megavideo
Viddler
Then if somebody has solution thank you to answer me.

Sorry for my english

2
ghia
Re: Edit template of the module mytube 1.05!! Help
  • 2009/12/19 21:12

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


I think you have to add code for that in /include/video.php

3
mokman
Re: Edit template of the module mytube 1.05!! Help
  • 2009/12/20 17:55

  • mokman

  • Just popping in

  • Posts: 3

  • Since: 2009/12/19


Here's what I changed in video.php tell me is there something missing i added STAGEVU:
Quote:
/**
* MyTube - a multicategory video management module
*
* Based upon WF-Links
*
* File: include/video.php
*
* @copyright https://xoops.org/ The XOOPS Project
* @copyright XOOPS_copyrights.txt
* @copyright http://www.?????.org/ The ????? Project
* @license GNU General Public License (GPL)
* a copy of the GNU license is enclosed.
* ----------------------------------------------------------------------------------------------------------
* @package MyTube
* @since 1.00
* @author McDonald
* @version $Id$
*/

function xtube_returnsource( $returnsource ) {
switch( $returnsource ) {
case 0:
$returnsource = _AM_XTUBE_YOUTUBE;
break;
case 1:
$returnsource = _AM_XTUBE_METACAFE;
break;
case 2:
$returnsource = _AM_XTUBE_IFILM;
break;
case 3:
$returnsource = _AM_XTUBE_PHOTOBUCKET;
break;
case 4:
$returnsource = _AM_XTUBE_VIDDLER;
break;
case 100:
$returnsource = _AM_XTUBE_GOOGLEVIDEO;
break;
case 101:
$returnsource = _AM_XTUBE_MYSPAVETV;
break;
case 102:
$returnsource = _AM_XTUBE_DAILYMOTION;
break;
case 103:
$returnsource = _AM_XTUBE_BLIPTV;
break;
case 104:
$returnsource = _AM_XTUBE_CLIPFISH;
break;
case 105:
$returnsource = _AM_XTUBE_LIVELEAK;
break;
case 106:
$returnsource = _AM_XTUBE_MAKTOOB;
break;
case 107:
$returnsource = _AM_XTUBE_VEOH;
break;
case 108:
$returnsource = _AM_XTUBE_VIMEO;
break;
case 109:
$returnsource = _AM_XTUBE_MEGAVIDEO;
break;
case 200:
$returnsource = _AM_XTUBE_STAGEVU;
break;
case 201:
$returnsource = _AM_XTUBE_MYTUBE;
break;
}
return $returnsource;
}

// *******************************************************
// 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 = '' . $title . '';
break;

// MetaCafe
case 1:
list($metaclip) = split('[/]', $vidid);
$videothumb['metathumb'] = $metaclip;
$thumb = '' . $title . '';
break;

// iFilm/Spike
case 2:
$thumb = '' . $title . '';
break;

// Photobucket
case 3:
$thumb = '' . $title . '';
break;

// Photobucket
case 4:
$thumb = '' . $title . '';
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 = '' . $title . '';
break;

// Determine if video source is MyTube for thumbnail
case 200:
$thumb = '' . $title . '';
break;
}
return $thumb;
}

// **********************************
// Function for determining publisher
// **********************************
function xtube_videopublisher( $vidid, $publisher, $source = 0 ) {

switch( $source ) {
// Determine if video source YouTube for publisher
case 0:
$publisher = '' . $publisher . '';
break;

// Determine if video source MetaCafe for publisher
case 1:
$publisher = '' . $publisher . '';
break;

// Determine if video source iFilm/Spike for publisher
case 2:
$publisher = '' . $publisher . '';
break;

// Determine if video source Photobucket for publisher
case 3:
$string = 'th_';
list($photobucket) = split($string, $vidid);
$ppublisher['ppublisher'] = $photobucket;
$publisher = '' . $publisher . '';
break;

// Determine if video source is Viddler for publisher
case 4:
$publisher = '' . $publisher . '';
break;

// Determine if video source is Google Video for publisher
case 100:
case 101:
case 103:
case 106:
case 108:
case 109:
case 200:
$publisher = $publisher;
break;

// Determine if video source is DailyMotion for publisher
case 102:
$publisher = '' . $publisher . '';
break;

// Determine if video source is ClipFish for publisher
case 104:
$publisher = '' . $publisher . '';
break;

// Determine if video source is LiveLeak for publisher
case 105:
$publisher = '' . $publisher . '';
break;

// Determine if video source is Veoh for publisher
case 107:
$publisher = '' . $publisher . '';
break;

// Determine if video source is MyTube for publisher
case 200:
$publisher = $publisher;
break;
}
return $publisher;
}

// ************************************************
//Function for displaying videoclip (embedded code)
// ************************************************
function xtube_showvideo( $vidid, $source, $screenshot, $picurl ) {
global $xoopsModule, $xoopsModuleConfig;
$showvideo = '';
$autoplay = $xoopsModuleConfig['autoplay'];
if ( $xoopsModuleConfig['autoplay'] ) {
$autoplay2 = 'yes';
$autoplay3 = 'true';
$photobucket = '&ap=1';
$google = 'FlashVars="autoPlay=true"';
$viddler = 'flashvars="autoplay=t"';
} else {
$autoplay2 = 'no';
$autoplay3 = 'false';
$photobucket = '';
$google = '';
$viddler = '';
}

// $hquality = '';
// if ($hq == 1) {
// $hquality = '&ap=%2526fmt%3D18&';
// }

switch( $source ) {
// YouTube
case 0:
// $showvideo = '';
$showvideo = '';
break;

// MetaCafe
case 1:
$showvideo = '';
break;

// iFilm/Spike
case 2:
$showvideo = ' ';
break;

// Photobucket
case 3:
$vidid = str_replace( 'th_', '', $vidid);
$showvideo = '';
break;

// Viddler
case 4:
$showvideo = '';
break;

// Google Video
case 100:
$showvideo = ' ';
break;

// MySpace TV
case 101:
$showvideo = '';
break;

// DailyMotion
case 102:
$showvideo = '';
break;

// Blip.tv
case 103:
$showvideo = '';
break;

// ClipFish
case 104:
$showvideo = ''; // Change c=0067B3 for different player color
break;

// LiveLeak
case 105:
$showvideo = '';
break;

// Maktoob
case 106:
$showvideo = '';
break;

// Veoh
case 107:
$showvideo = '';
break;

// Vimeo
case 108:
$showvideo = '';
break;

// Megavideo
case 109:
$showvideo = '';
break;
// Stagevu
case 200:
$showvideo = '';
break;


// MyTube
case 201:
$showvideo = '';
break;


}

return $showvideo;
}
?>

Login

Who's Online

364 user(s) are online (234 user(s) are browsing Support Forums)


Members: 0


Guests: 364


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits