Warning: The author of this contribution does not provide support for it anymore.

Advanced BBCode Box 3

Awesome Custom BBCodes - Advanced BBCode Box 3

Awesome Custom BBCodes

by VSE » Tue Apr 17, 2012 6:34 am

Here are some useful custom BBCodes you can add to your board and to ABBC3! Just use the posted code to create custom BBCodes within phpBB's ACP.

Go to the ACP's Posting tab and click the Add a New BBcode button to get started.

Some of these have icons included for use with ABBC3's toolbar. Download them from here, and drop them into the styles/abbcode/images folder. Then you can assign them to these new custom BBcodes in the ABBC3 BBCodes settings.

Enjoy!

########################################################################################################################
Soundcloud Player
Embed sound cloud players in posts!
ex-soundcloud.jpg


BBCODE USAGE:

Code: Select all

[soundcloud]{URL}[/soundcloud]

HTML REPLACEMENT:

Code: Select all

<object height="81" width="100%"><param name="movie" value="http://player.soundcloud.com/player.swf?url={URL}&amp;g=bb"></param><param name="allowscriptaccess" value="always"></param><embed allowscriptaccess="always" height="81" src="http://player.soundcloud.com/player.swf?url={URL}&amp;g=bb" type="application/x-shockwave-flash" width="100%"></embed></object>

HELP LINE:

Code: Select all

[soundcloud]http://soundcloud.com/user-name/song-title[/soundcloud]

ICON:
soundcloud.png
soundcloud.png (1.44 KiB) Viewed 10892 times


########################################################################################################################
** DISCONTINUED **
EBAY Widget
Puts an Ebay widget for Ebay auctions in posts
ex-ebay.jpg


BBCODE USAGE:

Code: Select all

[ebay]{NUMBER}[/ebay]

HTML REPLACEMENT:

Code: Select all

<object width="355" height="300"><param name="movie" value="http://togo.ebay.com/togo/togo.swf?2008013100" /><param name="flashvars" value="base=http://togo.ebay.com/togo/&lang=en-us&mode=normal&itemid={NUMBER}&query=synthesizers" /><embed src="http://togo.ebay.com/togo/togo.swf?2008013100" type="application/x-shockwave-flash" width="355" height="300" flashvars="base=http://togo.ebay.com/togo/&lang=en-us&mode=normal&itemid={NUMBER}&query=synthesizers"></embed></object>

HELP LINE:

Code: Select all

[ebay]ebay item number[/ebay] Example: 250367841267

ICON:
ebay.gif
ebay.gif (764 Bytes) Viewed 10175 times

########################################################################################################################
GIST
Embed Gist code in posts!
ex-gist.jpg


BBCODE USAGE:

Code: Select all

[gist]{URL}[/gist]

HTML REPLACEMENT:

Code: Select all

<script src="{URL}.js"> </script>

HELP LINE:

Code: Select all

[gist]URL to GIST page[/gist] Example: https://gist.github.com/1343518

ICON:
github.gif
github.gif (412 Bytes) Viewed 10171 times


########################################################################################################################
In-Line Code
Use for displaying in-line code
ex-inlinecode.jpg


BBCODE USAGE:

Code: Select all

[c]{TEXT}[/c]

HTML REPLACEMENT:

Code: Select all

<code style="font:Monaco, 'Andale Mono', 'Courier New', Courier, monospace 0.9em normal;line-height:1.3em;background-color:#fff;color:#2E8B57;border:1px solid #C9D2D8;padding:0 3px;display:inline;">{TEXT}</code>

HELP LINE:

Code: Select all

In-Line Code: [c]your code[/c]


########################################################################################################################
Website Thumbnails
Shows a thumbnail of the linked site
ex-webthumb.jpg


BBCODE USAGE:

Code: Select all

[web_thumb]{URL}[/web_thumb]

HTML REPLACEMENT:

Code: Select all

<a href="{URL}" title="{URL}" onclick="window.open(this.href); return false;" onkeypress="window.open(this.href); return false;"><img src="http://open.thumbshots.org/image.pxf?url={URL}" width="120" height="90" alt="" style="border:1px solid #C9D2D8;" /><br />{URL}</a>

HELP LINE:

Code: Select all

Web Site Thumbnail: [web_thumb]URL[/web_thumb]

ICON:
thumshots.gif
thumshots.gif (986 Bytes) Viewed 10198 times


########################################################################################################################
Pastebin
Embed Pstebin code in posts!
ex-pastebin.jpg


BBCODE USAGE:

Code: Select all

[pastebin]{IDENTIFIER}[/pastebin]

HTML REPLACEMENT:

Code: Select all

<script src="http://pastebin.com/embed_js.php?i={IDENTIFIER}"></script>

HELP LINE:

Code: Select all

[pastebin]ID from your code[/pastebin]

ICON:
pastebin.gif
pastebin.gif (644 Bytes) Viewed 10702 times



########################################################################################################################
jsFiddle
Embed jsFiddle code in posts!
ex-jsfiddle.jpg


