locus sonus > audio in art

locus sonus > Help Syntax reference.en

Last changed: 2009/02/15 02:33


{tags:Lionwiki,Help, Syntax}


This document explains all syntax features of core LionWiki.

Syntax of tables (provided by plugin) is on separate page: Help Tables.

Syntax of media embed is on separate page: Help Media mp3 and Help Media video.

1. Headings


!Heading H2
!!Heading H3
!!!Heading H4

Heading H2 (page title or paragraphs)

Heading H3 (paragraphs)

Heading H4 (sub-paragraphs)

Heading H5 (note)

More exclamation marks you use, smaller heading is (up to 5 exclamation marks). This is different from WiKiss (possibly also TigerWiki), ! is used for H2, because H1 should be reserved for title. Exclamation marks has to be exactly at the start of the line.

2. Lists

2.1. Unordered list

* Fruit
** Apple
*** Granny smith
*** Golden delicious
** Orange
* Vegetables
** Garlic
** Onion

  • Fruit
    • Apple
      • Granny smith
      • Golden delicious
    • Orange
  • Vegetables
    • Garlic
    • Onion

2.2. Ordered list

# First item 
## First subitem 
### First subsubitem
## Second subitem 
# Second item

  1. First item
    1. First subitem
      1. First subsubitem
    2. Second subitem
  2. Second item

3. Text styles

^'^Bold^'^ → Bold (three apostrophes)

^'Italic^' → Italic (two apostrophes)

^'^'^Bold and italic^'^'^ → Bold and italic (five apostrophes)

^-Strikethrough-' → Strikethrough (one apostroph one hyphen)

^__Underlined__' → Underlined (one apostroph two underscores)

^%coloured background^' → coloured background (one apostroph one percent)

^!!!!circled text^!!!! → circled text (five exclamation marks before and after the expression)

^UOTEquotation^UOTE → quotation

Since LionWiki 2.0

^small}Small text^/small} → Small text

2^sup}10^/sup} → x10

x^sub}i^/sub} → xi

New feature :

How to use a post-it style ?

^= blah blah blah ^' →

Note :
blah blah blah

4. Emails, links, images

4.1. Emails & Links

Links to other pages can be created like this:

^Main Page] -> Main Page


^Main project page|Main page] -> Main project page

Emails and web links are automatically recognized:

^ttp:// ->

^ ->

If you want to have different link and link text, you can use following syntax:

^LionWiki|^ttp://] -> LionWiki

You can use also relative links, but they have to start with ./ (otherwise it will be interpreted as Wiki page)

So if you want to link some HTML page in the same directory, you use:

^Interesting page|./SomeWebPage.html] -> Interesting page

One bonus feature is link to article on Wikipedia of your language:

^?Albert Einstein] -> Albert Einstein

If you want only a Wikipedia article in english, the syntax is:

^!Albert Einstein] -> Albert Einstein

These both features open a new window.

4.2. Images

LionWiki does not have built-in support for uploading images. However, Upload plugin is in standard LionWiki distribution, so you should have it. It's accessible through this link. If you don't have it installed you can still upload images manually. The readable image formats are : jpeg, jpg, gif, png.

^^ttp://] →

You can use your image as your link: ^^ttp://|^ttp://] →

You can also place your image to the left or right, possibly combined with link feature:

← ^^ttp://|left]

^^ttp://|^ttp://|right] →

5. MP3 soundfiles and videofiles

Syntax of mp3 embed is on separate page: Help Media mp3.

For video : Help Media video

6. Summary/Menu

You can put a menu on right-top of your page, just place ^TOC^ on the top of your page.

The menu lists the existing headings.

7. Subpages

This feature is available since LionWiki 2.0.

Subpages are useful when you need to insert some common content into multiple pages. Example could be list of available language versions of some page - you would probably want to insert this into every language variant. That's ok, but what happens when you want to add one more language variant? You have to update list in all other language variants. Subpage mechanism solves this problem by creating page which contains this list and including this page into all the variants with special keyword. Then, if you want to add one language variant, you need to add it to just one page. Another useful application could be Menu displayed on every page.

