Custom BBCodes [Deprecated]

Get help developing custom BBCodes or request one.
Akexis
Registered User
Posts: 10
Joined: Wed Jun 30, 2010 10:46 pm

Re: Custom BBCodes

Post by Akexis » Thu Jul 01, 2010 7:50 pm

Noxwizard - I owe you a steak dinner.

JakeM0412
Registered User
Posts: 6
Joined: Fri Jul 02, 2010 11:45 am

Re: Custom BBCodes

Post by JakeM0412 » Fri Jul 02, 2010 11:56 am

I hope someone might be able to help me...

I'm trying to embed a couple of things into my forum, but I'm not having much luck. I've followed instructions that seemed to fit my situation on here, but no joy.

The first one is a quiz, and this is the embed code that site provides:

Code: Select all

<img style="visibility:hidden;width:0px;height:0px;" border=0 width=0 height=0 src="http://counters.gigya.com/wildfire/IMP/CXNID=2000002.0NXC/bT*xJmx*PTEyNzgwNzE1NDMyMDUmcHQ9MTI3ODA3MTY*MzgzNyZwPTIwNDMyMSZkPSZnPTEmbz1iNGFhYzM4YmE2MjU*MjljODI1/ZGVkYWRlNjM*ZDViZSZvZj*w.gif" /><iframe src="http://www.mystudiyo.com/act117731/mini/go/know_your_sprouse_-_quiz_1" width="380" height="400" frameborder="0" scrolling="no" name="mystudiyoIframe" title="MyStudiyo.com"><a href="http://www.mystudiyo.com/act117731/mini/go/know_your_sprouse_-_quiz_1">know_your_sprouse_-_quiz_1</a></iframe>				

The second one is a jigsaw, and this is the code that site provides:

Code: Select all

<iframe width="100%" height="600" frameborder="0" src="http://www.jigsawplanet.com/?id=edc9911a68dcf2f1&iframe=1" title="Mauii - 31 - online jigsaw puzzle - 104 pieces">[Your web browser does not support frames or is currently configured not to display frames. However, you may visit <a href="http://www.jigsawplanet.com/?id=edc9911a68dcf2f1" target="_blank">the related page</a>.]</iframe>
If anyone could talk me through how to embed these objects I'd be very grateful.

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 » Sat Jul 03, 2010 2:04 am

JakeM0412 wrote:I'm trying to embed a couple of things into my forum, but I'm not having much luck. I've followed instructions that seemed to fit my situation on here, but no joy.
It's really not that hard. Assuming that you want to be able to use any quiz or jigsaw, just replace the URLs or unique IDs in the HTML with placeholders, then use the placeholders in the BBCode definitions. (It probably took me longer to write and format the rest of this post than it did to create the BBCodes themselves. :D)
JakeM0412 wrote:The first one is a quiz, and this is the embed code that site provides:

Code: Select all

