Extension talk:YouTube (Iubito)

Well ... I followed your instructions and there weren't any errors. However, how do I add a link for the youTube in the navigation menu at my wiki so my members know it even exists?

Full URL should also work
Is there a way users can also use the full URL of a Youtube video? People are not used to deleting part of a YouTube URL. The way to do this could be:
 * IF $input string starts with "http:", THEN use this as the embed code directly - ELSE (do as you have done).--Matt57 05:24, 21 October 2006 (UTC)

More Parameters
If you want to add some parameters like

ID|width|height|style

use the following code instead of the one provided before (just replace this one procedure):

# The callback function for converting the input text to HTML output function renderYouTube($input) { $params = explode ("|", $input); $id = $params[0]; $width = 425; $height = 350; $addStyle = ''; if (count($params) > 1) { $width = $params[1]; if (count($params) > 2) { $height = $params[2]; if (count($params) > 3) { $addStyle = ' style="'. $params[3] . '"'; }             }           }        $output=''               .'' .'  ' .' ';        return $output; }

Anywhere on your page, you just type the following information:

VideoID

Where the "VideoID" is the code follows after "watch?v=" In the following case, it is WZpeeRSk-0A url http://www.youtube.com/watch?v=WZpeeRSk-0A

Good-luck!

--Kohyin 23:16, 24 January 2007 (UTC)

YouTube opens up in new window
This works great embedding the YouTube video except when hitting the PLAY arrow, a new window opens up to the full YouTube page versus playing the video embedded in the page as your sample does. Am I doing something wrong or has something changed?

Thanks! -Larry

FYI, I copied the .php codes from the article page not from the discussion page, and I use the simplified sintax as I mentioned above. My videos are running as they should.--Kohyin 07:35, 30 January 2007 (UTC)


 * If you click on the big "play" button in the middle of the video, it works OK. I also noticed that if you click on the small "play" button on bottom/left, it opens a new page. This bottom/left button works well to pause/replay after starting the video with the big middle button. --82.255.133.227 06:54, 17 May 2007 (UTC)

Revvr
Would it be possible to modify this extension, to play videos from the revver site?--Rovo 22:31, 14 February 2007 (UTC)

Tabe of Contents broken by this extension
Hi all...anyone noticed that if you use this extension in a page that has a Table of Contents that the section link to the one below the section that has the video in it actually ends up going to the section with the video in it? (clear as mud?) The work around is to a a single character after the video. ChuckMcB
 * That's not very clear. I didn't noticed any problem on my wiki. Can you explain better ? --82.255.133.227 06:54, 17 May 2007 (UTC)

XSS Vulnerability Example
For an example of how this extension is vulnerable to XSS attacks, consider the following: " id="deleteme">  var dm=document.getElementById('deleteme'); dm.parentNode.removeChild(dm); alert('XSS Attack Here!'); <embed style="display:none --Jimbojw 16:31, 27 March 2007 (UTC)
 * This is now fixed !
 * Thanks for the concrete example of what is a XSS vulnerability. I've heard this word before but can't get an example of what it is.
 * --Iubito 06:55, 17 May 2007 (UTC)
 * That's why the warning template links to the wikipedia article that explains it... -- Duesentrieb ⇌ 00:06, 18 May 2007 (UTC)

Sizing
Would it be possible to change the size of the youtube video with a code? I am unable to find a way to do this thusfar and it would immensely useful. --Entropy 16:14, 6 July 2007 (UTC)

Parameters not documented
This isn't documented very well.

Of the 4 parameters, ID, width, height and Style. I don't know what Style does.

Can someone explain?

Judging from I think 'style' is the Flash version required to be installed in the persons PC?


 * Also did you know if you add '&autoplay=1' after the ID then it autoplays? :-))

--Quatermass 18:47, 2 October 2007 (UTC)