```## tabid=module titletext='SimpleWiki Module' subjecttext='SimpleWiki PHP5 Module' |:pre html:|{{{ }}} = Module = |:p div float:right:|%s smaller%//[[Local:display/article/module|view source markup]]// See the %l newwin%[[Local:documentation|technical documentation]], or [[Local:download | download]]. |:p posting:|posted January 6, 2011; updated June 18, 2011 ===[[#components]] Components === The SimpleWiki module consists of the following components: ====== shells ====== *simplewiki.php *simplewiki_parser.php *simplewiki_emitter.php *simplewiki_docnode.php ====== source code ====== *muster_simplewiki.php *muster_simplewiki_parser.php *muster_simplewiki_emitter.php *muster_simplewiki_docnode.php ====== css files ====== *SimpleWiki.css ====== javascript ====== * %l newwin%[[http://jquery.com/|jquery.js]] (see jquery website) * SimpleWiki.js ====== images ====== *arrowdown.gif *arrowup.gif ===[[#integration]] Integration === ==== code ==== Use an autoloader like this: {{{ function __autoload($class_name) { include('classes/' . strtolower($class_name) . '.php'); } }}} and call simplewiki like this: {{{ $wiki = new SimpleWiki(); }}} Normally invoke the same instance of SimpleWiki for repetitive parsing: {{{ $html = $wiki->get_html($markup); }}} ==== html ==== {{{ }}} ==== images ==== Place the images in the same directory as the css file. ===[[#extension]] Extension === Extend SimpleWiki by inserting your subclass into the calling chain. Place your class extension in a separate php source file (eg. mysimpliwiki.php). In your source file, extend the native version of the simplewiki code, like this {{{ class MySimpleWiki extends Muster_SimpleWiki { ... } }}} Then overwrite the calling class shell file, simplewiki.php. simplewiki.php as installed reads: {{{