* lang (optional) programming language name, is passed to geshi for code highlighting * if not provided, the plugin will attempt to derive a value from the file name * (refer $extensions in render() method) * title (optional) all text after '|' will be rendered above the main code text with a * different style. * */ if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/'); if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); require_once(DOKU_PLUGIN.'syntax.php'); /** * All DokuWiki plugins to extend the parser/rendering mechanism * need to inherit from this class */ class syntax_plugin_code_code extends DokuWiki_Syntax_Plugin { var $syntax = ""; /** * return some info */ function getInfo(){ return array( 'author' => 'Christopher Smith', 'email' => 'chris@jalakai.co.uk', 'date' => '2005-08-18', 'name' => 'Code Replacement Plugin', 'desc' => 'Replacement for Dokuwiki\'s own handler, adds a title to the box. Syntax: , lang and title are optional. title does not support any dokuwiki markup.', 'url' => 'http://wiki.splitbrain.org/plugin:code', ); } ...