YouTube BBCode?

Get help developing custom BBCodes or request one.
ytsejam
Registered User
Posts: 133
Joined: Sat Jan 13, 2007 9:18 pm
Location: Israel
Contact:

Re: YouTube BBCode?

Post by ytsejam »

So none has mentioned this yet here it seems; how do I modify the youtube bbcode to ALSO support the new youtube shortner, youtu.be?
User avatar
Lumpy Burgertushie
Registered User
Posts: 68587
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: YouTube BBCode?

Post by Lumpy Burgertushie »

ytsejam wrote:So none has mentioned this yet here it seems; how do I modify the youtube bbcode to ALSO support the new youtube shortner, youtu.be?
youtube bbcode questions should be asked in the bbcode stickie at the top of this forum.

the old code still works, you just have to choose the old style from the youtube page.

also, you can create a new bbocdeo that uses the iframe embed code.

I do believe it is already done in the bbcode topic above.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
fyantorno
Registered User
Posts: 8
Joined: Wed Mar 14, 2012 3:54 am

Re: YouTube BBCode?

Post by fyantorno »

This works!!!!
Thanks a lot!!!!!!
MADMARY1 wrote:
codenamejames wrote:Hi, I have had the youtube BBcode working in the past, but have recently bridged the forum into Joomla.
Now the existing youtube vids are squashed vertically.

This is what I've been using so far:

BBCode:

Code: Select all

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

Code: Select all

<script language="Javascript">
var a = '{URL}';
var temp = new Array();
temp = a.split('?v=');
document.write('<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/' + temp[1] + '&rel=0&color1=0xd6d6d6&color2=0xf0f0f0&border=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/' + temp[1] + '&rel=0&color1=0xd6d6d6&color2=0xf0f0f0&border=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="344"></embed></object>');
</script>
Helpline:

Code: Select all

Usage: [youtube]URL TO VIDEO[/youtube]
Any ideas why I'm getting these squashed youtube videos?
Here's an example:
http://www.aero.org.nz/forum/16/91

Thanks in advance
Thanks, this is one that worked on all of my boards!!! EXCELLENT!
The009
Registered User
Posts: 2
Joined: Wed Apr 11, 2012 11:55 am

Re: YouTube BBCode?

Post by The009 »

YouTube API has changed a bit.

I would suggest updating the sticky on the YouTube BBCode.

What I am currently using.
BBCode usage:

Code: Select all

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

Code: Select all

<object width="560" height="315">
<param name="movie" value="https://youtube.googleapis.com/v/{SIMPLETEXT}?version=3&fs=1"</param>
<param name="allowFullScreen" value="true"></param>
<param name="allowScriptAccess" value="always"></param>
<embed src="https://youtube.googleapis.com/v/{SIMPLETEXT}?version=3&fs=1"
  type="application/x-shockwave-flash"
  allowfullscreen="true"
  allowscriptaccess="always"
  iv_load_policy="3"
  autohide="1"
  fs="1"
  width="560" height="315">
</embed>
</object>
Help line:

Code: Select all

[youtube]6KCDZoQTCSM[/youtube]

The above mentioned code is using their latest API Data as of today.
michael1961
Registered User
Posts: 46
Joined: Tue Jul 12, 2011 9:50 am

Re: YouTube BBCode?

Post by michael1961 »

Question deleted. I figured it out.
User avatar
Edward572
Registered User
Posts: 162
Joined: Wed Aug 03, 2005 12:37 am
Location: Ontario, Canada
Name: Edward
Contact:

Re: YouTube BBCode?

Post by Edward572 »

My Current Code

BBCode usage

Code: Select all

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

Code: Select all

<object width="640" height="360"><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="640" height="360"></embed></object>
Help line

Code: Select all

Example: [youtube] http://www.youtube.com/watch?v=3KkK35y8MAA[/youtube]
Hello,

I have noticed lately depending what your browser picks up either "http://www.you" or "https://www.you" using the entire address not the just the string. Address's with "https://" do not display the video, for my own posting I just remove the "s" and then it displays the video fine.

My question I prefer using the entire address it makes it easy to copy and paste, is there a way to write the BBCode with like a IF then statement or BBCode equivalent?

Basically no matter what the address is "https" or "http" it will still display the video, either by automatically removing the "s" or allowing both to work with a check statement to play both address versions?

I can add two YouTube button one for secure one for none secure but I think that will confuse that average user.

Any Ideas?

Solved
BBCode usage:

Code: Select all

[youtube]{IDENTIFIER}://{SIMPLETEXT1}youtube.com/watch?v={SIMPLETEXT2}[/youtube]
HTML replacement:

Code: Select all

<object width="640" height="360"><param name="movie" value="{IDENTIFIER}://{SIMPLETEXT1}youtube.com/v/{SIMPLETEXT2}"></param><param name="wmode" value="transparent"></param><embed src="{IDENTIFIER}://{SIMPLETEXT1}youtube.com/v/{SIMPLETEXT2}" type="application/x-shockwave-flash" wmode="transparent" width="640" height="360"></embed></object>
Help line:

Code: Select all

Example Youtube video: [youtube]https://www.youtube.com/watch?v=ffHLIZh0PHg[/youtube]
Solved

Code seems to work with both IDENTIFIER's... (http) & (https)
Read a bit, and self sever I guess...
Cheers Ed
Cheers All, Have A Good One
StormerSoft.Com

Bacon is the greatest food, but someone said no, "Chocolate"
Forum StormerSoft.Com
wtfbollos
Registered User
Posts: 15
Joined: Fri Sep 18, 2015 12:46 am

Re: YouTube BBCode?

Post by wtfbollos »

polle wrote:Any Idea in how to do the same, but using

Code: Select all

[youtube]http://www.youtube.com/watch?v=Asm7WOi8ux8[/youtube]
Instead of

Code: Select all

[youtube]Asm7WOi8ux8[/youtube]
Because all the youtube videos already posted in my site are with the complete address.

Thanks.
+1
User avatar
gianluigi.zanettini
Registered User
Posts: 113
Joined: Fri Sep 07, 2007 9:09 pm
Location: Ferrara, Italy
Contact:

Re: YouTube BBCode?

Post by gianluigi.zanettini »

This is the May-2017, phpBB 3.2 working version:

Code: Select all

[youtube]{IDENTIFIER}://{SIMPLETEXT1}youtube.com/watch?v={IDENTIFIER2}[/youtube]

Code: Select all

<iframe width="640" height="360" src="//www.youtube-nocookie.com/embed/{IDENTIFIER2}?rel=0" frameborder="0" allowfullscreen></iframe>
The user must simply insert the YouTube URL (no "embed").

See it live here
Post Reply

Return to “Custom BBCode Development and Requests”