26

Re: YouTube Video BBCode

naitkris wrote:

requires loading tons of JS though, slows down forum for those on slower connections or some distance from the webserver.

stop with this false argument please : the JS = 23 ko ... not the end of the world. In this case, embed a youtube video is bad for people who have 28 kps connexion, isn't it ?

Re: YouTube Video BBCode

Hi everybody, for complient to the W3C, the script must be like :

$pattern = array('#\[b\](.*?)\[/b\]#s',
                     '#\[i\](.*?)\[/i\]#s',
                     '#\[u\](.*?)\[/u\]#s',
                     '#\[youtube\]http://www.youtube.com/watch\?v=(.*?)\[/youtube\]#s',
                     '#\[dailymotion\]http://www.dailymotion.com/swf/(.*?)\[/dailymotion\]#s',
                     '#\[mp3\]([^\[]*?)\[/mp3\]#',
                     '#\[url\]([^\[]*?)\[/url\]#e',
                     '#\[url=([^\[]*?)\](.*?)\[/url\]#e',
                     '#\[email\]([^\[]*?)\[/email\]#',
                     '#\[email=([^\[]*?)\](.*?)\[/email\]#',
                     '#\[color=([a-zA-Z]*|\#?[0-9a-fA-F]{6})](.*?)\[/color\]#s');

    $replace = array('<strong>$1</strong>',
                     '<em>$1</em>',
                     '<span class="bbu">$1</span>',
                     '<object type="application/x-shockwave-flash" data="http://www.youtube.com/v/$1" width="425" height="350"><param name="movie" value="http://www.youtube.com/v/$1"><param name="WMode" value="Transparent"><param name="autoplay" value="no"><p>Si vous ne voyez pas cette vidéo, téléchargez le plug-in Flash</p></param></object>',                     
                     '<object type="application/x-shockwave-flash" data="http://www.dailymotion.com/swf/$1" width="425" height="350"><param name="movie" value="http://www.dailymotion.com/swf/$1"><param name="WMode" value="Transparent"><param name="autoplay" value="no"><p>Si vous ne voyez pas cette vidéo, téléchargez le plug-in Flash</p></param></object>',                     
                     '<object type="application/x-shockwave-flash" data="dewplayer.swf?mp3=$1" width="200" height="20"><param name="movie" value="dewplayer.swf?mp3=$1"><param name="WMode" value="Transparent"><param name="autoplay" value="no"><p>Si vous ne voyez pas cette vidéo, téléchargez le plug-in Flash</p></param></object>',
                     'handle_url_tag(\'$1\')',
                     'handle_url_tag(\'$1\', \'$2\')',
                     '<a href="mailto:$1">$1</a>',
                     '<a href="mailto:$1">$2</a>',
                     '<span style="color: $1">$2</span>');

The <embed> is deprecated.

This code is valid for html4.01, for xhtml1.0 strict you must delete the end tag </param> and auto close all <param ... />.

I don't know why, but google video doesn't want to work.

Re: YouTube Video BBCode

Hello all I am obviously new to this forum but this is one of the only ones which has an active and current threads for youtube video bbcode mods. I don't know if any of you could help me but I am using phpbb and I need to find a mod that works in order for me to embed youtube video. all of the mods I found in other forums were posted 1 even two years ago and no updates? even at the phpbb styles forum. crazy huh? anyway any help or advice would be greatly appreciated. Thanks all!

29

Re: YouTube Video BBCode

johnnyj wrote:

Hello all I am obviously new to this forum but this is one of the only ones which has an active and current threads for youtube video bbcode mods. I don't know if any of you could help me but I am using phpbb and I need to find a mod that works in order for me to embed youtube video. all of the mods I found in other forums were posted 1 even two years ago and no updates? even at the phpbb styles forum. crazy huh? anyway any help or advice would be greatly appreciated. Thanks all!

There is no need to make updates if it works fine, the YouTube link has not changed.

Re: YouTube Video BBCode

Rod wrote:

stop with this false argument please : the JS = 23 ko ... not the end of the world. In this case, embed a youtube video is bad for people who have 28 kps connexion, isn't it ?

http://jquery.com/src/jquery-latest.js is in fact 56KB uncompressed (ca. 21KB if compressed).

now, if you are calling 57.9KB or even 21KB "not the end of the world", well for someone on 56k, that is still 4 to 11 seconds just for the JS to load for this which is way too long. and remember PunBB is about being lighweight not heavy like phpBB, vBullettin etc!

31 (edited by johnnyj 2007-04-11 18:55)

Re: YouTube Video BBCode

I found this site here

http://www.influenced.net/2006/09/21/ph … embedding/

Nevermind I got it.. thanks all!! oh yea if anybody asks again about phpbb I suggest using this link he shows how to get youtube, ifilm, and google in only two steps!!

32

Re: YouTube Video BBCode

this is a great idea - I manage to implement this, but failed to extend it to embed Yahoo Videos - do anybody know how to do that?

33

Re: YouTube Video BBCode

..hmmmm, nobody knows for the Yahoo Videos?

This is fun - I got it now for:

- myVideo
- google Video
- Clipfish
- YouTube
- FLV files with Jeroen Wijirings FLV Player
- Mp3 files with Jeroen Wijirings Mp3 Player
- Quicktime
- SWF files
- Windows Media Player

YouTube would be interresting, also "Metacafe" and "ebaumsworld"

to "johnnyj" : How did you adapted the code on that site - isn't that for "phpBB" ?

Thank's