[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/path_helper.php on line 239: str_repeat(): Second argument has to be greater than or equal to 0
phpBB • embed youtube bbcode for phpbb3?

embed youtube bbcode for phpbb3?

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
avillabon
Registered User
Posts: 68
Joined: Mon Jul 14, 2008 3:51 am
Location: Venezuela
Contact:

embed youtube bbcode for phpbb3?

Post by avillabon » Sun Jul 20, 2008 5:21 am

i want to be able to embed youtube videos into posts... i found this when searching in these forum:
http://www.phpbb.com/community/viewtopi ... &sk=t&sd=a
but it is pretty old and for version 2 of phpbb.. can someone help me solve this? bare in mind i have prosilver and no mods installed.. in fact, i have never installed a mod.

thanks

Alex
Last edited by avillabon on Sun Jul 20, 2008 8:20 pm, edited 2 times in total.

Mike9824
Registered User
Posts: 153
Joined: Sun Apr 20, 2008 5:39 am
Name: Mike Goldman
Contact:

Re: embed youtube bbcode for phpbb3?

Post by Mike9824 » Sun Jul 20, 2008 5:36 am

Go to ACP => Posting => BBCodes

BBCode usage:

Code: Select all

[YouTube]http://youtube.com/watch?v={SIMPLETEXT}[/YouTube]
HTML replacement:

Code: Select all

<object type="application/x-shockwave-flash" data="http://www.youtube.com/v/{SIMPLETEXT}" width="425" height="350">
<param name="movie" value="http://youtube.com/v/{SIMPLETEXT}" />
<param name="wmode" value="transparent" />
</object>

avillabon
Registered User
Posts: 68
Joined: Mon Jul 14, 2008 3:51 am
Location: Venezuela
Contact:

Re: embed youtube bbcode for phpbb3?

Post by avillabon » Sun Jul 20, 2008 5:52 am

i created the new bbcode with the lines you provided..

i still get nothing but the text (code) but no youtube video embedded... this is what i get:

[YouTube]http://www.youtube.com/watch?v=yZp2qpZtfbo[/YouTube]

am i missing something? i already purged the cache and tried both on IE and firefox.

Oh yeah, one more thing.. i dont get a button on the post to warp the address with the youtube code... i have to do it manually, how can i create such button like for "Quote", "img", "URL", etc...

Alex
Attachments
bbcode.jpg
bbcode.jpg (83.74 KiB) Viewed 1297 times

Mike9824
Registered User
Posts: 153
Joined: Sun Apr 20, 2008 5:39 am
Name: Mike Goldman
Contact:

Re: embed youtube bbcode for phpbb3?

Post by Mike9824 » Sun Jul 20, 2008 5:59 am

avillabon wrote:i created the new bbcode with the lines you provided..

i still get nothing but the text (code) but no youtube video embedded... this is what i get:

[YouTube]http://www.youtube.com/watch?v=yZp2qpZtfbo[/YouTube]

am i missing something? i already purged the cache and tried both on IE and firefox.

Oh yeah, one more thing.. i dont get a button on the post to warp the address with the youtube code... i have to do it manually, how can i create such button like for "Quote", "img", "URL", etc...

Alex
Don't put the "www." in [YouTube]http://www.youtube.com/watch?v=yZp2qpZtfbo[/YouTube]

To make it show up as a button, go to edit the BBCode and at the bottom it will say Display on posting page, check the box then press submit.

If you want to have the "www." then use this BBCode usage:

Code: Select all

[YouTube]http://www.youtube.com/watch?v={SIMPLETEXT}[/YouTube]

avillabon
Registered User
Posts: 68
Joined: Mon Jul 14, 2008 3:51 am
Location: Venezuela
Contact:

Re: embed youtube bbcode for phpbb3?

Post by avillabon » Sun Jul 20, 2008 6:07 am

i changed the code to the one with www and also added the button following the instruction above...

i still get only the code when posting... i did purge cache.. check attachment.

what am i doing wrong?

Alex
Attachments
youtubePost.jpg
youtubePost.jpg (20.98 KiB) Viewed 1207 times

macgeek
Registered User
Posts: 123
Joined: Sat Oct 19, 2002 4:45 am
Location: Pearl City, Hawaii USA
Contact:

Re: embed youtube bbcode for phpbb3?

Post by macgeek » Sun Jul 20, 2008 9:13 am

avillabon wrote:i changed the code to the one with www and also added the button following the instruction above...

i still get only the code when posting... i did purge cache.. check attachment.

what am i doing wrong?

Alex
In your post, just use . Leave out the http://yada yada.

damienb2008
Registered User
Posts: 121
Joined: Sun Mar 09, 2008 11:47 am
Location: Adelaide South Australia
Contact:

Re: embed youtube bbcode for phpbb3?

Post by damienb2008 » Sun Jul 20, 2008 12:02 pm

this worked for me when i used the full http://www.youtube.com/watch?v=qbzKo7Dl7Vo in between then [YouTube} tags.

I used this code for BBcode:

Code: Select all

[YouTube]http://www.youtube.com/watch?v={SIMPLETEXT}[/YouTube]
and i used this for HTML replacement:

Code: Select all

<object type="application/x-shockwave-flash" data="http://www.youtube.com/v/{SIMPLETEXT}" width="425" height="350">
<param name="movie" value="http://youtube.com/v/{SIMPLETEXT}" />
<param name="wmode" value="transparent" />
</object>
Worked well

Damien

avillabon
Registered User
Posts: 68
Joined: Mon Jul 14, 2008 3:51 am
Location: Venezuela
Contact:

Re: embed youtube bbcode for phpbb3?

Post by avillabon » Sun Jul 20, 2008 2:24 pm

thank you damien! i dont know what was different about your code but it works now :D

does anyone know how i can center the video?

Alex

avillabon
Registered User
Posts: 68
Joined: Mon Jul 14, 2008 3:51 am
Location: Venezuela
Contact:

Re: embed youtube bbcode for phpbb3?

Post by avillabon » Sun Jul 20, 2008 8:08 pm

i managed to solve it...

this is what my post looks like

Code: Select all

[center][youtube]http://www.youtube.com/watch?v=GMN_Xvk3spA&feature=rec-fresh[/youtube][/center]
Alex

lworrilow
Registered User
Posts: 10
Joined: Thu Jul 17, 2008 1:29 pm
Location: Alabama
Contact:

Re: embed youtube bbcode for phpbb3?

Post by lworrilow » Tue Jul 22, 2008 4:59 am

Is in normal to see the code with the video next to it? i.e.:

[youtube]http://www.youtube.com/watch?v=n1tiujThcEE[/youtube] video shows up here

User avatar
Phil
Former Team Member
Posts: 10403
Joined: Sat Nov 25, 2006 4:11 am
Name: Phil Crumm
Contact:

Re: embed youtube bbcode for phpbb3?

Post by Phil » Tue Jul 22, 2008 5:40 am

Did you enter the BBCode twice?
Moving on, with the wind. | My Corner of the Web

lworrilow
Registered User
Posts: 10
Joined: Thu Jul 17, 2008 1:29 pm
Location: Alabama
Contact:

Re: embed youtube bbcode for phpbb3?

Post by lworrilow » Tue Jul 22, 2008 2:08 pm

No but the code shows up in the post and you can see it here:

http://www.flyballforum.com/viewtopic.php?f=14&t=22

lworrilow
Registered User
Posts: 10
Joined: Thu Jul 17, 2008 1:29 pm
Location: Alabama
Contact:

Re: embed youtube bbcode for phpbb3?

Post by lworrilow » Tue Jul 22, 2008 2:11 pm

You are right. It's in the BBCode Usage and the HTML replacement.

Pumizo
Registered User
Posts: 77
Joined: Tue Aug 05, 2008 11:46 pm

Re: embed youtube bbcode for phpbb3?

Post by Pumizo » Wed Aug 06, 2008 6:00 pm

Works perfect!
Thanks for sharing it... :D

ec_stasis
Registered User
Posts: 1
Joined: Thu Nov 13, 2008 8:13 pm

Re: embed youtube bbcode for phpbb3?

Post by ec_stasis » Thu Nov 13, 2008 8:22 pm

Use this code to make it work independently from subdomain (youtube.com, http://www.youtube.com, ru.youtube.com), as users, most likely will copy-paste the url from browsers address bar

Code: Select all

[YouTube]http://{SIMPLETEXT1}youtube.com/watch?v={SIMPLETEXT}[/YouTube]
The variable {SIMPLETEXT1} simply is not used in the HTML replacement.

Locked

Return to “[3.0.x] Support Forum”

Who is online

Users browsing this forum: No registered users and 66 guests