[Plugin] Mantis SimpleBB: a simple BBCode implementation

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
PhunkyBob
Posts: 6
Joined: 24 Jan 2011, 13:11

[Plugin] Mantis SimpleBB: a simple BBCode implementation

Post by PhunkyBob »

Good day,

As I didn't found a simple BBCode plugin for Mantis 1.2, I created mine...


Installation

Copy the directory "MantisSimpleBB" to your "plugins" directory in Mantis.
Log as administrator and go to the "Manage", "Manage Plugins" page (manage_plugin_page.php).
Click on the "install" link corresponding to "Mantis SimpleBB".
Set "1" as priority (this plugin has to be the last to parse the strings).

Note: In "MantisBT Formatting" configuration, "URL Processing" have to be set to "Off".



Usage examples

Text formatting:

Code: Select all

- [B]some string in bold[/B]
- [I]some string in italic[/I]
- [U]some string underlined[/U]
- [S]some string strikeouted[/S]
- [LEFT]some string left aligned[/LEFT]
- [CENTER]some string left aligned[/CENTER]
- [RIGHT]some string left aligned[/RIGHT]
- [COLOR=red]some string in red[/COLOR]
- [COLOR=#FF0000]some string in color #FF0000[/COLOR]
- [SIZE=4]some string in size 4[/SIZE]
Quoting:

Code: Select all

- [QUOTE]Some quote[/QUOTE]
- [QUOTE=User]Some quote from User[/QUOTE]
- [CODE ]some code[/CODE ]
Links:

Code: Select all

- [URL=http://url_to_my_site.com]display name[/URL]
Images:

Code: Select all

- [IMG]http://url_to_my/picture.jpg[/IMG]
- [IMG=http://url_to_my/picture.jpg]
(note: by default, Mantis display only images hosted on the same server)


I hope this will help...
Attachments
MantisSimpleBB 0.02a.zip
(3.4 KiB) Downloaded 878 times
Shep
Posts: 2
Joined: 12 Sep 2012, 10:49

Re: [Plugin] Mantis SimpleBB: a simple BBCode implementation

Post by Shep »

Awesome !

NB: you may have to adapt the MantisSimpleBB.php file according to the web server hosting Mantis.
In the function InitCSS(), you may need to replace:

Code: Select all

echo '<link rel="stylesheet" type="text/css" href="' . $current_path_relative . '/style/mantissimplebb.css" />';
by (for example):

Code: Select all

echo '<link rel="stylesheet" type="text/css" href="/mantis/plugins/MantisSimpleBB/style/mantissimplebb.css" />';
in order to avoid the page to refer to the CSS with an absolute local path (eg.: "C:\ProgFiles\EasyPhp...\mantissimplebb.css").
This is a quick workaround, could be smarter :wink:
Post Reply