Custom BBCodes [Deprecated]

Get help developing custom BBCodes or request one.
1e0n
Registered User
Posts: 23
Joined: Fri May 18, 2007 8:33 pm
Contact:

Re: Custom BBCodes

Post by 1e0n »

Ok ric323, but, even if i put the most simplest url like:

Code: Select all

[googlemaps]http://maps.google.com/[/googlemaps]
i get a googlemap window in my forum like this:

Image


Why am i getting this red area??? :|

Maybe this bbcode is not good for what i want. I want to put a googlemap in my forum for each of my sponsors so the customer can easily find them, but, as you can see this issues occur.
Can you advise me what bbcode to put for what i need?
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: Custom BBCodes

Post by Pony99CA »

1e0n wrote:Ok ric323, but, even if i put the most simplest url like:

Code: Select all

[googlemaps]http://maps.google.com/[/googlemaps]
i get a googlemap window in my forum like this:

[Large Image Removed]

Why am i getting this red area??? :|
Ric explained it well. You need the parameters attached to the URL to display the map like you want, but the phpBB URL tag doesn't handle parameters. The default, like you posted above, will look just like visiting Google Maps online.

FYI, I pasted the entire URL into a normal HTML file and it displayed the map without the "red area". The file looks like this:

Code: Select all

<html>
<head>
<title>The White House</title>
</head>
<body>
<h1>White House Google Map</h1>
<iframe width="625" height="500" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=1600+Pennsylvania+Avenue+Northwest,+Washington,+DC&sll=36.83292,-121.392918&sspn=0.053584,0.129089&ie=UTF8&hq=&hnear=1600+Pennsylvania+Ave+NW,+Washington+D.C.,+District+of+Columbia,+20500&z=14&ll=38.897646,-77.036562&output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&source=embed&hl=en&geocode=&q=1600+Pennsylvania+Avenue+Northwest,+Washington,+DC&sll=36.83292,-121.392918&sspn=0.053584,0.129089&ie=UTF8&hq=&hnear=1600+Pennsylvania+Ave+NW,+Washington+D.C.,+District+of+Columbia,+20500&z=14&ll=38.897646,-77.036562" style="color:#0000FF;text-align:left">View Larger Map</a></small><br />
</html>
1e0n wrote:Maybe this bbcode is not good for what i want. I want to put a googlemap in my forum for each of my sponsors so the customer can easily find them, but, as you can see this issues occur.
Can you advise me what bbcode to put for what i need?
If you have a limited number of sponsors, I would create a normal HTML page for them with their Google map embedded and give your sponsors the URL for that page. Then I'd create a BBCode that just put that map in an IFRAME.

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.
CaeRule
Registered User
Posts: 7
Joined: Fri Jul 09, 2010 1:21 am

Re: Custom BBCodes

Post by CaeRule »

Thank you for this!
merfed
Registered User
Posts: 25
Joined: Sat Jul 10, 2010 12:05 pm

Re: Custom BBCodes

Post by merfed »

I have a custom BBcode to allow users to override the standard css (this is fine as we are a small forum, so security problems are not an issue when I'm managing 15 people).

Basically its this:

Code: Select all

[style]{TEXT}[/style]
HTML Replacement:

Code: Select all

<style type="text/css">{TEXT}</style>
Now everything works as it should except one thing so far, parentheses. When this is entered in:

Code: Select all

[style]body { background: url(LINK TO IMAGE) !important; }[/style]
It converts the parentheses to &#40; and &#41; when rendered to html. Is there any way to prevent this?
updown
Registered User
Posts: 542
Joined: Sat Jan 05, 2008 6:53 am

Re: Custom BBCodes

Post by updown »

FrolicFrog wrote:Has this been posted before ?
Displaying QR-Codes via Google Chart API
http://code.google.com/intl/de/apis/cha ... codes.html
.. for all the Smartphone/App-Users out there ;)

BBCode usage:

Code: Select all

