plugin:wow
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:wow [2009-09-05 00:38] – 90.2.178.187 | plugin:wow [2018-06-06 09:08] (current) – [Download and Installation] Klap-in | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- plugin ---- | ---- plugin ---- | ||
- | description: | + | description: |
author | author | ||
email : sardemff7.pub@gmail.com | email : sardemff7.pub@gmail.com | ||
type : Syntax | type : Syntax | ||
- | lastupdate : 2009-09-04 | + | lastupdate : 2010-03-08 |
- | tags : | + | tags : |
+ | |||
+ | downloadurl: | ||
---- | ---- | ||
===== Download and Installation ===== | ===== Download and Installation ===== | ||
- | Refer to [[: | + | Download and install the plugin using the [[plugin: |
+ | * http:// | ||
- | The code for french name extract. | + | ===== Features and Changelog ===== |
- | <code php wow/syntax.php> | + | * [2010-03-08] Fix: the regular expression used to get names work only for French. (hope Russian work) |
- | <?php | + | * [2010-03-08] Fix: little typo error (Wowead => Wowhead). |
- | if(!defined(' | + | * [2009-09-22] Add a permanent cache. Will add a cache-clean option later. |
- | if(!defined(' | + | * [2009-09-11] Search name of a spell, a NPC, a zone or a quest by ID, from Wowhead. |
- | require_once(DOKU_PLUGIN.' | + | * [2009-09-11] Can use all different Wowhead languages : French, English, German, Spanish and Russian. |
- | class syntax_plugin_wow extends DokuWiki_Syntax_Plugin | + | ===== Syntax |
- | { | + | |
- | function getInfo() | + | |
- | { | + | |
- | return array( | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ); | + | |
- | } | + | |
- | + | ||
- | function getType() | + | |
- | { | + | |
- | return ' | + | |
- | } | + | |
- | + | ||
- | /* Optionnel | + | |
- | function getAllowedTypes() | + | |
- | { | + | |
- | return array(); | + | |
- | } | + | |
- | */ | + | |
- | + | ||
- | /* Optionnel | + | |
- | function getPType() | + | |
- | { | + | |
- | return ' | + | |
- | } | + | |
- | */ | + | |
- | + | ||
- | function getSort() | + | |
- | { | + | |
- | return 400; | + | |
- | } | + | |
- | + | ||
- | function connectTo($mode) | + | |
- | { | + | |
- | $this-> | + | |
- | / | + | |
- | } | + | |
- | + | ||
- | /* | + | |
- | function postConnect() | + | |
- | { | + | |
- | $this-> | + | |
- | } | + | |
- | */ | + | |
- | + | ||
- | function handle($match, | + | |
- | { | + | |
- | preg_match("# | + | |
- | return array($matches[1], | + | |
- | } | + | |
- | + | ||
- | function render($mode, | + | |
- | { | + | |
- | if( $mode == " | + | |
- | { | + | |
- | list($type, | + | |
- | $link | + | |
- | switch ( $type ) | + | |
- | { | + | |
- | case " | + | |
- | $link .= " | + | |
- | break; | + | |
- | case " | + | |
- | $link .= " | + | |
- | break; | + | |
- | case " | + | |
- | $link .= " | + | |
- | break; | + | |
- | case " | + | |
- | $link .= " | + | |
- | break; | + | |
- | } | + | |
- | $link .= " | + | |
- | $page = http_get($link); | + | |
- | + | ||
- | preg_match('#< | + | |
- | //~ preg_match('#< | + | |
- | $name = $matches[1]; | + | |
- | + | ||
- | preg_match("# | + | |
- | + | ||
- | $renderer-> | + | |
- | return true; | + | |
- | } | + | |
- | return false; | + | |
- | } | + | |
- | } | + | |
- | ?> | + | |
- | </ | + | |
+ | The syntax to use this plugin is very simple: | ||
+ | ~~WoW type: | ||
+ | With: | ||
+ | * //type//: | ||
+ | * **q** for a quest | ||
+ | * **i** for an item | ||
+ | * **s** for a spell | ||
+ | * **n** for a NPC | ||
+ | * **z** for a zone | ||
+ | * **r** for a group of zone ('' | ||
+ | * //number//: the ID of the target on Wowhead (so after the '' |
plugin/wow.1252103914.txt.gz · Last modified: 2009-09-05 00:38 by 90.2.178.187