DocThemes 

TB Wiki

Login

DocThemes

A theme allows you to specify the page "decorations" which surround the content of a miki page. To create a theme, create the files:
  • <theme>.header
  • <theme>.footer
  • <theme>.css - stylesheet file

The default theme for a wiki is specied in the top-level CGI file as the string value of config.default_theme. For example: config.default_theme="tbwiki"

Users can select a different theme, and this is stored in their account data in e.g. data/admin/User1 as the value for "theme".

The list of allowed themes (for user selection) is generated by scanning the data/pages directory, and listing all basenames for files ending in '.header'.

The format of the header and footer files is raw HTML. You can reference some tbwiki system variables, to place items wherever you want on the page. The header and footer files go in the data/pages directory, just like any other file (this might be a security risk). The stylesheet file goes in the 'css' directory.

Here are some of the variables available, and what they mean:

  • content_type - specifies the type of page to return (usually text/html)
  • title - the page title
  • system_title - the name of the miki site
  • base_css_url - the base web directory where css files are stored
  • stylesheet - the name of the css file (default is 'tbwiki.css', but it varies depending on the theme.
  • login_form - puts a link to the login form, or the name of the currently logged-in user
  • login_form_nobr - user stuff in a single line
  • nav_box_sidebar - a sidebar table showing a list of navigation links
  • nav_bar_bar - a sequence of navigation links
  • search_form - a table with a search form in it
  • search_form_nobr - a search form in a single line
  • toolbox - a sidebard table showing a list of actions you can perform
  • message - will display a message, usually reflecting the status of the last action performe

TBWiki engine 1.9.2 by Tim Bird