[qrcode]{TEXT}[/qrcode]
HTML replacement:

Code: Select all

<img src= "http://chart.apis.google.com/chart?cht=qr&chs=150x150&chl={TEXT}">
Help line:

Code: Select all

[qrcode]Text,URL,etc[/qrcode]
Any suggestions for replacing {TEXT} inside the html tag ? (IDENTIFIER, SIMPLETEXT, INTTEXT, ... does not work)
I have the same problem whenever I need to pass a specific attribute into an URL, where full TEXT support is necessary. Example:

Code: Select all

<a href="http://myurlxxxx.com/index.php?q={TEXT}">...</a>
FIRST:
I need all chars available, including UTF8 and special chars for a correct URL. Is there an other solution instead of "{TEXT}"?

SECOND:
Is there a documentation or an example anywhere that helps judging the risk of an XSS-vulnerability within these kind of tags in phpBB? Since special-chars like ' < ' or '"' are beeing html-encoded, I've no clue where exactly the problem is. (I found nothing concrete about this by searching intensively).

Thanks in advance for helpful answers!
Spectral
Registered User
Posts: 28
Joined: Wed Jul 07, 2010 12:33 pm

Re: Custom BBCodes

Post by Spectral »

are there a way to embed DivX Plus Web Player Code http://labs.divx.com/WebPlayerCodeGenerator :?: :roll:
r00t
Registered User
Posts: 9
Joined: Sun May 03, 2009 3:20 pm

Re: Custom BBCodes

Post by r00t »

Mp4 & Flv Player BBCode:

BBCode usage:

Code: Select all

[mp4flv]{URL}[/mp4flv]
HTML replacement:

Code: Select all

    <script type='text/javascript' src='http://phpbbsvn.googlecode.com/svn/dosya/swfobject.js'></script>
        <object type="application/x-shockwave-flash" data="http://phpbbsvn.googlecode.com/svn/dosya/mp4player.swf" id="player2" height="480" width="640">
        <param name="movie" value="http://phpbbsvn.googlecode.com/svn/dosya/mp4player.swf">
        <param name="FlashVars" value="&file={URL}">
        <param name="quality" value="best">
        <param name="menu" value="false">
        <param name="allowfullscreen" value="true">
        <param name="wmode" value="transparent">
        </object>
Help line:

Code: Select all

[mp4flv]mp4 or flv video url[/mp4flv]
Lord Byte
Registered User
Posts: 1
Joined: Wed Jul 14, 2010 12:21 am

Re: Custom BBCodes

Post by Lord Byte »

Dunno if anyone else figured it out already, not gonna parse a 185 pages topic for it:

How to parse any youtube URL and show it no matter pre- or suffix.

Code: Select all

BBCODE USAGE

[youtube]{TEXT1}youtube.com/watch?v={SIMPLETEXT}{TEXT2}[/youtube]

HTML REPLACEMENT

<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/{SIMPLETEXT}&hl=en_GB&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/{SIMPLETEXT}&hl=en_GB&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>
Basically TEXT1 captures pretty much anything that ends in youtube.com.
SIMPLETEXT captures only youtube's video, and stops parsing breaking the BBcode if there's anything further behind it! So I added a TEXT2 to jump in as soon as SIMPLETEXT stops (ie at the &).
Both TEXT1 and TEXT2 are further ignored!
^_^ Have fun!
Spectral
Registered User
Posts: 28
Joined: Wed Jul 07, 2010 12:33 pm

Re: Custom BBCodes

Post by Spectral »

Spectral wrote:are there a way to embed DivX Plus Web Player Code http://labs.divx.com/WebPlayerCodeGenerator :?: :roll:
Anyone ? well the code looks like..

Code: Select all

<object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" width="620" height="560" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab">
 <param name="custommode" value="none" />
  <param name="autoPlay" value="false" />
  <param name="src" value="http://www.mysite.com/video/test.avi" />