Including page is done with keyword ^include:page_to_be_included}.

You can use the same syntax to include page in template (i.e. not in page content), but in this case, whole content of this subpage must be in HTML (you can, but not have to enclose it in ^html} and ^/html}).

8. Multilingual content

This feature is available since LionWiki 2.0.

Let's say you have page named "Biography" in German and you would like to make French variant. Rename page Biography to and create page named and insert French translation there. Then visitors whose browser identifies primary language as French will see It's recommended to create a redirect from page Biography to default language variant. The obvious limitation is that page name has to stay the same in every language variant. That's not such a big problem with "Biography", but it can be worse with other names.

This is recommended way to create multilingual content, there are more ways to do it.

Useful feature to maintain multilingual content is Subpage mechanism, which is described in previous section or PageVersions plugin (insert ^VERSIONS} in the content and plugin will automatically detect and display all language variants of current page).

9. Redirects

This feature is available since LionWiki 2.0.

If you want to redirect from some page to other, put ^redirect:page} at the very beginning of the page. It's not straightforward to edit page containing redirect because every visit will cause redirecting. The only way to edit such page is from search results (as it provides direct edit links), or possibly by manually altering URL.

10. Other

10.1. Characters

Some sequences of characters are automatically replaced:

  • Arrows : <^- : ←, ^-> : →, <^-> : ↔
  • Dash : ^- : — (since LionWiki 2.0)
  • Copyrights : ^c) or ^C) : ©, ^r) or ^R) : ®

10.2. Code

Code syntax is useful when you need to keep original spacing and layout of text, especially for programming source code.

^{import sys

if len(sys.argv) == 2:

print "Hello",sys.argv^1]}}


import sys
if len(sys.argv) == 2:
   print "Hello",sys.argv[1]

10.3. Horizontal line

by ^-^-

10.4. Suppressing wiki syntax

By using ^ character before syntax keyword or using ^{something}}. If you still don't know how, take a look on wiki code of this page, there are plenty of examples. If you want to insert ^ character, you have to double it, i.e. ^^

10.5. HTML code

Do you want to insert youtube video to your site? Or any other HTML code? Just insert it between ^html}some html code{/html}.

Syntax of media embed (YouTube, mp3, mov, mp4, etc.) is on separate page: Help Media.

10.5.1. HTML entities

Since LionWiki 2.0. HTML entities are automatically recognized and left without modification.

10.6. Newline

LionWiki joins adjacent newlines together, if you need more than one newline, use ^br}.

10.7. Internal comments

Since LionWiki 2.0. You can insert internal comments not intended to be displayed using HTML-like syntax ^!^- text not intended to be displayed ^->

11.Other Features

11.1. Moving page name

11.2. How to delete a page ?

It's impossible to delete a page. Even if it's blank, the created page is kept by the history feature and remains on the server on the Pages and History folders.

The lonely way to avoid junk pages listed by the pages list function, is to move the title to create a filename and content.

Another way for the admin :