BBCODE USAGE:

Code: Select all

[jsfiddle]{URL}[/jsfiddle]

HTML REPLACEMENT:

Code: Select all

<iframe style="width: 100%; height: 300px" src="{URL}embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>

HELP LINE:

Code: Select all

[jsfiddle]http://jsfiddle.net/pborreli/pJgyu/[/jsfiddle]

ICON:
jsfiddle.png
jsfiddle.png (369 Bytes) Viewed 9719 times


########################################################################################################################
CodePen
Embed CodePen Pens in posts!
ex-codepen.jpg


BBCODE USAGE:

Code: Select all

[codepen]{SIMPLETEXT}[/codepen]

HTML REPLACEMENT:

Code: Select all

<p data-height="268" data-theme-id="0" data-slug-hash="{SIMPLETEXT}" data-default-tab="result" class='codepen'></p>
<script async src="//codepen.io/assets/embed/ei.js"></script>

HELP LINE:

Code: Select all

[codepen]slug[/codepen] Example (at end of url): http://codepen.io/username/pen/slug

ICON:
codepen.png
codepen.png (650 Bytes) Viewed 6434 times
Last edited by VSE on Tue Nov 05, 2013 6:18 pm
Dictated but not read.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.
User avatar
VSE
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 4917
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: Awesome Custom BBCodes

by xptoast » Sun May 06, 2012 1:57 am

It would be nice to know what folder to dump these icons into... I used automod so I have no idea where the icons would go.

Also if I do find the folder I dump the icons into do I have to refresh something in order for the lists of images to update?
xptoast
Registered User
Posts: 66
Joined: Fri Apr 20, 2012 8:39 pm
Contact:

Re: Awesome Custom BBCodes

by VSE » Sun May 06, 2012 3:00 am

They go into styles/abbcode/images/
Dictated but not read.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.
User avatar
VSE
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 4917
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: Awesome Custom BBCodes

by xptoast » Sun May 06, 2012 4:56 am

VSE wrote:They go into styles/abbcode/images/


I dumped them in there yet the images still are not showing up in the dropdown in ABBC3 BBCode options for my soundcloud code... Now what?
xptoast
Registered User
Posts: 66
Joined: Fri Apr 20, 2012 8:39 pm
Contact:

Re: Awesome Custom BBCodes

by VSE » Sun May 06, 2012 6:15 am

xptoast wrote:
VSE wrote:They go into styles/abbcode/images/


I dumped them in there yet the images still are not showing up in the dropdown in ABBC3 BBCode options for my soundcloud code... Now what?


Nope. Im looking for the soundcloud.png in your styles/abbcode/images folder right now and it is not there. You put it in the wrong place. You did not put it in the images folder. Also please stop posting in this thread as this thread is not a support thread.
Dictated but not read.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.
User avatar
VSE
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 4917
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: Awesome Custom BBCodes

by Pixel8r » Fri Jul 27, 2012 9:37 pm

VSE wrote:HTML REPLACEMENT:

Code: Select all

<object width="355" height="300"><param name="movie" value="http://togo.ebay.com/togo/togo.swf?2008013100" /><param name="flashvars" value="base=http://togo.ebay.com/togo/&lang=en-us&mode=normal&itemid={NUMBER}&query=synthesizers" /><embed src="http://togo.ebay.com/togo/togo.swf?2008013100" type="application/x-shockwave-flash" width="355" height="300" flashvars="base=http://togo.ebay.com/togo/&lang=en-us&mode=normal&itemid={NUMBER}&query=synthesizers"></embed></object>


Could you please tell me how to alter this code so that it displays the UK eBay with prices displayed in £ rather than $.
24knews.com - We live on the edge of chaos.
User avatar
Pixel8r
Registered User
Posts: 177
Joined: Mon Nov 30, 2009 4:39 pm
Contact:

Re: Awesome Custom BBCodes

by Pixel8r » Fri Jul 27, 2012 9:44 pm

Pixel8r wrote:Could you please tell me how to alter this code so that it displays the UK eBay with prices displayed in £ rather than $.

I think I have just answered my own question and seen that actually it isn't possible currently.

http://togo.ebay.co.uk :(
24knews.com - We live on the edge of chaos.
User avatar
Pixel8r
Registered User
Posts: 177
Joined: Mon Nov 30, 2009 4:39 pm
Contact:

Re: Awesome Custom BBCodes

by TheDani » Sat Mar 09, 2013 1:12 am

Website Thumbnails - does this still works? I just get an image saying "thumbshots.com / image coming soon". Do I have to wait for a very long time?
TheDani
Registered User
Posts: 356
Joined: Tue Apr 10, 2012 12:48 pm
Contact:

Re: Awesome Custom BBCodes

by TheDani » Sat Mar 09, 2013 1:12 am

delete
TheDani
Registered User
Posts: 356
Joined: Tue Apr 10, 2012 12:48 pm
Contact:

Re: Awesome Custom BBCodes

by potku » Sun Mar 10, 2013 12:41 am

