Custom BBCodes [Deprecated]

Get help developing custom BBCodes or request one.
rojasPT
Registered User
Posts: 7
Joined: Wed Dec 02, 2009 2:13 am

Re: Custom BBCodes

Post by rojasPT » Tue Mar 15, 2011 12:10 pm

I tried this code and the link on the first line too don't make clickable without [url].

Image

User avatar
TheSnake
Registered User
Posts: 483
Joined: Wed Aug 09, 2006 10:36 pm
Location: Staffordshire, England, UK
Contact:

Re: Custom BBCodes

Post by TheSnake » Tue Mar 15, 2011 1:13 pm

I'm not sure why it's doing that, but to make it work, just input a single line message at the top, before any links.

Example:

Code: Select all

[spoiler]This is the my links test
http://www.google.com/
http://www.yahoo.com/
http://www.phpbb.com/[/spoiler]
Something like that definately works (I've just tested it on my website).

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 » Tue Mar 15, 2011 10:00 pm

TheSnake wrote:I'm not sure why it's doing that, but to make it work, just input a single line message at the top, before any links.

[...]

Something like that definately works (I've just tested it on my website).
What about just a carriage return or a space? I'm going to guess that "magic URLs" require whitespace before them. For example, check this out --->http://svpocketpc.com

Notice that didn't get changed to a link? Now check this out ---> http://svpocketpc.com

Voila!

This is similar to why some people get broken links if they put punctuation after the URL, like this -- http://svpocketpc.com-- which does get turned into a link, but that link fails because there's no space before the hyphens.

Maybe whitespace would work with the original poster's code, too.

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
TheSnake
Registered User
Posts: 483
Joined: Wed Aug 09, 2006 10:36 pm
Location: Staffordshire, England, UK
Contact:

Re: Custom BBCodes

Post by TheSnake » Tue Mar 15, 2011 11:12 pm

Magic URL's probably do require whitespace, however I tried the whitespace to make it work, nope, it definately requires at least a single character & whitespace before the first URL to make them all show as an active URL & not just text.

Using [ url ][ /url ] however, has no problems whatsoever. No extra whitespace or characters needed. :D

I'm not sure why the person wanted to specifically have it without the use of URL BBCode, but it does work nonetheless.

rojasPT
Registered User
Posts: 7
Joined: Wed Dec 02, 2009 2:13 am

Re: Custom BBCodes

Post by rojasPT » Wed Mar 16, 2011 12:28 am

I wanted to without [url] to be more user friendly.

Thanks Pony99CA and TheSnake.

User avatar
TheSnake
Registered User
Posts: 483
Joined: Wed Aug 09, 2006 10:36 pm
Location: Staffordshire, England, UK
Contact:

Re: Custom BBCodes

Post by TheSnake » Wed Mar 16, 2011 12:59 am

Depending on what your trying to accomplish with the use of BBCodes, sometimes it has to have multiple bbcodes to make something work, sometimes not.

That's ok, if you want to continue using it without using the [ url ] bbcode, just ensure your users post a comment or something before their first link within the Spoiler, & all the links will work. :D

digitaltoast
Registered User
Posts: 103
Joined: Thu Oct 18, 2007 9:33 am

Re: Custom BBCodes

Post by digitaltoast » Wed Mar 16, 2011 8:49 am

I'd like users to be able to embed the PIcasa Gallery Jquery Plugin:
http://plugins.jquery.com/project/EmbedPicasaGallery

We're already loading jquery and head.js in the head, so all I'd need to do would be have some kind of bbcode that the user could wrap around their picasaweb gallery. When the link was clicked, it would load the div and js, expand and page, their thumbnails would load, and the EmbedPicasaGallery would work it's lightbox magic on the images.

While I could do that on a normal page, I can see that it could almost certainly be done with bbcode, but I appear to be lacking the brain capacity to work it out.

Any help appreciated!

Michael Regan
Registered User
Posts: 55
Joined: Thu Jan 07, 2010 10:05 pm

Re: Table BBCodes

Post by Michael Regan » Wed Mar 16, 2011 4:06 pm

Pony99CA wrote:Whoa, where's the context.
As addressed to Steve, he would understand I would assume. Otherwise following the thread works ;)
Presuming that you're talking about your table codes, they should work.
I wanted to ensure that the hard enter problem in creating a table code did not replicate in the creation of table codes for others as this was what my posted code is meant to eliminate. It allows hard enters within the coding and some code layout to make revising much easier.
That's basically all mine do (although I added the ability to support row- and column-spanning)
I created secondary table codes for spanning but the simplified codes are in place for those who don't need the extra functionality.

blw911
Registered User
Posts: 81
Joined: Wed Dec 15, 2004 2:23 am

Re: Custom BBCodes

Post by blw911 » Thu Mar 17, 2011 7:03 pm

Anyone got the new version of Photobucket videos to work, I've tried all the old stuff in this thread and google and nothing works for me??

User avatar
oriolesprospects
Registered User
Posts: 372
Joined: Mon Jan 25, 2010 10:12 pm

Re: Custom BBCodes

Post by oriolesprospects » Fri Mar 18, 2011 12:14 am

Is there any way to embed a tweet?

User avatar
Rotten Apple
Registered User
Posts: 211
Joined: Wed Oct 06, 2010 2:27 am
Location: Florida, USA
Name: Vicky
Contact:

Re: Custom BBCodes

Post by Rotten Apple » Fri Mar 18, 2011 4:21 pm

Hi everyone! I’m working on trying to program a BBCode that looks like the below but I can’t get it to work. I want this code to appear in the BBCode list with the formatting shown below, but when I try coding the HTML and BBCode part in the custom BBCode fields it (again) says it’s invalid. I originally tried doing this awhile back and don’t have access to the HTML code I tried before, but I’m wondering if anyone else has any ideas on how to get it to work.

The BBCode format members are using now: (They have to copypaste this all the time, but like I've said, I want it to appear alongside the BBCodes in the posting page and turn it (again) into a custom BBCode.)

Code: Select all

[list][*][b]Date and Time[/b]: Your text here.
[*][b]Setting[/b]: Your text here.
[*][b]Weather Conditions[/b]: Your text here.
[*][b]Status[/b]: Private, open, invitation only, complete.
[*][b]Rated[/b]: PG, PG-13, R.
[*][b]Characters allowed[/b]: Your text here.
[*][b]Continued from[/b]: Your text here.
[*][b]Notes[/b]: Text here.[/list]
The code itself should turn out like this:
  • Date and Time: Your text here.
  • Setting: Your text here.
  • Weather Conditions: Your text here.
  • Status: Private, open, invitation only, complete.
  • Rated: PG, PG-13, R.
  • Characters allowed: Your text here.
  • Continued from: Your text here.
  • Notes: Text here.
Also, is there a way to name this "stamp" in the custom BBCode?

And as always, thanks in advanced. I appreciate the help!

User avatar
TheSnake
Registered User
Posts: 483
Joined: Wed Aug 09, 2006 10:36 pm
Location: Staffordshire, England, UK
Contact:

Re: Custom BBCodes

Post by TheSnake » Fri Mar 18, 2011 5:22 pm

Yep, try this.

BBCode Usage:

Code: Select all

[stamp]{TEXT1}|{TEXT2}|{TEXT3}|{TEXT4}|{TEXT5}|{TEXT6}|{TEXT7}|{TEXT8}[/stamp]
HTML Replacement

Code: Select all

<ul>
<li><span style="font-weight: bold">Date and Time:</span> {TEXT1}</li>
<li><span style="font-weight: bold">Setting:</span> {TEXT2}</li>
<li><span style="font-weight: bold">Weather Conditions:</span> {TEXT3}</li>
<li><span style="font-weight: bold">Status:</span> {TEXT4}</li>
<li><span style="font-weight: bold">Rated:</span> {TEXT5}</li>
<li><span style="font-weight: bold">Characters allowed:</span> {TEXT6}</li>
<li><span style="font-weight: bold">Continued from:</span> {TEXT7}</li>
<li><span style="font-weight: bold">Notes:</span> {TEXT8}</li>
</ul>
There is a seperator | which is used to tell phpBB what is the difference between each text field, that seperator must be used for every List Item. Knowing some Countries/Languages have different Keyboard Layouts/Character Sets, if you change the Seperator to a different character/letter/etc, that same charater MUST be used every time, but also MUST NOT be used as part of the text fields.

As this looks like a form of role-play, this is from a quick test

Example:

Code: Select all

[stamp]28-03-2011 20:30 | Tropical | Stormy | Open | R | Demon/Vulture X-breed | New | None[/stamp]
To call the BBCode "Stamp", you just use "stamp" as the name used in the BBCode tags in the BBCode usage box, that then is the name displayed on the button in the posting page.

Code: Select all

[stamp]
Last edited by TheSnake on Fri Mar 18, 2011 8:38 pm, edited 1 time in total.

User avatar
Rotten Apple
Registered User
Posts: 211
Joined: Wed Oct 06, 2010 2:27 am
Location: Florida, USA
Name: Vicky
Contact:

Re: Custom BBCodes

Post by Rotten Apple » Fri Mar 18, 2011 5:44 pm

Thanks for the quick response!

The HTML replacement worked but the BBCode version didn’t. It accepted calling it [stamp] but it won’t make the actual code appear in the thread. It simply treats it like you’re typing something new in (like when you use the bold tags), when the data already exists in the BBCode. For instance, I added in the code you submitted and it turned out like:

[stamp][/stamp]

With nothing in the actual code. Where it says things like “date and time” I wanted it to already appear inputted in the actual code when you click on the BBCode when you’re posting, that way members can simply insert data after the field. Is this even possible? Or is the code you’re showing me above exactly that except styled differently?

User avatar
TheSnake
Registered User
Posts: 483
Joined: Wed Aug 09, 2006 10:36 pm
Location: Staffordshire, England, UK
Contact:

Re: Custom BBCodes

Post by TheSnake » Fri Mar 18, 2011 7:23 pm

I'm not sure what you mean by it accepted it but didn't work, did you copy the contents of the code boxes & paste that directly into your bbcode BBCode usage & HTML replacement? The code should work if you did it correctly, I tested it again on my site & it works perfect.

Example of code used in topic:

Code: Select all

[stamp]28-03-2011 20:30|Tropical|Stormy|Open|R|Demon/Vulture X-breed|New|None[/stamp]
Example of topic page with code in use:
Stamp-BBCode-Test.png
Stamp-BBCode-Test.png (15.54 KiB) Viewed 1442 times
You need to use the seperator, |, in order for phpBB to recognise the 8 seperate bbcode text fields. It might is possible to automatically generate the date & time for the BBCode at usage, I can't guarantee that though, it wasn't specified in the original message. The date & time posted, is just random date & time I manually input, along with the other text information, when using the bbcode. The only styling used in the HTML Replacement, is using CSS to make the Information parts of the List Items in bold, whereas the Text Input fields are just treated as normal text.

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 » Fri Mar 18, 2011 8:11 pm

TheSnake wrote: HTML Replacement

Code: Select all

<ul>
<li><span style="font-weight: bold">Date and Time:</span> {TEXT1}
<li><span style="font-weight: bold">Setting:</span> {TEXT2}
<li><span style="font-weight: bold">Weather Conditions:</span> {TEXT3}
<li><span style="font-weight: bold">Status:</span> {TEXT4}
<li><span style="font-weight: bold">Rated:</span> {TEXT5}
<li><span style="font-weight: bold">Characters allowed:</span> {TEXT6}
<li><span style="font-weight: bold">Continued from:</span> {TEXT7}
<li><span style="font-weight: bold">Notes:</span> {TEXT8}
</ul>
Your code generates invalid XHTML (phpBB is supposed to be XHTML 1.0 Strict). You need </li> tags after all of your {TEXT} elements.

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.

Locked

Return to “Custom BBCode Development and Requests”