*/ 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'); class Syntax_Plugin_symbols extends DokuWiki_Syntax_Plugin { function getInfo() { return array( 'author' => 'Dan Kreiser', 'email' => 'dan-kreiser@gmail.com', 'date' => '2011-03-01', 'name' => 'symbols', 'desc' => 'display some small symbols', 'url' => 'http://www.tux-tips.de/tux-wiki/doku.php?id=start:dokuwiki:plugins', ); } /** * What kind of syntax are we? */ function getType(){ return 'substition'; } /** * What can we Do? */ function getAllowedTypes() { return array(); } /** * Where to sort in? */ function getSort(){ return 999; } function connectTo($mode) { $this->Lexer->addSpecialPattern('i_alert_icon',$mode,'plugin_symbols'); $this->Lexer->addSpecialPattern('i_apple_icon',$mode,'plugin_symbols'); $this->Lexer->addSpecialPattern('i_english_icon',$mode,'plugin_symbols'); $this->Lexer->addSpecialPattern('i_fax_icon',$mode,'plugin_symbols'); $this->Lexer->addSpecialPattern('i_german_icon',$mode,'plugin_symbols'); $this->Lexer->addSpecialPattern('i_help_icon',$mode,'plugin_symbols'); $this->Lexer->addSpecialPattern('i_home_icon',$mode,'plugin_symbols'); $this->Lexer->addSpecialPattern('i_ihp_icon',$mode,'plugin_symbols'); $this->Lexer->addSpecialPattern('i_important_icon',$mode,'plugin_symbols'); $this->Lexer->addSpecialPattern('i_info_icon',$mode,'plugin_symbols'); $this->Lexer->addSpecialPattern('i_linux_icon',$mode,'plugin_symbols'); $this->Lexer->addSpecialPattern('i_mail_icon',$mode,'plugin_symbols'); $this->Lexer->addSpecialPattern('i_no_icon',$mode,'plugin_symbols'); $this->Lexer->addSpecialPattern('i_opensource_icon',$mode,'plugin_symbols'); $this->Lexer->addSpecialPattern('i_phone_icon',$mode,'plugin_symbols'); $this->Lexer->addSpecialPattern('i_star_icon',$mode,'plugin_symbols'); $this->Lexer->addSpecialPattern('i_tip_icon',$mode,'plugin_symbols'); $this->Lexer->addSpecialPattern('i_todo_icon',$mode,'plugin_symbols'); $this->Lexer->addSpecialPattern('i_windows_icon',$mode,'plugin_symbols'); $this->Lexer->addSpecialPattern('i_yes_icon',$mode,'plugin_symbols'); } function handle($match, $state, $pos, &$handler) { return array($match); } function render($mode, &$renderer, $data) { $name= substr($data[0],2, -5); $renderer->doc .= '' . $name . ''; return true; } }