PDA

View Full Version : New BB Codes


Xaearth
05-13-2008, 06:40 AM
I recently noticed we didn't seem to have the Strikethrough bbcode, so I went ahead and added it and a couple more:

Strikethrough:
Wrapping text with the tags 's' and '/s' results in the text with a line through it.

Usage:
Replacing the () with [] in:
(s)text(/s)
results in:
text

DDO Compendium:
This can be used to link to the DDO Compendium (http://compendium.ddo.com/wiki/Compendium_Home).

Use the tag 'comp=' and '/comp' with the section of the wiki you're linking to after the equal sign. In other words, it works just like the url code except this one has only been tested to work using the optional parameter (the parameter after the = within the tag).

Usage:
Replacing the () with [] in:
(comp=Category:Spells)spells(/comp)
results in:
spells

DDO wiki:
For those of us that aren't on speaking terms with Turbine ;), here's the code for linking to the unofficial ddo wiki.

This one is a bit simpler than the compendium code (Why does Turbine have to do things the hard way? :rolleyes:). Simply use the tags 'ddowiki' and '/ddowiki' with the topic you're linking to as the text. I set it this way because ddowiki is far more often to use plain page topic terms added onto their base url rather than adding categories and directories to the url for every dam single page like the compendium does :rolleyes:.

Usage:
Replacing () with [] in:
(ddowiki)Haggle(/ddowiki)
results in:
Haggle


If you have any questions about how to use these new bb codes, or if there are other bb codes you'd like to see added, feel free to post them here.

Jules
05-13-2008, 10:56 AM
Very nice additions

Jules

Coldin
05-13-2008, 02:09 PM
Maybe we should add in a dice roller for the Pawns of Fate folks? Would that be difficult to add?

lostinjapan
05-13-2008, 11:43 PM
With javascript, anything is possible.

< script language="JavaScript">
random_num = (Math.round((Math.random()*99)+1))
document.write(random_num);
< /script>

I added spaces in each of the script tags to make it visible.

Coldin
05-14-2008, 12:26 AM
Isn't that kind of...complicated to roll just one number?

Xaearth
05-14-2008, 12:59 AM
I'm sure adding a dice code can be done, but the problem I foresee:
I >think< bb code is executed on page load, not on posting. In other words, when you post with bb code, the post isn't changed to include the exact text, it remains your text with the code being applied to it.

I also >think< this would cause a problem with a random number generator considering the fact that, if the generator is executed on each page load... everyone would see a different number each time they viewed the page :D.

That said... I'm sure there's a way to do it, I just gotta read up on bb code a bit more.

Coldin
05-14-2008, 01:08 AM
Well, I know the giantitp.com forums have a dice roller. But I have no idea how they made it.

lostinjapan
05-14-2008, 03:17 AM
Isn't that kind of...complicated to roll just one number?

Not really if you truly want a random number (like a dice roll).

I'm sure it can be done here, let me take a look at how to go about it.

lostinjapan
05-14-2008, 03:21 AM
Actually...better idea.

Here's a vbulletin dice roller hack pre-made.

http://www.vbulletin.org/forum/showthread.php?t=113972

Rommalb
05-14-2008, 03:22 AM
well we have an e-mail rolling system otherwise Laz just rolls for all of us, it works fine that way

Coldin
05-14-2008, 04:12 AM
But, but Tomine...this would be so much cooler! :)