This is How to Simply Embed ANY Youtube & Google Video

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Scam Warning
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
User avatar
karlsemple
Former Team Member
Posts: 39802
Joined: Mon Nov 01, 2004 8:54 am
Location: Hereford, UK
Contact:

Re: This is How to Simply Embed ANY Youtube & Google Video

Post by karlsemple »

IIRC there is a current bug in the bbcode parsing in relation to the way URI's are parsed hence there are issues with trying to use the youtube bbcode with full URI will not work correctly,

This is currently the method which is working

BBCODE:

Code: Select all

[youtube]{SIMPLETEXT}[/youtube]
HTML:

Code: Select all

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

User avatar
espenhh
Registered User
Posts: 215
Joined: Sun Mar 17, 2002 8:27 pm
Location: Norway
Contact:

Re: This is How to Simply Embed ANY Youtube & Google Video

Post by espenhh »

This one works for me:

BBCODE:

Code: Select all

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

Code: Select all

<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/{SIMPLETEXT}"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/{SIMPLETEXT}" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>
By using this, you just copy the URL of the video, and surround that with the youtube-tag, and the video gets embedded :)
ALT du trenger til phpBB - på Norsk!
Besøk phpbb.no:
Image

Wert
Former Team Member
Posts: 3677
Joined: Tue Jul 03, 2001 8:33 pm
Location: Sacramento, CA
Name: Chris Aguilar

Re: This is How to Simply Embed ANY Youtube & Google Video

Post by Wert »

espenhh wrote:This one works for me:

BBCODE:

Code: Select all

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

Code: Select all

<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/{SIMPLETEXT}"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/{SIMPLETEXT}" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>
By using this, you just copy the URL of the video, and surround that with the youtube-tag, and the video gets embedded :)
This does not work for me (RC1)
Chris Aguilar - AKA "Wert"

User avatar
Frodosringfinger
Registered User
Posts: 226
Joined: Mon Oct 16, 2006 1:45 am
Location: Maryland
Contact:

Re: This is How to Simply Embed ANY Youtube & Google Video

Post by Frodosringfinger »

The reason I posted it the way I did in the original post is because not everybody will know to JUST GET THE ID number. Not everybody will know to post the link to embed it, they'll just post the link without the bbcode.

With my way, people can just do it the way its meant to be done. Paste the EMBED code, EMBED the video.

Vettes
Registered User
Posts: 11
Joined: Thu May 31, 2007 2:55 pm

Re: This is How to Simply Embed ANY Youtube & Google Video

Post by Vettes »

I haven't been able to get this to work in RC1 either. I run my own video site and the code is similar to youtube.

In the ACP:

In the BBCode Usage box, I have:

Code: Select all

[vtube]<object type="application/x-shockwave-flash" width="450" height="370" wmode="transparent" data="http://mysite.com/flvplayer.swf?file=http://mysite.com/flvideo/{SIMPLETEXT}&autostart=true&showfsbutton=true"><param name="movie" value="http://mysite.com/flvplayer.swf?file=http://mysite.com/flvideo/{SIMPLETEXT}&autostart=true&showfsbutton=true" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="sameDomain" /><embed src="http://mysite.com/flvplayer.swf?file=http://mysite.com/flvideo/{SIMPLETEXT}&autostart=true&showfsbutton=true" loop="false" width="450" height="370" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>[/vtube]
In the HTML Replacement box, I have:

Code: Select all

<object type="application/x-shockwave-flash" width="450" height="370" wmode="transparent" data="http://mysite.com/flvplayer.swf?file=http://mysite.com/flvideo/{SIMPLETEXT}&autostart=true&showfsbutton=true"><param name="movie" value="http://mysite.com/flvplayer.swf?file=http://mysite.com/flvideo/{SIMPLETEXT}&autostart=true&showfsbutton=true" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="sameDomain" /><embed src="http://mysite.com/flvplayer.swf?file=http://mysite.com/flvideo/{SIMPLETEXT}&autostart=true&showfsbutton=true" loop="false" width="450" height="370" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>
An example of trying to post a video in a post looks like this, but doesn't render:

