1 (edited by pogenwurst 2007-08-10 13:50)

Topic: YouTube Video BBCode

##
##
##        Mod title:  YouTube Video BBCode
##
##      Mod version:  1.0
##   Works on PunBB:  1.2.12
##     Release date:  2006-08-07
##           Author:  Brian H. (pogenwurst [aT] gmail {D0t} com)
##
##      Description:  Adds [youtube] BBCode to embed videos w/in posts
##
##   Affected files:  include/parser.php
##
##       Affects DB:  No
##
##            Notes:  Syntax: [youtube]URL[/youtube]
##                    URLs MUST be in the format found in the "About this
##                    video" box found on YouTube pages
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##

Download here

Looking for a certain modification for your forum? Please take a look here before posting.

2

Re: YouTube Video BBCode

Nice mod, YouTube is gaining popularity, I usually waste some time everyday checking out things.

Wonder when they'll get sued for allowing posting of copyrighted material? Till then, let's have some fun!!

Re: YouTube Video BBCode

hcgtv wrote:

Wonder when they'll get sued for allowing posting of copyrighted material? Till then, let's have some fun!!

haha no doubt.

nice share pogenwurst.

~James
FluxBB - Less is more

Re: YouTube Video BBCode

Thanks guys.

Yep, YouTube is jam-packed with magical wonderfulness.

Looking for a certain modification for your forum? Please take a look here before posting.

Re: YouTube Video BBCode

Nice. I really like this mod. Thanks ! I also like your gallery with Lightbox JS. Is the full code for that implementation a secret?

Re: YouTube Video BBCode

Patrik wrote:

Nice. I really like this mod. Thanks ! I also like your gallery with Lightbox JS. Is the full code for that implementation a secret?

Thanks.

No, it's pretty easy to add Lightbox support to the gallery. I'll email you my modified gallery.php if you would like.

Looking for a certain modification for your forum? Please take a look here before posting.

7

Re: YouTube Video BBCode

I've got a practical problem with this mod, cause my members are very fond of Quoting. So when they quote, the video shows up again and again.
Is it possible to make it like the image-tags, that change to Url-tags when quoted?

Re: YouTube Video BBCode

Probably. I'll take a look.

Looking for a certain modification for your forum? Please take a look here before posting.

Re: YouTube Video BBCode

Another example of Google Video and YouTube in action:

http://bik3r.com/viewtopic.php?id=1202

Great modification.

Re: YouTube Video BBCode

It looks so useful. Thanks. smile

Welcome to my WoW guild site, the Eternal Reach.

You can also visit Chita, a site built by me, a feral paradise for feline animals.

Re: YouTube Video BBCode

link dowanlod dasent wrking

Sorry for my english!

Re: YouTube Video BBCode

kurdsonline wrote:

link dowanlod dasent wrking

It works for me. smile

Gosh, I need to remember to update this sometime.

Looking for a certain modification for your forum? Please take a look here before posting.

13

Re: YouTube Video BBCode

This is probably the most popular mod on my site, besides the PM-mod.
Fantastic job smile
I think at least 1000 videos are posted with this mod in just a few months.

14

Re: YouTube Video BBCode

it is possible to combine several of these plugins in only one

#
#---------[ 1. OPEN ]---------------------------------------------------------
#

include/parser.php


#
#---------[ 2. FIND (line: 316) ]---------------------------------------------
#

'#\[u\](.*?)\[/u\]#s',


#
#---------[ 3. AFTER, ADD ]---------------------------------------------------
#

'#\[youtube\]http://www.youtube.com/watch\?v=(.*?)\[/youtube\]#s',
'#\[dailymotion\]http://www.dailymotion.com/swf/(.*?)\[/dailymotion\]#s',
'#\[googlevideo\]http://video.google.com/videoplay\?docid=(.*?)\[/googlevideo\]#s',
'#\[mp3\]([^\[]*?)\[/mp3\]#',


#
#---------[ 4. FIND (line: 326) ]---------------------------------------------
#

'<span class="bbu">$1</span>',


#
#---------[ 5. AFTER, ADD ]---------------------------------------------------
#

'<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/$1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>',
'<object width="425" height="364"><param name="movie" value="http://www.dailymotion.com/swf/$1"></param><embed src="http://www.dailymotion.com/swf/$1" type="application/x-shockwave-flash" width="425" height="364"></embed></object>',
'<object width="425" height="364"><param name="movie" value="http://video.google.com/googleplayer.swf?docId=$1"></param><embed src="http://video.google.com/googleplayer.swf?docId=$1" type="application/x-shockwave-flash" width="425" height="364"></embed></object>',
'<object width="200" height="20"><param name="movie" value="dewplayer.swf?mp3=$1" /><param name="wmode" value="transparent" /><embed src="dewplayer.swf?mp3=$1" type="application/x-shockwave-flash" wmode="transparent" width="200" height="20"></embed></object>',


#
#---------[ 6. SAVE/UPLOAD ]-------------------------------------------------
#

mp3 bbcode needs this file to work : http://www.estvideo.com/dew/media/dewplayer.swf

Re: YouTube Video BBCode

Thats grest is possible uploading file video in my website and play also on my website. If yes how will be the code. Thanks

Sorry for my english!

16

Re: YouTube Video BBCode

it works on our board ..great..
http://www.langturk.com/forum/viewtopic.php?id=58

17

Re: YouTube Video BBCode

This one is also working on my forum.
Thanks~~
But I met a problem after I use it.
This BBCode works good when I make a new post.
BUt I can not edit any post on my forum.
WHen I press "edit".
The error message shows me "Parse error: syntax error, unexpected $end in /share/forumtest/index/edit.php on line 267"
So ,
If I use this BBCode,My forum will not been edit post anymore.
Can anyone help me to fix this problem??
I love this BBCode to be one part of my forum.:)
But at this monment,I can not use it.:(

Re: YouTube Video BBCode

Hmm, I don't have that issues. Would you mind posting the line mentioned in the error, as well as a few lines before and after it?

Looking for a certain modification for your forum? Please take a look here before posting.

19 (edited by chopiesel 2007-03-18 08:21)

Re: YouTube Video BBCode

i installed the youtube one first and it works fine, but google is right under it on the next line and does not work?

Re: YouTube Video BBCode

chopiesel wrote:

i installed the youtube one first and it works fine, but google is right under it on the next line and does not work?

I'll need more information about your problem and how it occurred if you need me to help you.

Looking for a certain modification for your forum? Please take a look here before posting.

Re: YouTube Video BBCode

well it seems only the line of code on line 317 works, at the moment its youtube but if i put the google code on that line it works and not youtube.

putting anything on line 318 doesnt work.

Re: YouTube Video BBCode

That's... odd.

Can you paste the relevant lines from you parser.php here?

Looking for a certain modification for your forum? Please take a look here before posting.

23

Re: YouTube Video BBCode

in fact ... there is now better and easier solution to integrate Youtube videos ... with only

[ url = youtube ] name of video [/ url]

with Jquery :
http://jquery.lukelutman.com/plugins/flash/

Perfect for mp3, too ... and only javascript to put on header smile

Re: YouTube Video BBCode

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

25

Re: YouTube Video BBCode

The javascript triggers mod is by far the easiest to use for youtube/google, however. No quoting at all required, and works a treat.