This document explains all syntax features of core LionWiki.
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 (or click on the link above this page)
ctrl + R = Recent Changes (or click on the link above this page)
Edit your page and change its name by typing a new name and clicking "modify".
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.
Nota : A page with no content (completely deleted) could be deleted from the server (to be confirmed)
Click on "Create a page" in the admin menu
Example:
!Heading H2
!!Heading H3
!!!Heading H4
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.
'''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)
QUOTEquotationQUOTE → quotation
{small}Small text{/small} → Small text
2{sup}10{/sup} → x10
x{sub}i{/sub} → xi
How to use a post-it style ?
'= blah blah blah =' →
Note : blah blah blah |
* Fruit
** Apple
*** Granny smith
*** Golden delicious
** Orange
* Vegetables
** Garlic
** Onion
# First item
## First subitem
### First subsubitem
## Second subitem
# Second item
Some sequences of characters are automatically replaced:
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]}}
does:
import sys
if len(sys.argv) == 2:
print "Hello",sys.argv[1]
by ----
with {br}
Note : two blank lines (with return key on your keyboard is similar to the creation of a paragraph)
LionWiki joins adjacent newlines together, if you need more than one newline, use {br}.
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. ^^
Do you want to insert youtube video to your site? Or any other HTML code? Just insert it between {html}some html code{/html}.
Links to other pages can be created like this:
[Main Page] -> Main Page
or
[Main project page|Main page] -> Main project page
Emails and web links are automatically recognized:
http://lionwiki.0o.cz -> http://lionwiki.0o.cz
lionwiki@example.com -> lionwiki@example.com
If you want to have different link and link text, you can use following syntax:
[LionWiki|http://lionwiki.0o.cz] -> 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.
LionWiki has built-in support for uploading images. It's accessible through this link. The readable image formats are : jpeg, jpg, gif, png.
[http://lionwiki.0o.cz/lion.jpg] →
You can use your image as your link: [http://lionwiki.0o.cz/lion.jpg|http://lionwiki.0o.cz/] →
You can also place your image to the left or right, possibly combined with link feature:
← [http://lionwiki.0o.cz/lion.jpg|left]
[http://lionwiki.0o.cz/lion.jpg|http://lionwiki.0o.cz/|right] →
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: http://lionwiki.0o.cz/download/plugins/slimbox.tar.bz2.
Slimbox plugin contains Slimbox installation so you don't have to download anything else.
The version 2 of Slimbox is now available :
http://www.digitalia.be/software/slimbox2
Here are one example :
[data/img/car2.jpg|data/img/caroline2.jpg|In the Dark]
Works with local files and external files.
To set a diaporama (example below with external links) I'm using a second installation with LightBox2 in order to permit {html} embedding :
http://www.huddletogether.com/projects/lightbox2/
(Edit this page in order to copy the code)
If you want a diaporama with only one picture displayed, and the other ones hidden. Put the data/img/noir.jpg image after the first picture, like this :
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.
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}).
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.
Since LionWiki 2.0. HTML entities are automatically recognized and left without modification.
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 -->
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 :
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.
The mp3 soundfiles are automatically read with the help of a light flash player : dewplayer (only 4k).
Syntax (for a file located in the data folder (for instance mp3s) after you upload it) :
[=data/mp3s/yourfile.mp3] (put = before the url)
Example :
With external http soundfile links, you must use the alternative way by using {html} embed like this :
{html}
<object type="application/x-shockwave-flash" data="plugins/data/dewplayer.swf" width="200" height="20">
<param name="wmode" value="transparent" />
<param name="movie" value="plugins/data/dewplayer.swf" />
<param name="flashvars" value="mp3=http://www.animalpicturesarchive.com/animal/SOUND/animal_sounds_17-dolphin.mp3&showtime=1" />
{/html}
here is an example with a external soundfile :
One way could be to put only the url, and the wiki will play the file in a new window.
Example:
http://www.americangirl.com/tips/mov/quicktime_works.mov
Here is the HTML embed example :
{html}
<embed src="yourfile.mov" autoplay=false loop=false volume=100
controller=true width="320" height="255" type="video/quicktime" />
</embed />
{/html}
One way could be to put only the url, and the wiki will play the file in a new window.
Example:
http://nujus.net/~locusonus/dropbox/videos/2007_symp4_perf_tanaka.mp4
Here is the HTML embed example :
:
{html}
<embed src="yourfile.mp4" autoplay=false loop=false volume=100
controller=true width="480" height="370" type="video/quicktime" />
</embed />
{/html}
{html}
<object width="425" height="344">
<param name="movie" value="http://www.youtube.com/v/Rj57-Do-O1Q&hl=cs&fs=1"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="http://www.youtube.com/v/Rj57-Do-O1Q&hl=cs&fs=1"
type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true"
width="425" height="344">
</embed>
</object>
{/html}
altern dimensions : width="217" height="177" / width="520" height="403"
{html}
<object width="520" height="432">
<param name="movie" value="http://www.dailymotion.com/swf/k3zHNh3czgpKF11HlE"></param>
<param name="allowfullscreen" value="true"></param>
<param name="allowScriptAccess" value="always"></param>
<embed src="http://www.dailymotion.com/swf/k3zHNh3czgpKF11HlE"
type="application/x-shockwave-flash" width="520" height="432"
allowfullscreen="true" allowScriptAccess="always">
</embed>
</object>
{/html}
altern dimensions : width="480" height="285"
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 Biography.de and create page named Biography.fr and insert French translation there. Then visitors whose browser identifies primary language as French will see Biography.fr. 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).
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.
Admin plugin provides advanced administration functions protected by password
Can set pages as unwritable.
Write the list of pages.
List of expressions forbidden in pages.
Blocks specified IP addresses from editing.
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}
LionWiki provides password protection for both writing and reading pages (useful for private notebooks, journals).
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 {tags:Biography, LionWiki, Another 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 :
WhatLinksHere generates list of pages which contain link to specified page, especially useful when moving pages.
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 (example.com)
first (first.example.com)
second (second.example.com)
wwww (www.example.com)
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} first\.example\.com
RewriteRule index.php(.*)$ index.php?basedir=first [L,QSA]
RewriteCond %{HTTP_HOST} first\.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 first.example.com. 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.
to embed a video quicktime
Another way is to put some strings in index.php for automatic recognition of mov and mp4 files. Like this : (not tested)
$CON = preg_replace('#h(ttps?://[0-9a-zA-Z\.\&\#\:/~\-_%=?]*\.(mov))#i', '
<embed src="xx" autoplay=false loop=false volume=100 controller=true width="320" height="255"
type="video/quicktime" /></embed />', $CON);
$CON = preg_replace('#h(ttps?://[0-9a-zA-Z\.\&\#\:/~\-_%=?]*\.(mp4))#i', '
<embed src="xx" autoplay=false loop=false volume=100 controller=true width="480" height="370"
type="video/quicktime" /></embed />', $CON);
to embed a YouTube and DailyMotion video
Another way is to put some strings in index.php for automatic recognition of YouTube and DailyMotion files with wiki codes. Like this : (not tested)
$CON = preg_replace('#\[\=(.*)\]#Ui', '<div><object width="520" height="403">
<param name="movie" value="http://www.youtube.com/v/"></param>
<param name="wmode" value="transparent"></param>
<embed src="http://www.youtube.com/v/" type="application/x-shockwave-flash"
wmode="transparent" width="520" height="403"></embed></object></div><br />',
$CON); // films YOUTUBE
$CON = preg_replace('#\[\+(.*)\]#Ui', '<object width="520" height="432">
<param name="movie" value="http://www.dailymotion.com/swf/"></param>
<param name="allowfullscreen" value="true"></param>
<embed src="http://www.dailymotion.com/swf/" type="application/x-shockwave-flash"
width="520" height="432" allowfullscreen="true"></embed></object><br />',
$CON); // films DAILYMOTION
Language: