Tavi Template A extensible template for the WikkiTikkiTavi.

An article, posted about 19 years ago filed in cms, opensource, wiki, template & contribution.

Introduction

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.

Theming

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).

Documentation

(This is also included in the download)

Short summary of changes

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.

New function

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.

Template variables

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&amp;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

Op de hoogte blijven?

Maandelijks maak ik een selectie artikelen en zorg ik voor wat extra context bij de meer technische stukken. Schrijf je hieronder in:

Mailfrequentie = 1x per maand. Je privacy wordt serieus genomen: de mailinglijst bestaat alleen op onze servers.