New module release: BBCode Tools

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
Ricko97
Forum Members
Forum Members
Posts: 65
Joined: Wed Jan 07, 2009 10:14 pm

New module release: BBCode Tools

Post by Ricko97 »

Hello all,

Just a little heads up, I have released a new module in the forge. It's nothing big - in fact it's very small and simple, with only 2 features to offer. But it's my first CMSMS module and I think it's the first to offer any kind of flexible BBCode functionality.

It's based loosely on the BBCode toolbar included with Forum Made Simple, with a whole new set of images/css as well as a number of bug fixes and improvements. So, credit in part goes to the original authors of FMS, especially its BBCode stuff.

I am also planning to integrate this in my fork of the FMS module, VaultForum, replacing its built in parser/toolbar. I might be releasing that as well sometime in the near future (which would only be fair to the authors of FMS  :)).

Usage

Code: Select all

{BBCode action='toolbar' input='message-body'}

<form>
<fieldset>
<label>Message Body:</label><br />
<textarea id="message-body"></textarea>
<input type="submit" />
</fieldset>
</form>
...results in something akin to:
Image

Code: Select all

{BBCode action='parse' input='[i]some[/i] [u]string[/u]'}
...results in:
some string

Additionally, you can access the parse function like so in your UDTs or modules:

Code: Select all

	global $gCms;
	$db = &$gCms->db;

	$text = $params['text'];

	$bbcode =& $gCms->modules['BBCode']['object'];
	$output = $bbcode->BBCParse($text);

	echo $output;
Important note:
Currently, BBCode Tools' parser does not in any way sanitize the input you pass to it! It only replaces BBCode tags with HTML equivalents. If you need to sanitize user-provided data before processing it, you need to do so yourself or ensure that the other module(s) you are using do so sufficiently.


Tag Support

The bbcode tags it currently supports are:
Image

Planned Features

- Ability to add simple custom BBCode
- Integration with FancyBox and other popular JS image display tools for the "img" tag

Note: I'm not guaranteed to add these. Please don't request them as they are already on my list, but I don't know if/when I'll implement them.

Also, I intend the module to remain relatively lightweight as to make it a practical dependency for other module developers, so the feature list isn't likely to grow much.

Download, Bug Reports & Feedback

The forge URL for this project is http://dev.cmsmadesimple.org/projects/bbcode.
Please direct all bug reports and feature requests there. Questions and generic feedback are welcome in this thread.

Thank you for your attention.  :)
Last edited by Ricko97 on Mon Feb 28, 2011 3:01 pm, edited 4 times in total.
cyberman

Re: New module release: BBCode Tools

Post by cyberman »

Great stuff - thx.
Post Reply

Return to “Modules/Add-Ons”