<img style="visibility:hidden;width:0px;height:0px;" border=0 width=0 height=0 src="http://counters.gigya.com/wildfire/IMP/CXNID=2000002.0NXC/bT*xJmx*PTEyNzgwNzE1NDMyMDUmcHQ9MTI3ODA3MTY*MzgzNyZwPTIwNDMyMSZkPSZnPTEmbz1iNGFhYzM4YmE2MjU*MjljODI1/ZGVkYWRlNjM*ZDViZSZvZj*w.gif" /><iframe src="http://www.mystudiyo.com/act117731/mini/go/know_your_sprouse_-_quiz_1" width="380" height="400" frameborder="0" scrolling="no" name="mystudiyoIframe" title="MyStudiyo.com"><a href="http://www.mystudiyo.com/act117731/mini/go/know_your_sprouse_-_quiz_1">know_your_sprouse_-_quiz_1</a></iframe>
In this one, I just replaced the quiz URL and the text string (in case IFRAMES wouldn't work).

BBCode Usage

Code: Select all

[quiz={URL}]{TEXT}[/quiz]
HTML Replacement

Code: Select all

<img style="visibility:hidden;width:0px;height:0px;" border=0 width=0 height=0 src="http://counters.gigya.com/wildfire/IMP/CXNID=2000002.0NXC/bT*xJmx*PTEyNzgwNzE1NDMyMDUmcHQ9MTI3ODA3MTY*MzgzNyZwPTIwNDMyMSZkPSZnPTEmbz1iNGFhYzM4YmE2MjU*MjljODI1/ZGVkYWRlNjM*ZDViZSZvZj*w.gif" /><iframe src="{URL}" width="380" height="400" frameborder="0" scrolling="no" name="mystudiyoIframe" title="MyStudiyo.com"><a href="{URL}">{TEXT}</a></iframe>
Quiz example
JakeM0412 wrote:The second one is a jigsaw, and this is the code that site provides:

Code: Select all

<iframe width="100%" height="600" frameborder="0" src="http://www.jigsawplanet.com/?id=edc9911a68dcf2f1&iframe=1" title="Mauii - 31 - online jigsaw puzzle - 104 pieces">[Your web browser does not support frames or is currently configured not to display frames. However, you may visit <a href="http://www.jigsawplanet.com/?id=edc9911a68dcf2f1" target="_blank">the related page</a>.]</iframe>
In this one, I just replaced the jigsaw ID and the text string (in case IFRAMES wouldn't work).

BBCode Usage

Code: Select all

[jigsaw={IDENTIFIER}]{TEXT}[/jigsaw]
HTML Replacement

Code: Select all

<iframe width="100%" height="600" frameborder="0" src="http://www.jigsawplanet.com/?id={IDENTIFIER}&iframe=1" title="Mauii - 31 - online jigsaw puzzle - 104 pieces">[Your web browser does not support frames or is currently configured not to display frames. However, you may visit <a href="http://www.jigsawplanet.com/?id={IDENTIFIER}]{" target="_blank">{TEXT}</a>.]</iframe>
Jigsaw example

If you just want those specific items, just create empty BBCode tags with no placeholders and paste the HTML you were given directly into the HTML Replacement box.

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.

JakeM0412
Registered User
Posts: 6
Joined: Fri Jul 02, 2010 11:45 am

Re: Custom BBCodes

Post by JakeM0412 » Sat Jul 03, 2010 2:36 am

Thanks so much for the reply and for taking the time to make those codes - I really appreciate it.

I'm sorry but I'm still not quite getting it - I used your codes in the ACP and got those buttons (Quiz and Jigsaw) to appear above the posting panel when replying on the threads, but I'm afraid I can't figure out what to post between the brackets in my post to get the quiz or puzzle to show up. All I get is the text showing up between the tags when I post.

I tried the code the site gives, the code in your HTML replacement, and just stripping back to the url...

Sorry I'm so slow on the uptake with this - any idea what I'm doing wrong, or what settings I haven't got right?

JakeM0412
Registered User
Posts: 6
Joined: Fri Jul 02, 2010 11:45 am

Re: Custom BBCodes

Post by JakeM0412 » Sat Jul 03, 2010 12:48 pm

Steve - I just figured it out! Again, thank you SO much for the time you put in!

For anyone that might be as borderline retarded as me - the problem was that I had to find the id for the actual quiz or puzzle in the web address, and place JUST that after the equal sign WITHIN the first BBCode bracket in my post.

Really grateful for your efforts Steve - I NEVER would have figured out how to embed these things on my own.

Thank you!

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 » Sat Jul 03, 2010 8:22 pm

JakeM0412 wrote:For anyone that might be as borderline retarded as me - the problem was that I had to find the id for the actual quiz or puzzle in the web address, and place JUST that after the equal sign WITHIN the first BBCode bracket in my post.
Technically, for the quiz, you're not replacing the ID -- you're using the full quiz URL. The Jigsaw tag uses the ID, though, because that seemed easier to pick out.

Anyway, for future reference, if you have the original HTML and some BBCode HTML replacement, look at them written out one above the other and see where the differences are. That shows you what needs to go into the placeholders.

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.

JakeM0412
Registered User
Posts: 6
Joined: Fri Jul 02, 2010 11:45 am

Re: Custom BBCodes

Post by JakeM0412 » Sun Jul 04, 2010 12:26 am

Ok, that makes sense - after embedding a few more I'm beginning to get more of a feel for what you mean and how this coding works. It's really quite a nifty system - again thanks for your time and patience - I'm very new to this.

Not sure I'd be able to create my own BBCode just yet - although your instructions might just get me there.


A kind-of-related question, if anyone can help:

I'm wondering if it's possible, or how to go about, embedding a "normal" web-page into a phpbb3 forum.

All I want it for is a "News and Updates" type page, where the latest news, pictures or videos can be shown or announced all on one page, and I can therefore add the newest updates at the top and scrolling down the page shows the less-recent news.

Ideally, I'd like users to be able to get to the news with a single click - or with as few jumps as possible - from the index page.

Also, is it possible that this page only be accessable from the Forum?

I seem to have seen references to something sinilar - so I'm guessing BBCode is the answer - if not, my apologies and could you tell me where I should post this question.

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 » Sun Jul 04, 2010 7:40 pm

JakeM0412 wrote:I'm wondering if it's possible, or how to go about, embedding a "normal" web-page into a phpbb3 forum.
If you want the page actually inside of another phpBB page, you want to use an HTML IFRAME. In fact, your quiz and jigsaw embeds used exactly those.

If you want the page to look like it's part of your board, but still be a separate page, use the Add a New Custom Page to phpBB Knowledge Base article.
JakeM0412 wrote:All I want it for is a "News and Updates" type page, where the latest news, pictures or videos can be shown or announced all on one page, and I can therefore add the newest updates at the top and scrolling down the page shows the less-recent news.

Ideally, I'd like users to be able to get to the news with a single click - or with as few jumps as possible - from the index page.

Also, is it possible that this page only be accessable from the Forum?
You might be able use Web server commands (an htaccess file in Apache) to prevent anybody from viewing the news page who didn't have a REFERER from your board. I'm not an Apache guru, though, so I don't know how to set that up.

Of course, if the news is about your site, why would you want to prevent people from going there directly? Blocking users from doing reasonable things is one of the best ways to get them to stop visiting your site.
JakeM0412 wrote:I seem to have seen references to something sinilar - so I'm guessing BBCode is the answer - if not, my apologies and could you tell me where I should post this question.
You don't really need BBCode for this, so a moderator might want to split this into another Support topic. A typical link should be sufficient to get people to a news page. You'd only need a BBCode if you wanted to embed the news into forum posts.

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.

JakeM0412
Registered User
Posts: 6
Joined: Fri Jul 02, 2010 11:45 am

Re: Custom BBCodes

Post by JakeM0412 » Mon Jul 05, 2010 8:22 am

Thanks again!

I used BBCode to embed the page.

You're right about the restricting permissions thing discouraging people - it's just that this update page would include a lot of the things that would bring users to the forum regularly, and if people could get there without going through the forum it defeats one of the main purposes of making this page (which was to help increase traffic).


I might have to try the New Custom Page thing however, as the page I've embedded is just a fraction too big for the target page - I've increased the size of the frame.

So, one last question - is it possible to resize the page being embedded to fit the frame, and therefore dispense with the sideways scrolling? Again, I'm new to this, but phpbb3 seems to automatically resize big images to fit the forum, could I add any of that coding, or something similar, to get the source page to resize? (if there is a way of reducing the size of the Wordpress source page that would also work - I can't figure out how to do either.)

Again, thanks for the time you have put into answering my questions.

User avatar
tbackoff
Former Team Member
Posts: 7022
Joined: Thu Jun 04, 2009 1:41 am
Location: cheerleading practice
Name: Tabitha Backoff

Re: Custom BBCodes

Post by tbackoff » Tue Jul 06, 2010 3:34 pm

I don't know if this has been posted here, but just for reference, here's mine:

BBCode usage:

Code: Select all

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

Code: Select all

<span style="font-family: monospace;">{TEXT}</span>
Help line:

Code: Select all

Monospaced text: [monospace]text[/monospace]
Display on posting page - checked or unchecked (your preference)
Flying is the second best thrill to cheerleaders; being caught is the first.

User avatar
FrolicFrog
Registered User
Posts: 13
Joined: Sun Nov 23, 2008 10:13 am
Location: Germany
Contact:

Re: Custom BBCodes

Post by FrolicFrog » Tue Jul 06, 2010 8:00 pm

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)

