View Full Version: Custom BB Codes - Manage via Word Filter

Big Boards > IF Administration & Moderation > Custom BB Codes - Manage via Word Filter



Title: Custom BB Codes - Manage via Word Filter
Description: No Script Required


Cory - January 5, 2007 01:30 AM (GMT)
This technique was derived from HelenaZF's "Indent or create empty spaces with BB code" documentation. This technique requires enabling the posting of HTML.

How does this technique work?
This technique is setup through the word filter. The word filter automatically replaces a custom BB code tag with the HTML (wrapped with the [doHTML] tag) that is used to deposit the different variations of text and additional HTML elements. The custom BB code tag can be specified to whatever you want. When posting, you will insert the BB code tag to deposit the different variations. Once you submit a post, the BB code tag will automatically be converted to HTML, as per the word filter settings.

To install the custom BB code tags, please follow the instructions below.

First Step
Enable the [doHTML] tag in the forums you wish to allow the custom BB codes to be posted, and the user groups you wish to allow the posting of the BB codes.

Second Step
Login to your Admin CP and head over to the Manage Word Filters page (located beneath the Administration category). From here, you will be using the "Add a new filter" option. To set them up, please read over the descriptions below.

Before: All tags in the quotes below, specified as "Before" will we pasted into this box.
After: All tags in the quotes below, specified as "After" will we pasted into this box.
Method: Set as Loose.
Color: Change this highlighted text to the color you wish to apply to the text variations, found in the quotes below.
Direction: Change this highlighted text to the direction you wish to apply to the marquee scroll. Specify as either right, left, up, or down.
Speed: Change this highlighted text to the speed you wish to apply to the marquee scroll.

Located below is a compiled list of current BB code tags we have come up with.

QUOTE (Glow Text - only works in Internet Explorer)
Start Tag
Before: [GLOW=Color]
After: [doHTML]<span style='color: Color; filter:glow(color=lightgreen, strength=2); height: 1px;'>

End Tag
Before: [/GLOW]
After: </span>[/doHTML]

QUOTE (Highlight Text)
Start Tag
Before: [HIGHLIGHT]
After: [doHTML]<FONT style="BACKGROUND-COLOR: yellow">

End Tag
Before: [/HIGHLIGHT]
After: </FONT>[/doHTML]

QUOTE (Marquee)
Start Tag
Before: [MARQUEE]
After: [doHTML]<MARQUEE>

End Tag
Before: [/MARQUEE]
After: </MARQUEE>[/doHTML]

QUOTE (Marquee Variation)
Start Tag
Before: [MARQUEE DIRECTION=Direction SCROLLAMOUNT=Speed]
After: [doHTML]<MARQUEE DIRECTION=Direction SCROLLAMOUNT=Speed>

End Tag
Before: [/MARQUEE]
After: </MARQUEE>[/doHTML]

QUOTE (Background Color)
Start Tag
Before: [BGCOLOR=Color]
After: [doHTML]<FONT style="BACKGROUND-COLOR: Color">

End Tag
Before: [/BGCOLOR]
After: </FONT>[/doHTML]

QUOTE (Text Box)
Start Tag
Before: [TEXTBOX]
After: [doHTML]<textarea cols="50" rows="4" name="comment">

End Tag
Before: [/TEXTBOX]
After: </textarea>[/doHTML]

QUOTE (Frame)
Start Tag
Before: [FRAME]
After: [doHTML]<iframe src="

End Tag
Before: [/FRAME]
After: " width="540" height="150" scrolling="yes"></iframe>[/doHTML]

QUOTE (Left-Align Text)
Start Tag
Before: [LEFT]
After: [doHTML]<div align="left" style="text-align:left">

End Tag
Before: [/LEFT]
After: </div>[/doHTML]

QUOTE (Center-Align Text)
Start Tag
Before: [CENTER]
After: [doHTML]<div align="center" style="text-align:center">

End Tag
Before: [/CENTER]
After: </div>[/doHTML]

QUOTE (Right-Align Text)
Start Tag
Before: [RIGHT]
After: [doHTML]<div align="right" style="text-align:right">

End Tag
Before: [/RIGHT]
After: </div>[/doHTML]

You have now successfully setup the custom BB code tags, all users that have the [doHTML] tag enabled may now use the BB code tags in posts.

g1ggy - January 9, 2007 01:14 AM (GMT)
*gasps*

Can you believe I was planning to make one of these tutorials when I came on BigBoards today...oh well, you beat me to it :P

Anyway, you can also add a drop down menu that inserts these custom tags, using variations from this article. Basically, you replace the link with the code used by the menus for inserting FONT, SIZE, and COLOR (above the post interface). I would include an example, but I haven't had time to work on it. Just an idea :D

Cory - January 11, 2007 05:21 AM (GMT)
There's always room for version 2. :)

Thanks for the ideas, g1ggy. I may get a script together sooner or later that adds the custom BB code tags to a drop-down menu in the posting screen. This way, the tags can be easily wrapped around the text with one click.

I'll be working on a custom table and drop-down menu tag; these tags will be more complicated to use when it comes to BB codes. In the meantime, I've added two new custom tags to my first post - text box and frame tag.

g1ggy - January 12, 2007 12:57 AM (GMT)
v2? No. I doubt I could make anything as good as this, mine would generally a very basic thing, I would pretty much be asking for more codes to be added to it (like the frame tag)

Chireru - November 20, 2007 12:05 AM (GMT)
WOA
I would have never thought to use the Manage Word Filters like this
:drool:
lol




Hosted for free by InvisionFree