PDA

View Full Version : BB Code Enhancements - Monospace Font BBcode


BirdOPrey5
07-07-2010, 10:00 PM
This is another simple bb code that I couldn't find anywhere so I figured why not make it for anyone interested. This will let you use a monospace font outside the [code] and [php] tags... it will look like normal forum text except be mono-spaced.

There are two options, the first one requires you specify a color, the second doesn't take a color but you can still use the standard FONT-COLOR tags to set one.

Demo: here. (http://www.juot.net/forums/showthread.php?p=826717#post826717) *First option only*

Option 1. Add a new BBCode

Title: Monospace
BB Code Tag Name: mono
Replacement:

<span style="font-family: monospace; color:{option}; white-space:nowrap;">{param}</span>


Example: Red mono text test.
Description: This code makes text monospaced with an optional color.
Use Option: Yes
Button Image: (optional) https://vborg.vbsupport.ru/external/2010/07/61.jpg
Remove Tag If Empty: Yes
All Disable Options: No

You can use standard color names in the option such as red, blue, green, yellow, etc...
You can also use hex color codes preceded by the # sign for exact colors, such as #0000FF
Click here for common hex color codes. (http://www.december.com/html/spec/colorhex.html)

If you don't want to specify a color you must still include ="" in the opening tag or the code won't be parsed. To use this code without a color instead install the following code:

Option 2. Add a new BBCode

Title: Monospace
BB Code Tag Name: mono
Replacement:

<span style="font-family: monospace; white-space:nowrap;">{param}</span>


Example: Monospace text test.
Description: This code makes text monospaced.
Use Option: No
Button Image: (optional) https://vborg.vbsupport.ru/external/2010/07/61.jpg
Remove Tag If Empty: Yes
All Disable Options: No

Please mark as installed if you use this. :)