Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#1 2010-09-17 15:37:52

taylorchu
Member
Registered: 2010-08-10
Posts: 101

[MOD]youtube bbcode

This is a very simple youtube mod that just works. You can install this mod in less than one min.
NOTICE: I don't know if you install any mod before, so be careful.

Mod

download it here: http://fluxbb.org/resources/mods/youtube-bbcode/

How to use it

[youtube]52mmgGmu[/youtube]
"52mmgGmu" is the youtube id.

Customize

1. "do_clickable" is evil. We just save 'youtube' url from being a normal url.

2. you can edit width="640" height="385" based on your site.

3. the youtube url will be translated as a "iframe". It is a beta on youtube website. With this iframe, sometimes user does not need flash to watch video. HTML5!!! smile

Last edited by taylorchu (2011-05-28 10:10:32)

Offline

#2 2010-10-16 01:49:13

j0y
Member
Registered: 2010-10-16
Posts: 2

Re: [MOD]youtube bbcode

If you don't like iframes, here is an alternative for step 7:

$replace[] = '<object width="630" height="380"><param name="movie" value="http://www.youtube.com/v/$1&ap=%2526fmt%3D22"></param><embed src="http://www.youtube.com/v/$1&ap=%2526fmt%3D22" type="application/x-shockwave-flash" width="630" height="380"></embed></object>';

Last edited by j0y (2010-10-16 01:49:26)

Offline

#3 2010-10-16 14:50:48

artoodetoo
Member
From: Far-Far-Away
Registered: 2008-05-11
Posts: 207

Re: [MOD]youtube bbcode

Good job!
There is another video mod here.

Offline

#4 2010-10-20 20:01:25

taylorchu
Member
Registered: 2010-08-10
Posts: 101

Re: [MOD]youtube bbcode

I should make a real editor with video and audio support; this simple mod needs to be extend somehow.

@artoodetoo
your editor is really cool, maybe you can separate the editor from the zip file and add it into the mod repository.

Offline

#5 2010-12-21 06:52:43

taylorchu
Member
Registered: 2010-08-10
Posts: 101

Re: [MOD]youtube bbcode

upload a newer version. v1.1

Offline

#6 2011-01-07 05:18:37

kevinski
Member
Registered: 2010-02-18
Posts: 20

Re: [MOD]youtube bbcode

I haven't been able to get this to work. It doesn't break anything, but the YouTube bbcode shows up as regular text, and the forum still parses the YouTube URL as a normal URL. Is v1.1 of this modification verified as working in FluxBB 1.4.2?

Offline

#7 2011-01-07 10:55:28

mowicz
Member
From: Poland
Registered: 2011-01-07
Posts: 5
Website

Re: [MOD]youtube bbcode

@up - I have also issiues, not working for me as well hmm

Offline

#8 2011-01-07 17:42:30

kevinski
Member
Registered: 2010-02-18
Posts: 20

Re: [MOD]youtube bbcode

mowicz wrote:

@up - I have also issiues, not working for me as well hmm

I've figured it out. Go into one of your topics in which you've attempted to embed video and edit the post containing the embed code. You'll notice that the YouTube embed code has a URL tag inside of the YOUTUBE tag. Since I don't have a lot of embedded YouTube posts on my forum, I just went through and manually edited all of the posts to correct them. I assume that you could do the same by going into the database and doing a quick find and replace for the appropriate sets of opening and closing tags.

I assume that this happened whenever the upgrade script updated the database.

Offline

#9 2011-01-09 10:16:01

kevinski
Member
Registered: 2010-02-18
Posts: 20

Re: [MOD]youtube bbcode

You can use this in step 7 if you'd like to embed HD versions of videos automatically. (Videos that aren't in HD resolutions will still play as normal.)

$replace[] = '<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/v/$1&amp;hd=1" frameborder="0"></iframe>';

Offline

#10 2011-01-23 14:19:06

mattT09
Member
Registered: 2009-07-14
Posts: 133

Re: [MOD]youtube bbcode

tried to get this to work with Flickr today...

Amateur replacing of like for like code etc.  Not successful!    Flickr uses the

<object type="application/x-shockwave-flash" width="640" height="360" data="http://www.flickr.com/apps/video/stewart.swf?v=71377" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> <param name="flashvars" value="intl_lang=en-us&photo_secret=940980053f&photo_id=5380009921"></param> <param name="movie" value="http://www.flickr.com/apps/video/stewart.swf?v=71377"></param> <param name="bgcolor" value="#000000"></param> <param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/video/stewart.swf?v=71377" bgcolor="#000000" allowfullscreen="true" flashvars="intl_lang=en-us&photo_secret=940980053f&photo_id=5380009921" height="360" width="640"></embed></object>

code above is for an actual video.

Any ideas folks?

Actually it was not this video Mod, it was artoodetoo's version...

Last edited by mattT09 (2011-01-23 14:42:26)

Offline

#11 2011-01-25 18:41:16

taylorchu
Member
Registered: 2010-08-10
Posts: 101

Re: [MOD]youtube bbcode

I need two things to help you
1. the site url
2. the embedded code

if they have some relations, then creating a bbcode is possible.

Offline

#12 2011-02-02 21:03:10

zeaks
Member
Registered: 2011-01-25
Posts: 18

Re: [MOD]youtube bbcode

I'm unable to get this to work for the latest version 1.4.4, does anyone have an update?

Offline

#13 2011-02-02 23:25:21

