plugin:icq
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:icq [2008-01-12 10:49] – 68.75.172.145 | plugin:icq [2023-10-30 22:50] (current) – Klap-in | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== ICQ Plugin ====== | ||
+ | |||
+ | ---- plugin ---- | ||
+ | description: | ||
+ | author | ||
+ | email : koeppe@kazur.dk | ||
+ | type : syntax | ||
+ | lastupdate : 2006-03-28 | ||
+ | compatible : Angua, Adora Belle, Weatherwax, Binky | ||
+ | depends | ||
+ | conflicts | ||
+ | similar | ||
+ | tags : chat, status | ||
+ | |||
+ | downloadurl: | ||
+ | sourcerepo: https:// | ||
+ | bugtracker: https:// | ||
+ | ---- | ||
+ | |||
+ | ===== Syntax ===== | ||
+ | |||
+ | The format is | ||
+ | |||
+ | [[icq>######### | ||
+ | |||
+ | This will insert code | ||
+ | < | ||
+ | <a href=" | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Installation ===== | ||
+ | |||
+ | ==== Plugin ==== | ||
+ | |||
+ | Create a new folder '' | ||
+ | |||
+ | '' | ||
+ | |||
+ | <code php syntax.php> | ||
+ | <?php | ||
+ | /** | ||
+ | * Plugin ICQ: Show if some ICQ user is online. | ||
+ | * | ||
+ | * @license | ||
+ | * @author | ||
+ | */ | ||
+ | |||
+ | if(!defined(' | ||
+ | if(!defined(' | ||
+ | require_once(DOKU_PLUGIN.' | ||
+ | |||
+ | /** | ||
+ | * All DokuWiki plugins to extend the parser/ | ||
+ | * need to inherit from this class | ||
+ | */ | ||
+ | class syntax_plugin_icq extends DokuWiki_Syntax_Plugin { | ||
+ | |||
+ | /** | ||
+ | * return some info | ||
+ | */ | ||
+ | function getInfo(){ | ||
+ | return array( | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ); | ||
+ | } | ||
+ | |||
+ | /** | ||
+ | * What kind of syntax are we? | ||
+ | */ | ||
+ | function getType(){ | ||
+ | return ' | ||
+ | } | ||
+ | |||
+ | function getSort(){ return 298; } | ||
+ | |||
+ | function connectTo($mode) { | ||
+ | $this-> | ||
+ | } | ||
+ | |||
+ | |||
+ | /** | ||
+ | * Handle the match | ||
+ | */ | ||
+ | function handle($match, | ||
+ | $match = substr($match, | ||
+ | return array(strtolower($match)); | ||
+ | } | ||
+ | |||
+ | /** | ||
+ | * Create output | ||
+ | */ | ||
+ | function render($mode, | ||
+ | if($mode == ' | ||
+ | $renderer-> | ||
+ | $renderer-> | ||
+ | $renderer-> | ||
+ | return true; | ||
+ | } | ||
+ | return false; | ||
+ | } | ||
+ | } | ||
+ | ?> | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ===== Discussion ===== | ||
+ | |||
+ | If you want to show not only ICQ flower, but UIN, make following changes in function **render**: | ||
+ | <code php> | ||
+ | function render($mode, | ||
+ | if($mode == ' | ||
+ | $renderer-> | ||
+ | $renderer-> | ||
+ | $renderer-> | ||
+ | return true; | ||
+ | } | ||
+ | return false; | ||
+ | } | ||
+ | |||
+ | </ | ||