Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
by Marshalrusty » Tue Sep 11, 2007 3:34 am
Below are the popular custom BBCodes that are frequently asked for on this board. All in one place with descriptions and screenshots for your convenience

To use any of the following custom BBCodes, navigate to the
Posting =>
BBCodes section of the phpBB3 administration panel and click the "Add a new BBCode" button. Enter the respective code from below into the "BBCode usage" and "HTML replacement" boxes.
If you are using phpBB2, you can find compatible BBCode MODs in the
BBCode section of the MOD database.
IndexYoutube (embed video in post)
Using the full URI
Description: Allows you to embed Youtube videos in your posts using the full URI of the video.
Demo:

BBCode 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>
Using only the video ID
Description: Allows you to embed Youtube videos in your posts using only the video id.
Demo:

BBCode usage:
- Code: Select all
[youtube]{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>
Google Video (embed video in post)
Using the full URI
Description: Allows you to embed Google videos in your posts using the full URI of the video.
Demo:

BBCode usage:
- Code: Select all
[googlevid]http://video.google.com/videoplay?docid=-{NUMBER}[/googlevid]
HTML Replacement:
- Code: Select all
<embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId={NUMBER}&hl=en" flashvars=""></embed>
Using only the video ID
Description: Allows you to embed Google videos in your posts using only the video id.
Demo:

BBCode usage:
- Code: Select all
[googlevid]{NUMBER}[/googlevid]
HTML Replacement:
- Code: Select all
<embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId={NUMBER}&hl=en" flashvars=""></embed>
Align (left, center, right) Description: Allows you to align text/images to the left/right/center.
Demo:

Center
BBCode usage:
- Code: Select all
[center]{TEXT}[/center]
HTML Replacement:
- Code: Select all
<div align="center">{TEXT}</div>
Right
BBCode usage:
- Code: Select all
[right]{TEXT}[/right]
HTML Replacement:
- Code: Select all
<div align="right">{TEXT}</div>
Left
BBCode usage:
- Code: Select all
[left]{TEXT}[/left]
HTML Replacement:
- Code: Select all
<div align="left">{TEXT}</div>
Hint: Unless you use a RTL (right to left) language, everything will align to the left by default anyway.
Horizontal rule Description: Inserts a horizontal rule (line) into a post.
Demo:

BBCode usage:
- Code: Select all
[hr]{IDENTIFIER}[/hr]
HTML Replacement:
- Code: Select all
<hr title="{IDENTIFIER}" />
Spoiler Description: Adds a black background color to the text between the tags, making it unreadable unless higlighted. Unlike the other methods of going about this, this code does not use Javascript (which some users disable) and is therefore, at least in my opinion, the best way to do it.
Demo:

BBCode usage:
- Code: Select all
[spoiler]{TEXT}[/spoiler]
HTML Replacement:
- Code: Select all
<span style="background:#000000">{TEXT}</span>
To be added soon:
- background color
- <strike>
- <sub>
- <sup>
- rtl text
- font
- etc.
If you have any suggestions or find an error in the above article, please do not hesitate to PM me.
For more BBCodes see this knowledge base article:
Adding Custom BBCodes in phpBB3
Last edited by
ToonArmy on Sat Jan 10, 2009 12:32 am, edited 4 times in total.
Reason: Topic icon changed
-

Marshalrusty
- Support Team Leader

-
- Posts: 26495
- Joined: Mon Nov 22, 2004 10:45 pm
- Location: New York City
-
by dumdum1974 » Tue Sep 11, 2007 7:04 am
Maybe this is stupid question

but I tought:
Is it possible to have media media player embedded in forum lets say like you have external link for your movie than you add BBcode and player starting like with those 2 of google and youtube?
btw: GREAT POST M8

-
dumdum1974
- Registered User
-
- Posts: 59
- Joined: Mon Sep 10, 2007 12:16 pm
-
by RedTrinity » Tue Sep 11, 2007 1:21 pm
Marshalrusty, I think the You Tube codes are mixed up?
[youtube]http://youtube.com/watch?v={TEXT}[/youtube] = option using just video ID
[youtube]{TEXT}[/youtube] = option using full URL
Just thought I would let you know as you appear to have them back to front

Otherwise this is a fantastic thread, thanks for the assistance with BBCodes!
-

RedTrinity
- Registered User
-
- Posts: 1332
- Joined: Sat May 06, 2006 3:32 am
by jnhrtmn » Tue Sep 11, 2007 2:42 pm
Is it possible to indent the first line of a paragraph with a custom bbcode?
-
jnhrtmn
- Registered User
-
- Posts: 14
- Joined: Sun Sep 02, 2007 2:29 am
-
by jnhrtmn » Tue Sep 11, 2007 4:40 pm
I figured out a way to indent the first line of a paragraph. In the Posting/bbcodes panel:
- Code: Select all
[Tab]{TEXT}[/Tab]
- Code: Select all
<span style="margin-left: {TEXT}px;"></span>
You get this,
[Tab][/Tab]
Enter a number between them that will be a margin measured in pixels.
[Tab]35[/Tab] Creates a normal indent. I'm not sure about other browsers' style issues (other than IE).
-
jnhrtmn
- Registered User
-
- Posts: 14
- Joined: Sun Sep 02, 2007 2:29 am
-
by Marshalrusty » Tue Sep 11, 2007 10:09 pm
RedTrinity wrote:Marshalrusty, I think the You Tube codes are mixed up?
[youtube]http://youtube.com/watch?v={TEXT}[/youtube] = option using just video ID
[youtube]{TEXT}[/youtube] = option using full URL
Just thought I would let you know as you appear to have them back to front

I believe you are mistaken

Note my HTML replacement.
jnhrtmn wrote:I figured out a way to indent the first line of a paragraph. In the Posting/bbcodes panel:
- Code: Select all
[Tab]{TEXT}[/Tab]
- Code: Select all
<span style="margin-left: {TEXT}px;"></span>
You get this,
[Tab][/Tab]
Enter a number between them that will be a margin measured in pixels.
[Tab]35[/Tab] Creates a normal indent. I'm not sure about other browsers' style issues (other than IE).
If you're going to do that, then change the {TEXT} to {NUMBER}. It's a good idea to keep tags as tight as possible.
-

Marshalrusty
- Support Team Leader

-
- Posts: 26495
- Joined: Mon Nov 22, 2004 10:45 pm
- Location: New York City
-
by N.emesis » Wed Sep 12, 2007 1:19 am
Ive added the BBcode but nothing happens when i post. I dont see the video.
I used this:
- Code: Select all
[youtube]http://youtube.com/watch?v={SIMPLETEXT}[/youtube]
And this for the html right:
- 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/{TEXT}" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>
Well ive done that and nothing happens. One note to is the video still able to work when the url changes to
htt://nl.youtube.com/watch?v=32DF3e3 Because its automatically being added by youtube because i live in The Netherlands.
so what could possibly been wrong?
-
N.emesis
- Registered User
-
- Posts: 6
- Joined: Tue Sep 11, 2007 5:58 pm
-
by N.emesis » Wed Sep 12, 2007 1:22 am
I found the problem that was causing that it was this:
- Code: Select all
[youtube]http://youtube.com/watch?v={SIMPLETEXT}[/youtube]
The SIMPLETEXT code was somehow not the good one and i changed it to:
- Code: Select all
[youtube]http://youtube.com/watch?v={TEXT}[/youtube]
So works perfectly,good job for these mods keep up the good work.
-
N.emesis
- Registered User
-
- Posts: 6
- Joined: Tue Sep 11, 2007 5:58 pm
-
by Marshalrusty » Wed Sep 12, 2007 2:11 am
There was an error in the above code. I had accidentally left {TEXT} in one place and put {SIMPLETEXT] in another. Please grab the updated code above.
-

Marshalrusty
- Support Team Leader

-
- Posts: 26495
- Joined: Mon Nov 22, 2004 10:45 pm
- Location: New York City
-
by kidgeon » Wed Sep 12, 2007 2:31 am
First off, beautiful post

Just one note, at first I couldnt get the youtube url code to work, but after adding the "www" in the code it made the difference.
[youtube]http://youtube.com/watch?v={SIMPLETEXT}[/youtube]
I changed it to
[youtube]http://www.youtube.com/watch?v={SIMPLETEXT}[/youtube]
Thanks a million
-
kidgeon
- Registered User
-
- Posts: 18
- Joined: Sat Aug 18, 2007 2:13 am
- Location: USA
-
by N.emesis » Wed Sep 12, 2007 4:49 am
Marshalrusty,
one question i got is when im viewing a video on youtube and click and copy the wacth link this is included:
- Code: Select all
http://nl.youtube.com/watch?v=0BDyqwwEdt4
You see the
nl is being included so you have to manually remove it when you try let it work so it be like this:
- Code: Select all
http://youtube.com/watch?v=0BDyqwwEdt4
Is there a way to add some thing in the code without having to remove the nl ?
-
N.emesis
- Registered User
-
- Posts: 6
- Joined: Tue Sep 11, 2007 5:58 pm
-
by Marshalrusty » Wed Sep 12, 2007 5:05 am
Depending on the domain name you enter to view Youtube, it will show videos using a different subdomain (
http://www.youtube.com, uk.youtube.com, etc.). In this case, the BBCode would only work with the domain that you configure. So if you have
http://www.youtube.com, then everyone would need to change the URI to that to get it to work.
If you have an international site where people might be viewing Youtube from different domains, then you might want to use the second method that only asks for the id:
viewtopic.php?f=46&t=579376#youtube2
-

Marshalrusty
- Support Team Leader

-
- Posts: 26495
- Joined: Mon Nov 22, 2004 10:45 pm
- Location: New York City
-
by Brian_RTL » Wed Sep 12, 2007 11:06 pm
Great job getting these all in one locatinon Marshalrusty! I'm bookmarking this thread.
Does anyone else need a non-breaking space ( )? That's the only other BBCode I've added.
I've been messing around with adding form tags with BBCode. Has great scorn already been heaped on this idea in a different thread that someone could point me to? I assume the security risks might be too high, even in a private forum but it would be nice to have a simpler creation method for small forms.
-
Brian_RTL
- Registered User
-
- Posts: 43
- Joined: Fri Jul 07, 2006 11:37 pm
- Location: California
-
by Gunnar » Fri Sep 14, 2007 12:53 am
i reccomend updating the first post with all fixes and such
MSN Soapbox: BBCode usage:- Code: Select all
[soapbox]http://soapbox.msn.com/video.aspx?vid={SIMPLETEXT}[/soapbox]
HTML Replacement: - Code: Select all
<embed src="http://images.soapbox.msn.com/flash/soapbox1_1.swf" quality="high" width="432" height="364" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://macromedia.com/go/getflashplayer" flashvars="c=v&v={SIMPLETEXT}" ></embed>
Last edited by
Gunnar on Fri Sep 14, 2007 12:59 am, edited 1 time in total.
-
Gunnar
- Registered User
-
- Posts: 55
- Joined: Sun Sep 09, 2007 11:54 am
-
Return to 3.0.x Support Forum
Who is online
Users browsing this forum: airwolf85, cletis26, demnia, DjMorley, elephantspike, GenderBender, Google [Bot], Guybor, HGN, Jessi, JimA, Kellanved, Lumpy Burgertushie, Pit$Bull, r3delmasry, Ripper®, slh550, SuSpanS, TCR_500 and 76 guests