Google Groups Home
Help | Sign in
Add Tudou vedio & SWF file supports
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
ludwig  
View profile
 More options May 8, 2:40 pm
From: ludwig <ludwig....@gmail.com>
Date: Thu, 8 May 2008 11:40:13 -0700 (PDT)
Local: Thurs, May 8 2008 2:40 pm
Subject: Add Tudou vedio & SWF file supports
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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google