Image
visit my blog : http://forum.dottobi.de/

gonzoron
Registered User
Posts: 6
Joined: Tue Jun 16, 2009 3:30 am

Re: Custom BBCodes not working in signatures

Post by gonzoron » Wed Jul 07, 2010 1:42 am

I'm upgrading my forum from phpbb2 to phpbb3 and there's something that worked in 2 that's not working in 3.

I added a custom bbcode for [center], exactly as in the first post in this thread. It works in message text, but in signatures, it's not replaced with the html, it's just as typed. I have bbcode in sigs enabled, and other bbcode works, but not the custom one.

Ideas?

ETA: problem seems to have resolved itself somehow. wish I knew how, but now it's working.
Last edited by gonzoron on Sun Jul 11, 2010 8:36 pm, edited 1 time in total.

1e0n
Registered User
Posts: 23
Joined: Fri May 18, 2007 8:33 pm
Contact:

Re: Custom BBCodes

Post by 1e0n » Wed Jul 07, 2010 7:55 pm

I have a problem with google map bbcode.

Im using this bbcode:

Code: Select all

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

Code: Select all

<iframe width="550" height="500" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="{URL}"></iframe>

Code: Select all

[googlemaps]link[/googlemaps]
And im geting a small window of the map but with search box and navigaton butons around :|
Is there a problem with some phpbb3 setup or what? The code is very simple and i dont get what im missing...
Im just copyng the link (for example: http://maps.google.com/?ie=UTF8&hq=&hne ... 45976&z=12" )

This is what i get:
Image

User avatar
MasterZ
Registered User
Posts: 712
Joined: Wed Sep 24, 2003 5:33 am
Contact:

Re: Custom BBCodes

Post by MasterZ » Wed Jul 07, 2010 8:53 pm

I have Google Wave successfully embedded in some of my forums, and I thought it would be great to share how I did it.

First up, the BB Code
BB Code

Code: Select all

[wave]https://wave.google.com/wave/waveref/googlewave.com/{TEXT}[/wave]
HTML Code

Code: Select all

<div id="waveframe" style="width:600px; height:450px;"></div><script src="http://www.google.com/jsapi"></script><script type="text/javascript"> google.load("wave", "1"); google.setOnLoadCallback(function() { new google.wave.WavePanel({target: document.getElementById("waveframe")}).loadWave("googlewave.com!{TEXT}");}); </script>

Now get the info from the Wave
Add Public to the wave
Click on Link to wave...
Copy the URL that they give you and put it in the wave tags.

** The code has been updated: http://zenorsoft.com/community/viewtopi ... 1712#p1712 **
Last edited by MasterZ on Sat Jul 10, 2010 12:42 am, edited 1 time in total.

User avatar
ric323
Former Team Member
Posts: 22909
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: Custom BBCodes

Post by ric323 » Wed Jul 07, 2010 10:18 pm

1e0n wrote:I have a problem with google map bbcode.
The"{URL}" tag, ONLY allows a URL to be specified, all the parameters after the URL are stripped off.
You would need a more complex bbcode to handle all the parameters seperately.
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions

Locked

Return to “Custom BBCode Development and Requests”