Code: Select all

[vtube]<object type="application/x-shockwave-flash" width="320" height="260" wmode="transparent" data="http://mysite.com/flvplayer.swf?file=http://mysite.com/flvideo/287.flv&autostart=true&showfsbutton=true">
<param name="movie" value="http://mysite.com/flvplayer.swf?file=http://mysite.com/flvideo/287.flv&autostart=true&showfsbutton=true" />
<param name="wmode" value="transparent" />
<param name="allowScriptAccess" value="sameDomain" />
<embed src="http://mysite.com/flvplayer.swf?file=http://mysite.com/flvideo/287.flv&autostart=true&showfsbutton=true" loop="false" width="320" height="260" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>[/vtube]
What am I doing wrong?

tweaks.be
Registered User
Posts: 2
Joined: Wed Jun 06, 2007 9:27 pm

Re: This is How to Simply Embed ANY Youtube & Google Video

Post by tweaks.be »

freak020 wrote:
niuck wrote:Nice, I dont wanna be an asshole, but. Is there any way to modify it so we can use the whole URL with the tags like: [youtube]http://www.youtube.com/watch?v=c1d_6sKdyKM[/youtube] ?
I guess there are more peeps out there that have forums full with that stuff. :)
I tried making one where it works like that, however it didn't work. I did manage to make one that works like though:

Code: Select all

