Developers Guide
There are several easy customization points for QuokkaWiki if you want to modify its behavior:
- Locale - extra language support is as easy as 1-2-3:
- Copy the en-US/ folder and rename the new folder to match the new locale, eg. 'fr-FR' for French.
- Modify each of the files, keeping the same keys and localizing the values.
- Change the 'lang' and 'locale' options in conf/prefs.module to match the new locale.
- Create a .module file and add it to the modules/ directory (any .module file which does not start with an underscore (_) will be automatically loaded at start up).
- Define a PHP function named content_tag_abc (defines the 'abc' tag) using this template:
function content_tag_abc($type, $args, $content, $class, $id) {
switch ($type) {
case TAG_CONTROL: // [!abc ...]
case TAG_ASSERT: // [@abc ...]
case TAG_VALUE: // [=abc ...]
case TAG_LAYOUT: // [.abc ...]
$output .= "<div".($class ? " class='$class'" : '').($id ? " id='$id'" : "").">".$content."</div>";
return $output;
default:
return "";
}
}
- Custom processing engines
- Create a new engine file using one of the engines in rules/ as a template.
- To change the default engine, modify conf/prefs.module and add an option for 'engines_default' (see modules/_config.module for an example).
- To override the engine for a specific page, simply add the following at the top of the page:
[@header
[@engine new_engine_name]
]
|