BBCodePlugin
Allows users to use BBCode.
(BETA)
Standard BBCode. See
http://www.phpbb.com/community/faq.php?mode=bbcode.
In addition to standard BBCode the
[BR] tag is available, which renders as a linebreak (
<BR />).
|
|
| Tag |
Example |
Renders as (if installed) |
Preview (simulated) |
| B |
[b]bolded text[/b] |
[b]bolded text[/b] |
bolded text |
| I |
[i]italicized text[/i] |
[i]italicized text[/i] |
italicized text |
| U |
[u]underlined text[/u] |
[u]underlined text[/u] |
underlined text |
| URL |
[url]http://twiki.org[/url] |
[url]http://twiki.org[/url] |
http://twiki.org |
| URL |
[url=http://twiki.org]TWiki Home[/url] |
[url=http://twiki.org]TWiki Home[/url] |
TWiki Home |
| EMAIL |
[email]no.one@domain.adr[/email] |
[email]no.one@domain.adr[/email] |
no.one@domain.adr |
| IMG |
[img]http://twiki.org/p/pub/TWiki04/TWikiLogos/T-logo-158x45-t.gif[/img] |
[img]http://twiki.org/p/pub/TWiki04/TWikiLogos/T-logo-158x45-t.gif[/img] |
|
| QUOTE |
[quote=Author]quoted text[/quote] |
[quote=Author]quoted text[/quote] |
Author wrote: quoted text |
| CODE |
[code]monospaced text[/code] |
[code]monospaced text[/code] |
Code: monospaced text |
| SIZE |
[size=15]Large Text[/size] |
[size=15]Large Text[/size] |
Large Text |
| COLOR |
[color=red]Red Text[/color] |
[color=red]Red Text[/color] |
Red Text |
| LIST |
[list] [*]Red [*]Blue [*]Yellow [/list] |
[list] [*]Red [*]Blue [*]Yellow [/list] |
|
| LIST |
[list=1] [*]Go to the shops [*]Buy a new computer [*]Swear at computer when it crashes [/list] |
[list=1] [*]Go to the shops [*]Buy a new computer [*]Swear at computer when it crashes [/list] |
- Go to the shops
- Buy a new computer
- Swear at computer when it crashes
|
| BR |
line1[br]line2[br]line3 |
line1[br]line2[br]line3 |
line1 line2 line3 |
|
|
|
Plugin settings are stored as preferences variables. To reference a plugin setting write
%<plugin>_<setting>%, i.e.
%BBCODEPLUGIN_SHORTDESCRIPTION%
- One line description, is shown in the TextFormattingRules topic:
- Set SHORTDESCRIPTION = Allows the use of standard bbcode in topics. (BETA)
- Set the bbcode tags which are allowed. Only these tags will be rendered in topics. The available tags are: B, I, U, IMG, URL, EMAIL, LIST, CODE, QUOTE, COLOR, SIZE and BR. See the examples above for the tag names. Seperate them by commas (see example). Leave empty to allow all tags
Example: Set TAGS = I, B, U
- Set On to allow Javascript URLS. This allows users to execute javascript using [url]-tags. When non-trusted users have access to your TWiki it is better to leave this setting Off.
- Set ALLOW_JAVASCRIPT = Off
- When set to On you can use
<bbcode> tags to create blocks of bbcode. See bbcode blocks below.
- Set the background color of bbcode blocks. Default is
#eaeaea.
- When set to On all HTML in bbcode blocks is disabled and shown verbatim. This allows for an easy way to post snippets of HTML code.
NOTE: By setting both %ALLOW_BLOCKS% and %ALLOW_FREESTYLE% to
Off you are effectively disabling this plugin.
This plugin allows for two ways to use bbcode in your topics. When using
freestyle bbcode you just put bbcode where you want. You can also use
bbcode blocks. BBCode blocks are delimited by
<bbcode> tags.
There are three advantages of using blocks over free bbcode:
- By turning off %ALLOW_FREESTYLE% you force users to make it explicit they are using bbcode. This can lead to less errors and confusion, but it is more typing.
- When %NOHTML% is turned on all HTML in bbcode blocks is disabled and shown verbatim. This is an easy way to include HTML in topics without rendering it (similar to
<verbatim>).
- Newlines are preserved in bbcode blocks. This makes BBCode blocks particularly useful to copy/paste pieces of bbcode from other sites in your topic.
BBCode block example
Source
[quote=JohnDoe]
Does anybody now why my supersize perl application is broken? The only change I made was adding this line:
[code]
$| = 3;
[/code]
[/quote]
I have [b]no[/b] idea.
I will consult some real l33t perl experts for you.
Rendering
[quote=JohnDoe]
Does anybody now why my supersize perl application is broken? The only change I made was adding this line:
[code]
$| = 3;
[/code]
[/quote]
I have [b]no[/b] idea.
I will consult some real l33t perl experts for you.
Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the TWiki server.
- Download the ZIP file from the Plugin web (see below)
- Unzip
BBCodePlugin.zip in your twiki installation directory. Content:
|
|
| File: |
Description: |
data/TWiki/BBCodePlugin.txt |
Plugin topic |
data/TWiki/BBCodePlugin.txt,v |
Plugin topic repository |
lib/TWiki/Plugins/BBCodePlugin.pm |
Plugin Perl module |
lib/TWiki/Plugins/BBCodePlugin/BBCode.pm |
Plugin Perl module |
|
|
|
- Configure the Plugin:
- TWiki 4.0 and up: Run the configure script to enable the Plugin
- Change the Plugin settings as needed
- Test if the installation was successful:
- If the two boxes below look the same, the plugin was successfully installed:
--
TWiki:Main.JosKunnekes - 09 Jun 2007
Topic revision: r4 - 2007-06-27 - 15:40:21 -
JosKunnekes