It works, but it is now limited to 5.000 hits a month, which is nothing on any busier board. If you want more hits, you need to cough it up. That's a shame. I used to love that BBCode. I hope an alternative will surface soon. Why does money always have to spoil everything good...
Potku.net

"Before I speak, I have something important to say."

- Groucho Marx
User avatar
potku
Registered User
Posts: 850
Joined: Wed Dec 22, 2004 10:26 pm
Location: Tampere, Finland
Contact:

Re: Awesome Custom BBCodes

by ShredDead » Mon Nov 04, 2013 11:53 pm

Magnet Link

I've noticed that there are some requests on google for a Magnet BBCode that can be useful.

BBCode Usage

Code: Select all

[magnet]magnet:?xt=urn:btih:{TEXT}[/magnet]


HTML replacement

Code: Select all

<script type="text/javascript">

var str="{TEXT}";

if (str.match("dn="))
{
var fn=decodeURI("{TEXT}");
while (fn.indexOf("+")>0) fn=fn.replace("+", " ");
str1 = fn.split("&");
cont = str1.length;

for(a=0; a< cont; a++)
{
    if (str1[a].match("dn="))
{
str2 = str1[a].slice(7);
var s="<img src='./styles/abbcode/images/Magnet.png'> "+" <a href='magnet:?xt=urn:btih:" + str +"'>" + str2 + "</a>  ";
document.write(s);
}
}
}

else
{
var s="<img src='./styles/abbcode/images/Magnet.png'> "+" <a href='magnet:?xt=urn:btih:" + str +"'>Magnet Link</a>  ";
document.write(s);
}

</script>


Help Line

Code: Select all

Magnet Link: [magnet]magnet:?xt=urn:...[/magnet] (full link)


:!: I've read that this is not safe because of using the {TEXT} var and if so, what changes are needed to a have a safe operation.


:?: The above BBCode does work but the only thing is, that it does NOT show within the HTML replacement code : "Magnetic Link" -- instead the description is shown that is part of the Magnet Link.

Thank you for any help and for supplying a great MOD. :D
User avatar
ShredDead
Registered User
Posts: 20
Joined: Tue Nov 23, 2010 9:25 pm
Contact:

Re: Awesome Custom BBCodes

by VSE » Tue Nov 05, 2013 12:29 am

ShredDead wrote:Magnet Link
:!: I've read that this is not safe because of using the {TEXT} var and if so, what changes are needed to a have a safe operation.

:?: The above BBCode does work but the only thing is, that it does NOT show within the HTML replacement code : "Magnetic Link" -- instead the description is shown that is part of the Magnet Link.

Thank you for any help and for supplying a great MOD. :D


That is VERY UNSAFE! Anybody could use that BBcode as written to do some nasty XSS injections. You never wanna let a user be able to add input to javascript code like that. It depends on what the values of TEXT can be. It should be URL if it's a url. Otherwise try SIMPLETEXT or INTTEXT. These are described in full in the ACP -> BBcodes. If none of those tokens will work, then you should not use it.
Dictated but not read.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.
User avatar
VSE
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 4917
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: Awesome Custom BBCodes

by Ancient Viking » Tue Nov 05, 2013 1:03 pm

Thanks for the list of awesome custom BBCode in ABBC3. :)

I've already tried the BBCode 'in-line code' tag in ABBC3 as soon I notice it and I use the transparent "C" icon image (black and white) there is available in ABBC3 a least it was in previous version.
My local forum: egetforum.nu - Offline Forum Online!
User avatar
Ancient Viking
Registered User
Posts: 425
Joined: Sun Jan 15, 2012 11:43 pm
Contact:

Re: Awesome Custom BBCodes

by ShredDead » Tue Nov 05, 2013 2:52 pm

VSE wrote:That is VERY UNSAFE! Anybody could use that BBcode as written to do some nasty XSS injections. You never wanna let a user be able to add input to javascript code like that. It depends on what the values of TEXT can be. It should be URL if it's a url. Otherwise try SIMPLETEXT or INTTEXT. These are described in full in the ACP -> BBcodes. If none of those tokens will work, then you should not use it.


I tried the above suggestions and this did NOT work. I decided to keep this available for myself and Global Moderator since one should only trust these two. Maybe within time you could see about incorporating this Magnet and Torrent URL function into BBCode. Again, thanks for clarifying the security issue.
User avatar
ShredDead
Registered User
Posts: 20
Joined: Tue Nov 23, 2010 9:25 pm
Contact:

Re: Awesome Custom BBCodes

by ShredDead » Wed Nov 20, 2013 9:45 pm

:idea: Hidden Content Until Reply

I haven't seen within the updates that there is a BBCode to allow for Viewing Content

Code: Select all

[hidden]text[/hidden]
AFTER a Reply has been given. There are a few within the Database but have been abandoned or are for an older version of phpBB.

Will you work on implementing this feature here so that users can add a custom BBCode that will work?
User avatar
ShredDead
Registered User
Posts: 20
Joined: Tue Nov 23, 2010 9:25 pm
Contact: