Source for file help_format_tikiwiki_inc.php
Documentation is available at help_format_tikiwiki_inc.php
* help_format_tikiwiki_inc
* @author Christian Fowler>
global $gBitSystem, $gBitSmarty;
require_once( KERNEL_PKG_PATH. 'BitCache.php' );
$cache = new BitCache( 'liberty/help' );
// only regenerate this thing if it's not cached yet
// help for generic options
'data' => "! heading 1\n!! heading 2\n!!! heading 3",
'note' => "Number of ! correponds to heading level.",
'note' => "Two single quotes not one double quote",
'Coloured Background' => array(
'data' => "++yellow:text++",
'Coloured Text' => array(
'data' => "~~red:text~~",
'Centered Text' => array(
'data' => "::__~~red:++yellow:text++~~__::",
'note' => "When you combine options make sure you open and close in the opposite order analogous to: {[(text)]}",
'Unordered Lists' => array(
'data' => "* First item\n** First subitem\n** Second subitem\n* Second item",
'Ordered Lists' => array(
'data' => "# First item\n## First subitem\n## Second subitem\n# Second item",
'Definition Lists' => array(
'data' => ";Term: Definition",
'data' => "((Wiki Page))",
'result' => '<a href="#">Wiki Page</a>',
'Wiki Links + Description' => array(
'data' => "((Wiki Page|Page Description))",
'result' => '<a href="#">Page Description</a>',
'Wiki Links + Anchor + Description' => array(
'data' => "((Wiki Page#Anchor|Page Description))",
'result' => '<a href="#">Page Description</a>',
'External Link' => array(
'data' => "[http://www.example.com]",
'External Link + Description' => array(
'data' => "[http://www.example.com|Description]",
'External Link + Anchor + Description' => array(
'data' => "[http://www.example.com/Page#Anchor|Description]",
'Miscellaneous' => array(
'Horizontal Rule' => array(
'Highlighted Bar' => array(
'Highlighted Box' => array(
'data' => "^text\nmore text^",
'data' => "~np~~~yellow:yellow~~\nand\n__bold__ text~/np~",
'note' => "This text will not be parsed",
'data' => "~pp~~~yellow:yellow~~\nand\n__bold__ text~/pp~",
'note' => "This text will be treated like code and will not be altered and will be displayed using a monospace font. The same can be achieved by using <pre>text</pre>.",
'Monospaced Text' => array(
'Right to Left' => array(
'data' => "{r2l}this text is from\nright to left\n{l2r}and back to\nleft to right.",
'Simple Tables' => array(
'data' => "|| Row1-Col1 | Row1-Col2\nRow2-Col1 | Row2-Col2 ||",
'data' => "||~ Header1 | Header2\nRow1-Col1 | Row1-Col2\nRow2-Col1 | Row2-Col2 ||",
if( $gBitSystem->getConfig( 'wiki_tables' ) == 'old' ) {
$tikiwiki['Simple Tables'] = array(
'data' => "|| Row1-Col1 | Row1-Col2 || Row2-Col1 | Row2-Col2 ||",
foreach( $tikiwiki[$section] as $title => $example ) {
if( empty( $example['result'] )) {
$example['format_guid'] = 'tikiwiki';
$tikiwiki[$section][$title]['result'] = LibertyContent::parseData( $example );
! Col 1 !! Col 2 !! Col 3
| Row1-Col1 || Row1-Col2 || Row1-Col3
| Row3-Col1 || Row3-Col2 || Row3-Col3
'{| class="table table-boardered"
'{| class="table table-striped"
|+ Table with alternating rows
'{| class="table" style="background:yellow;color:green"
|+ Table with many colours
| colspan="2" style="text-align:center;background:lightblue;" | defghi
|- style="background:red;color:white"
| style="font-weight:bold" | stu
| style="background:silver" | vwx
foreach( $mediawiki as $title => $example ) {
if( empty( $example['result'] )) {
$example['format_guid'] = 'tikiwiki';
$examples['tikiwiki'] = $tikiwiki;
$examples['mediawiki'] = $mediawiki;
$gBitSmarty->assign( 'examples', $examples );
|