Table of contents ▼▲
Customizing the wiki to your own taste
One of the goals of writing this wiki engine was to provide a framework and core routines that could easily be added too.expand on what can be done
Some of the things that can be extended or changed
- Text formatting - add to $TIR[] etc..
- layout - by changing or adding own templates and css files
- actions - add your own or write replacement routines for existing. The way the classes are written, they will always look for external functions before looking for the same function in the class.
- etc..
All customisation should be done outside of the core scripts directory (code/core). This will protect any changes you make when new releases are issued.
My advice is to use the core/scripts directory to store any code you write, ie functions, etc... I have supplied a calling command called
include_script() which will do the include from this directory.
Pretty much everything in code/core/variables.php can be overridden in a custom.php file.
A custom.php file is supplied with the wiki in the data/ directory. This is the 'global' custom file and affects all the wiki pages. I include the add on scripts from here as part of the standard package.
Setting global changes is all well and good, but it would be nice to be able to apply custom layouts, etc at group or even subgroup level. With this wiki it is easy to do by simply creating more custom.php files within the data directory structure.
For example, by creating
data/books/custom.php, you limit the changes only to the 'books' group. data/books/fiction/custom.php only affects the fiction subgroup.
Using your own HTML template
You are able to use different templates for different groups if you wish.- Create a new template file (call it whatever you want), and custom.php file in the data/<group> directory.
-
custom.php -
$Template['brtp'] = 'data/<group>/<myfile>';
CSS files
As with the HTML template above, create your new css file where you want it and add$CssUrl = '<filename>'; to the local custom file.
Adding own InterMap links
You may want to supply quick links to your favourite sites, for example the Google search engine ( Google:wikidx ). This is done by adding to the $Intermap[] array :$InterMap['/Google:(\S+)/'] = "http://www.google.co.uk/search?q="; The characters immediately following Google: will be added to the end of the http string.
As with most of the internals, a good knowledge of regular expressions is needed.