<embed type="video/divx" src="http://www.mysite.com/video/test.avi" custommode="none" width="620" height="560" autoPlay="false"  pluginspage="http://go.divx.com/plugin/download/">
</embed>
</object>
User avatar
Nekhrun
Registered User
Posts: 3
Joined: Wed Jul 14, 2010 8:57 pm

Embedding a Prezi in phpbb

Post by Nekhrun »

Hello,

I've been trying to write a BBcode for embedding a Prezi on a phpbb board, but today's my first day working with this type of thing. I was successful in adding a YouTube embed button, but I'm missing a few for the Prezi code.

I'd like to have a button that a user could click and just paste the Prezi link, just like many have done with YouTube codes.

Here's a sample embed code from a Prezi: http://prezi.com/rfsnedhqmhqa/thoughts- ... hing-tool/

Code: Select all

<div class="prezi-player"><style type="text/css" media="screen">.prezi-player { width: 550px; } .prezi-player-links { text-align: center; }</style><object id="prezi_rfsnedhqmhqa" name="prezi_rfsnedhqmhqa" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="550" height="400"><param name="movie" value="http://prezi.com/bin/preziloader.swf"/><param name="allowfullscreen" value="true"/><param name="allowscriptaccess" value="always"/><param name="bgcolor" value="#ffffff"/><param name="flashvars" value="prezi_id=rfsnedhqmhqa&lock_to_path=0&color=ffffff&autoplay=no"/><embed id="preziEmbed_rfsnedhqmhqa" name="preziEmbed_rfsnedhqmhqa" src="http://prezi.com/bin/preziloader.swf" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="550" height="400" bgcolor="#ffffff" flashvars="prezi_id=rfsnedhqmhqa&lock_to_path=0&color=ffffff&autoplay=no"></embed></object><div class="prezi-player-links"><p><a title="Ideas and reflections on the effective use of Prezi to support whole class teaching" href="http://prezi.com/rfsnedhqmhqa/thoughts-on-using-prezi-as-a-teaching-tool/">Thoughts on using Prezi as a teaching tool</a> on <a href="http://prezi.com">Prezi</a></p></div></div>
I know that I need to change all of the "rfsnedhqmhqa" to {simpletext} or something like that but I'm just not getting it at the moment. Can anyone help me?
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: Custom BBCodes

Post by Pony99CA »

Spectral wrote:
Spectral wrote:are there a way to embed DivX Plus Web Player Code http://labs.divx.com/WebPlayerCodeGenerator :?:
Anyone ? well the code looks like..

Code: Select all

<object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" width="620" height="560" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab">
 <param name="custommode" value="none" />
  <param name="autoPlay" value="false" />
  <param name="src" value="http://www.mysite.com/video/test.avi" />
<embed type="video/divx" src="http://www.mysite.com/video/test.avi" custommode="none" width="620" height="560" autoPlay="false"  pluginspage="http://go.divx.com/plugin/download/">
</embed>
</object>
Maybe nobody answered because you rolled your eyes at them. :roll:

Anyway, have you tried just replacing the two instances of the (http://www.mysite.com/video/test.avi) URL with {URL} placeholders like this:

Code: Select all

<object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" width="620" height="560" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab">
 <param name="custommode" value="none" />
  <param name="autoPlay" value="false" />
  <param name="src" value="{URL}" />
<embed type="video/divx" src="{URL}" custommode="none" width="620" height="560" autoPlay="false"  pluginspage="http://go.divx.com/plugin/download/">
</embed>
</object>
and defining the tag as:

Code: Select all

[divx]{URL}[/divx]
If you need to control the width and height, you could add placeholders for those, too.

Normally I'd test that, but I'm not interested in downloading a browser plug-in.

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: Embedding a Prezi in phpbb

Post by Oyabun1 »

I suggest you ask a moderator to move your post to the Custom BBCodes topic in the Support forum.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
User avatar
Nekhrun
Registered User
Posts: 3
Joined: Wed Jul 14, 2010 8:57 pm

Re: Embedding a Prezi in phpbb

Post by Nekhrun »

Thanks, done.
User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29299
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Re: Custom BBCodes

Post by Marshalrusty »

And done :)