How to delete some very old revisions? Go to history/Name_of_page/ and delete whichever revisions you want. Or delete whole history/Name_of_page/ (but not history directory!). Wanna do some changes to the page using your FTP editor? Just edit it, no problem (remember it's in UTF-8, as everything else). You can do almost anything, "database" stays always consistent.

11.3. What's Edit Summary?

Edit summary is a way to write short summary of changes - e.g. "added sections on syntax and use" or "typographical fixes". It makes history much more synoptic.

11.4. Keyboard Shortcuts

ctrl + E = Edit the page

ctrl + S = Save the page (when the password is already recorded in the cookie)

ctrl + L = List of all pages

ctrl + R = Recent Changes

11.5. Non-readable pages (admin page)

Admin plugin provides advanced administration functions protected by password

Can set pages as unwritable.

Write the list of pages.

11.6. Blacklist (admin page)

List of expressions forbidden in pages.

11.7. Blocked IPs

Blocks specified IP addresses from editing.

11.8. Meta-infos : Description, Keywords

Adds meta tags keyword and description to the head section of page: Meta inserts into HTML head meta tags description and keywords. Simple stupid. And useful for searchbots.

It can be used only in page content and not in templates because it wouldn't make sense.

Use syntax:

^description:This page is about cats and dogs^

^keywords:Cats, Dogs^

11.9. Upload file

You can upload files directly to the server. Just use the Upload file function on the admin page.

A Data folder must be first created on the server with chmod privileges.

After uploading your file(s), they appear on the Upload page, and you can easily create directories and delete existing files.

Maximum size of uploaded file is 2M.

11.10. Passwords

LionWiki provides password protection for both writing and reading pages (useful for private notebooks, journals).

11.11. Tags and Tags cloud

Tags plugin provides nonhiearchical categorizing. It can display Tag list and/or Tag cloud.

The ^plugin:TAG_LIST^ is already inserted in LionWiki default templates.

Syntax: insert ^^ags:^iography, ^ionWiki, ^nother tag^

Tags are case insensitive.

Tags plugin supports both Tag List (shows tags for current page) and Tag Cloud.

You can use them in template (will be displayed on every page) by inserting ^plugin:TAG_LIST^ or ^plugin:TAG_CLOUD^, or in page by inserting ^TAG_LIST^ or ^TAG_CLOUD^.

Internals: tags for all pages are stored in one file - usually plugins/data/tags.txt

This file has simple format - it's filled with pairs of lines. First line is name of the page and second is comma separated list of tags belonging to this page.

Example :



11.12. plugin WhatLinksHere (admin page)

WhatLinksHere generates list of pages which contain link to specified page, especially useful when moving pages.

11.13. plugin SlimBox

With Slimbox plugin, you can create beatiful image galleries using syntax:

[images/thumb/thumbnail.png|images/picture.jpg|Caption of the image]

Because of it's size, Slimbox plugin is not distributed together in standard LionWiki releases. You can download it here:

Slimbox plugin contains Slimbox installation so you don't have to download anything else.

The version 2 of Slimbox is now available :

Here are some examples :


Works with local files.

To set a diaporama (example below with external links) I'm using a second installation with LightBox2 in order to permit ^html^ embedding :

11.14. Wiki farming

You have a lot of subdomains and you would like to serve all of them (or some of them) from one LionWiki installation to avoid redundancy. The easiest way to do this is to create symlink (or hardlink) in every subdirectory (subdomain). But you need to access to shell to do this. LionWiki provides another way to do this by using mod_rewrite. Let's say we have this directory structure:

root (

first (

second (

wwww (

Place index.php to the root directory. Then insert this in your .htacces in root directory (or something similar) for every subdomain you want to be served by LionWiki:

RewriteCond %{HTTP_HOST} ^irst\.example\.com
RewriteRule ^ndex.php(.*)$ index.php?basedir=first ^L,QSA]
RewriteCond %{HTTP_HOST} ^irst\.example\.com
RewriteRule ^ index.php?basedir=first ^L,QSA]

As you can see, the key thing is that this rewrite rules pass the directory (first) as the parameter to index.php, so LionWiki knows where to look for needed files.

Placing of directories and files is a little bit more complicated here. Language directory (if any) should always be placed in the root directory, as it is common for all the subdomains. There can be also plugins directory, where will be located common plugins for all the subdomains. If you want to have some plugins just for some subdomains, create plugins directory ("plugins") in subdomains directory ("first") = "first/plugins" and place them there. They will be used only for It's similar with config files and templates. Config file has in the root directory contains common values for all subdomains which can be overriden by config files placed in the subdomains directories. Template file placed in the root directory is used when no template is placed in subdomains directory. It's all quite logical, so it should behave the way you expect.

11.15 plugin RSS

RSS plugin generates RSS feed of page changes. The rss.xml is automatically generated by LionWiki.

Everytime user changes page, change (diff, to be exact) is added to RSS file ("rss.xml").

Configuration :

  • $max_changes specifies maximum number of changes in feed.
  • $short_diff - if set true, feed contains only changed lines and omit unchanged lines.