[youtube=http://www.youtube.com/watch?v=AYxu_MQSTTY][/youtube]
Here it is:
BB Code Usage:

Code: Select all

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

Code: Select all

<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/{SIMPLETEXT}"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/{SIMPLETEXT}" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>
This code works perfect and is the safest to use !! Never put html in BB code, it's not a safe way of managing a forum.

I also added the code for google:

BBcode:

Code: Select all

[google=http://video.google.com/videoplay?docid={SIMPLETEXT}][/google]
HTML replacemend:

Code: Select all

<embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId={SIMPLETEXT}=en" flashvars=""> </embed>
And then u can just enter a link like this: [google=URL_FROM_THE_VIDEO][/google]

User avatar
twfansite
Registered User
Posts: 6
Joined: Tue May 22, 2007 6:59 pm

Re: This is How to Simply Embed ANY Youtube & Google Video

Post by twfansite »

Thanks for the code for Google Video's.It works perfect ;)

cotp
Registered User
Posts: 445
Joined: Wed Sep 14, 2005 7:34 pm
Contact:

Re: This is How to Simply Embed ANY Youtube & Google Video

Post by cotp »

Don't know why any youtube or Google bbcode won't work for me on RC1 although dailymotion code seems to work :?

Cotp

User avatar
Kiba-kun
Registered User
Posts: 16
Joined: Sat May 26, 2007 1:09 pm
Location: Vitoria-Gasteiz
Contact:

Re: This is How to Simply Embed ANY Youtube & Google Video

Post by Kiba-kun »

The GameTrailers Version:

BBCODE USAGE

Code: Select all

[GameTrailers]<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="gtembed" width="480" height="409">	<param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="http://www.gametrailers.com/remote_wrap.php?mid={SIMPLETEXT}"/> <param name="quality" value="high" /> <embed src="http://www.gametrailers.com/remote_wrap.php?mid={SIMPLETEXT}" swLiveConnect="true" name="gtembed" align="middle" allowScriptAccess="sameDomain" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="480" height="409"></embed> </object>[/GameTrailers]
HTML REPLACE

Code: Select all

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="gtembed" width="480" height="409">	<param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="http://www.gametrailers.com/remote_wrap.php?mid={SIMPLETEXT}"/> <param name="quality" value="high" /> <embed src="http://www.gametrailers.com/remote_wrap.php?mid={SIMPLETEXT}" swLiveConnect="true" name="gtembed" align="middle" allowScriptAccess="sameDomain" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="480" height="409"></embed> </object>
Demo: http://loliforos.net/viewtopic.php?f=2&t=150&p=2209

Gollem99
Registered User
Posts: 78
Joined: Mon Jul 04, 2005 6:29 pm

Re: This is How to Simply Embed ANY Youtube & Google Video

Post by Gollem99 »

The Youtube one works fine for me but i can get google or game trailers to work :/

User avatar
Kiba-kun
Registered User
Posts: 16
Joined: Sat May 26, 2007 1:09 pm
Location: Vitoria-Gasteiz
Contact:

Re: This is How to Simply Embed ANY Youtube & Google Video

Post by Kiba-kun »

The DailyMotion Version:

BBCODE USAGE

Code: Select all

[DailyMotion]<div><object width="{NUMBER1}" height="{NUMBER2}"><param name="movie" value="http://www.dailymotion.com/swf/{SIMPLETEXT}"></param><param name="allowfullscreen" value="true"></param><embed src="http://www.dailymotion.com/swf/{SIMPLETEXT}" type="application/x-shockwave-flash" width="{NUMBER1}" height="{NUMBER2}" allowfullscreen="true"></embed></object><br /><b><a href="{URL1}">{TEXT1}</a></b><br /><i>Uploaded by <a href="{URL2}">{TEXT2}</a></i></div>[/DailyMotion]
HTML REPLACE

Code: Select all

<div><object width="{NUMBER1}" height="{NUMBER2}"><param name="movie" value="http://www.dailymotion.com/swf/{SIMPLETEXT}"></param><param name="allowfullscreen" value="true"></param><embed src="http://www.dailymotion.com/swf/{SIMPLETEXT}" type="application/x-shockwave-flash" width="{NUMBER1}" height="{NUMBER2}" allowfullscreen="true"></embed></object><br /><b><a href="{URL1}">{TEXT1}</a></b><br /><i>Uploaded by <a href="{URL2}">{TEXT2}</a></i></div>
Demo: http://loliforos.net/viewtopic.php?f=3& ... &sk=t&sd=a

Gollem99, i don't know why is not working in your forum but the codes are exactly CopyPastes from mine. :S
¿Are you using de RC1 or a Beta?

Gollem99
Registered User
Posts: 78
Joined: Mon Jul 04, 2005 6:29 pm

Re: This is How to Simply Embed ANY Youtube & Google Video

Post by Gollem99 »

RC1.

Yea i cannot fathom why its not working yet had no problems with the Youtube one. I've only got back to my pc since then so i'll have another look today, see if i have missed something.

User avatar
IBBoard
Registered User
Posts: 542
Joined: Wed May 25, 2005 9:02 pm
Location: Worcestershire, UK
Contact:

Re: This is How to Simply Embed ANY Youtube & Google Video

Post by IBBoard »

I won't repost again, as I've already posted in another thread I found first and in the bug report, but I've got a 'better' solution (as in one that works so you can make perfect clones of the [img] and tags) at http://www.phpbb.com/community ... EXT} {URL}[/code]
being parsed to a link (bad example for real use, but it's the most obvious one).


[edit] Hmmm, [url] tags weren't working for me. Ironically, the link is now left to be made clickable (which is the cause of this problem in the first place!)

fotogeek
Registered User
Posts: 21
Joined: Wed Jun 20, 2007 2:41 pm
Location: Charlotte

Re: This is How to Simply Embed ANY Youtube & Google Video

Post by fotogeek »

alright, now i've done this before with joomla and ipb with no problems, but the only thing I can't get out of all these embed threads is WHICH FILES I need to put the bbcode and html code into. I've searched, so don't give me that "search is your friend" crap. I don't code, but I've never had any trouble following directions

;)

I'll give you some help...
ad the HTML replace code to this file: xxx.php
ad the BBCODE code to this file: xxx.php

You can just reply and fill in the xxx's!

thnx, i'm sure I'm not the only one that will thank you.

daza
Registered User
Posts: 7
Joined: Mon Oct 18, 2004 7:12 am

Re: This is How to Simply Embed ANY Youtube & Google Video

Post by daza »

Go to the ACP, go to Posting, go to BB Codes, Add a new BBCode.

Much easier than things were with phpBB2 :)

Locked

Return to “[3.0.x] Support Forum”