My previous website had implemented WikkiTikkiTavi for discussion with myself, and others. However, since I recently switched to my self-build 'CMS', I had to say good bye to the WikkiTikkiTavi installation, since it didn't fit the site as well as it should.
What I wrote for my WikkiTikkiTavi installation was another theme, which made it easier to create new themes, in a more simple way than before, using variables instead of function calls. It's far from optimized and doesn't do things like caching, but I didn't notice any changes in page-load speed myself.
If you're interested, download it here: TaviTemplate2.01.tar.gz (19KB).
(This is also included in the download)
PHP functions and HTML are now, imho, better seperated, especially in common.php in wich a new function has been created. This new function loads a HTML file called 'template.html' wich is a 'normal' html file with variables in it made up like {variablename}. The list of supported variables can be found below. The advantage of this 'system' is that it is much easier to change the HTML structure of the wiki.
To demonstrate this I've created two examples; one is the 'original' WikiTikiTavi style; the other is the murb.nl-style. The only differences between those templates are its HTML and CSS files.
Common.php now contains a new function wich is called
template_common_page(array);
The array is compatible with the parameters passed with the associative array in the 'old' functions; see a file like view.php for an example of this.
Variable | Description |
---|---|
{head_meta_keywords_content} |
Keywords |
{head_meta_description_content} |
Description |
{head_meta_robots_content} |
(NOINDEX, NOFOLLOW) | (INDEX, FOLLOW) |
{head_link_stylesheet_href} |
URL of stylesheet file |
{head_title} |
Wiki's title |
{body_logo} |
e.g. <div class="logo"> <a href="http://tavi.sourceforge.net/"> <img src="/tavi.png" alt="[Home]" /> </a> </div> |
{body_title} |
e.g. <h1>My title of this page</h1> or <h1><a class="title" href="http://tavi.sourceforge.net/index.php?action=find&find=TaviCategories"> Categories </a></h1> |
{wiki_tools_link_homepage} |
<a href="http://tavi.sourceforge.net/WikkiTikkiTavi">WikkiTikkiTavi</a> |
{wiki_tools_link_RecentChanges} |
<a href="http://tavi.sourceforge.net/RecentChanges">RecentChanges</a> |
{wiki_tools_link_prefs} |
<a href="http://tavi.sourceforge.net/index.php?action=prefs">Preferences</a> |
{wiki_tools_original_top} |
Original top toolbar (edit home, recentchanges & prefs) |
{wiki_tools_link_edit} |
?action=edit |
{wiki_tools_link_history} |
?action=history |
{wiki_tools_original_bottom} |
Original bottom tooblar (edit & history) |
{wiki_tools_timestamp} |
Fri, 12 Dec 2003 03:32:31 |
{wiki_tools_searchform} |
<form ... > ... </form> |
{body_content} |
Actual content |
Enjoyed this? Follow me on Mastodon or add the RSS, euh ATOM feed to your feed reader.
Dit artikel van murblog van Maarten Brouwers (murb) is in licentie gegeven volgens een Creative Commons Naamsvermelding 3.0 Nederland licentie .