kevinski
Member
Registered: 2010-02-18
Posts: 20

Re: [MOD]youtube bbcode

zeaks wrote:

I'm unable to get this to work for the latest version 1.4.4, does anyone have an update?

Go to one of your posts that has a YouTube tag and choose to edit it. See if there are two sets of YouTube tags around each YouTube URL.

Offline

#14 2011-02-03 00:49:03

zeaks
Member
Registered: 2011-01-25
Posts: 18

Re: [MOD]youtube bbcode

kevinski wrote:

Go to one of your posts that has a YouTube tag and choose to edit it. See if there are two sets of YouTube tags around each YouTube URL.

Thanks! There wasn't 2 youtube tags, but there was a new [url tag around them, they work now.

Last edited by zeaks (2011-02-03 00:49:25)

Offline

#15 2011-02-03 18:49:14

kevinski
Member
Registered: 2010-02-18
Posts: 20

Re: [MOD]youtube bbcode

zeaks wrote:

Thanks! There wasn't 2 youtube tags, but there was a new [url tag around them, they work now.

Oops...yeah, that's what I meant. smile

Offline

#16 2011-05-28 10:11:23

taylorchu
Member
Registered: 2010-08-10
Posts: 101

Re: [MOD]youtube bbcode

updated to work with the latest version of fluxbb.
installation is much easier now!
cheers!

Offline

#17 2011-07-16 16:06:01

gnat
Member
Registered: 2011-07-15
Posts: 13
Website

Re: [MOD]youtube bbcode

Beautiful modification for illustrating how easy it is to add custom BBCode types to FluxBB.

More modifications need to value simplicity for the developer!

Last edited by gnat (2011-07-16 16:09:46)

Offline

#18 2011-10-23 09:54:22

fra2591
Member
From: France
Registered: 2010-09-13
Posts: 239
Website

Re: [MOD]youtube bbcode

I love this mod it's very useful!! But I just wanted to report that whenever  youtube video is "featured" it doesn't work.  Examples :

youtube.com/watch?v=_rHJfeW9sqY&feature=channel_video_title

doesn't work

youtube.com/watch?v=_rHJfeW9sqY

works


"La vraie faute est celle qu'on ne corrige pas." Confucius
"The real mistake is the one we do not correct." Confucius

Offline

#19 2012-04-08 17:53:41

Ahmed
Member
From: Latvia/Sudan/Earth
Registered: 2012-04-04
Posts: 59
Website

Re: [MOD]youtube bbcode

Does not work with 1.4.8 (according to Patcher installation plugin)

Offline

#20 2012-05-06 23:21:16

hawky
Member
Registered: 2012-05-06
Posts: 17

Re: [MOD]youtube bbcode

I've tried installing it on 1.4.8 as well, not working for me.

Edit: Nevermind, it does work.  Just when you try and install through the patcher, it tells you that a string is missing, then even if you go change the string in parser.php, it still tells you that the string is missing, but really the mod already works after that.

Last edited by hawky (2012-05-06 23:37:49)

Offline

#21 2012-05-07 00:04:32

stevetheipad
Member
Registered: 2012-02-25
Posts: 129

Re: [MOD]youtube bbcode

Is it pretty easy to set-up? Something a new-fluxbber could do?


floating on a big blue cloud somewhere above you

Offline

#22 2012-05-07 00:23:05

hawky
Member
Registered: 2012-05-06
Posts: 17

Re: [MOD]youtube bbcode

Yes, all you need to do is copy and paste two lines of code into the right spot in the parser.php file.

Offline

#23 2012-10-03 23:54:54

orkneywd
Member
From: Orkney Islands, UK
Registered: 2008-05-10
Posts: 150

Re: [MOD]youtube bbcode

Thanks for this mod. The version I used on FluxBB 1.2 made users enter the bbcode as follows:

[youtube]http://www.youtube.com/whateverid[/youtube]

Instead of changing all of the URLs in the posts I replaced the code in step 1 of your mod to this:-

	$pattern[] = '#\[youtube\]http://www.youtube.com/watch\?v=(.*?)\[/youtube\]#s';

Seems to work okay smile

Offline

#24 2012-12-22 23:00:21

orkneywd
Member
From: Orkney Islands, UK
Registered: 2008-05-10
Posts: 150

Re: [MOD]youtube bbcode

Is it possible for embedded videos to use the start parameter so that forum users can embed videos at a specific timeframe.

[youtube]vnS6LJET7jM&start=10[/youtube]

The above doesn't seem to work smile

Edit: To allow the start parameter I changed it to this:-

	$pattern[] = '%\[youtube\]([-\w]{11}(\?[\w=&]+)?)\[/youtube\]%ms';
	$replace[] = '<iframe width="480" height="390" src="http://www.youtube.com/embed/$1" frameborder="0"></iframe>';

Last edited by orkneywd (2012-12-27 17:08:52)

Offline

#25 2013-01-29 15:57:14

Softrix
Member
Registered: 2013-01-28
Posts: 3

Re: [MOD]youtube bbcode

Also make sure you update help.php so that people can know.

For Iframe based solution:

<p><code>[youtube]PiyOF6DW-Qo[/youtube]</code> <?php echo $lang_help['produces'] ?> <samp><iframe width="480" height="390" src="http://www.youtube.com/embed/PiyOF6DW-Qo?rel=0" frameborder="0"></iframe></samp></p> 

You can test the same here: forums.softrix-institute.com

Offline

Board footer

Powered by FluxBB 1.5.6