Original question is:
Nekhrun wrote:Hello,

I've been trying to write a BBcode for embedding a Prezi on a phpbb board, but today's my first day working with this type of thing. I was successful in adding a YouTube embed button, but I'm missing a few for the Prezi code.

I'd like to have a button that a user could click and just paste the Prezi link, just like many have done with YouTube codes.

Here's a sample embed code from a Prezi: http://prezi.com/rfsnedhqmhqa/thoughts- ... hing-tool/

Code: Select all

<div class="prezi-player"><style type="text/css" media="screen">.prezi-player { width: 550px; } .prezi-player-links { text-align: center; }</style><object id="prezi_rfsnedhqmhqa" name="prezi_rfsnedhqmhqa" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="550" height="400"><param name="movie" value="http://prezi.com/bin/preziloader.swf"/><param name="allowfullscreen" value="true"/><param name="allowscriptaccess" value="always"/><param name="bgcolor" value="#ffffff"/><param name="flashvars" value="prezi_id=rfsnedhqmhqa&lock_to_path=0&color=ffffff&autoplay=no"/><embed id="preziEmbed_rfsnedhqmhqa" name="preziEmbed_rfsnedhqmhqa" src="http://prezi.com/bin/preziloader.swf" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="550" height="400" bgcolor="#ffffff" flashvars="prezi_id=rfsnedhqmhqa&lock_to_path=0&color=ffffff&autoplay=no"></embed></object><div class="prezi-player-links"><p><a title="Ideas and reflections on the effective use of Prezi to support whole class teaching" href="http://prezi.com/rfsnedhqmhqa/thoughts-on-using-prezi-as-a-teaching-tool/">Thoughts on using Prezi as a teaching tool</a> on <a href="http://prezi.com">Prezi</a></p></div></div>
I know that I need to change all of the "rfsnedhqmhqa" to {simpletext} or something like that but I'm just not getting it at the moment. Can anyone help me?
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs
User avatar
leviatan21
Registered User
Posts: 2663
Joined: Fri Aug 10, 2007 7:22 am
Location: Buenos Aires, Argentina
Name: Gabriel

Re: Custom BBCodes

Post by leviatan21 »

Nekhrun wrote:Hello,

I've been trying to write a BBcode for embedding a Prezi on a phpbb board, but today's my first day working with this type of thing. I was successful in adding a YouTube embed button, but I'm missing a few for the Prezi code.

I'd like to have a button that a user could click and just paste the Prezi link, just like many have done with YouTube codes.
Try this ( I don't test it ):
BBCode usage

Code: Select all

[prezi]http://prezi.com/{SIMPLETEXT}/{TEXT}/[/prezi]
HTML replacement

Code: Select all

<object id="prezi_{SIMPLETEXT}" name="prezi_{SIMPLETEXT}" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="550" height="400"><param name="movie" value="http://prezi.com/bin/preziloader.swf"/><param name="allowfullscreen" value="true"/><param name="allowscriptaccess" value="always"/><param name="bgcolor" value="#ffffff"/><param name="flashvars" value="prezi_id={SIMPLETEXT}&lock_to_path=0&color=ffffff&autoplay=no"/><embed id="preziEmbed_{SIMPLETEXT}" name="preziEmbed_{SIMPLETEXT}" src="http://prezi.com/bin/preziloader.swf" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="550" height="400" bgcolor="#ffffff" flashvars="prezi_id={SIMPLETEXT}&lock_to_path=0&color=ffffff&autoplay=no"></embed></object>
Help line

Code: Select all

[prezi]prezi link[/prezi]
Excuse me for my poor English, I speak Spanish. | Image phpBB en Español
Locked

Return to “Custom BBCode Development and Requests”