PS:I'm not a programmer,maybe some problem on it
--------------------------------------------------------------------------- ------------------------------------------------------
(1)classes\functions.php
search:
function isVideo($url) {
Add ① above it
①
function isTudouVideo($videoUrl) {
if (beginsWith($videoUrl, "http://www.tudou.com/programs/view/") ||
beginsWith($videoUrl, "http://tudou.com/programs/view/"))
return true;
else
return false;
}
function getTudouVideoUrl($videoUrl) {
$params = explode("view/", $videoUrl);
$params2 = explode("&",$params[1]);
return $params2[0];
}
function isFlashFile($videoUrl) {
if (endsWith($videoUrl, ".swf")) {
return true;
} else {
return false;
}
}
function getFlashFileUrl($videoUrl) {
return $videoUrl;
}
--------------------------------------------------------------------------- ------------------------------------------------------
search:
elseif (isVimeoVideo($url)) { return true; }
Add ② after it
②
elseif (isTudouVideo($url)) { return true; }
elseif (isFlashFile($url)) { return true; }
--------------------------------------------------------------------------- ------------------------------------------------------
(2)classes\gelato.class.php
search:
value=\"http://www.vimeo.com/moogaloop.swf?clip_id=".$id_video."\" /
></object>\n";
Add ③ after it
③
} elseif (isTudouVideo($url)) {
$id_video = getTudouVideoUrl($url);
return "\t\t\t<object type=\"application/x-shockwave-flash\" style=
\"width:500px;height:393px\" data=\"http://www.tudou.com/v/".
$id_video."\"><param name=\"movie\" value=\"http://www.tudou.com/v/".
$id_video."\" /></object>\n";
} elseif (isFlashFile($url)) {
$id_video = getFlashFileUrl($url);
return "\t\t\t<object type=\"application/x-shockwave-flash\" style=
\"width:500px;height:393px\" data=\"" . $id_video . "\"><param name=
\"movie\" value=\"" . $id_video . "\" /></object>\n";
--------------------------------------------------------------------------- ------------------------------------------------------
search:
return "This URL is not a supported video
Add Tudou and FlashFile into ( )
--------------------------------------------------------------------------- ------------------------------------------------------
End