plugin:previous
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
plugin:previous [2010-11-03 16:12] – created Theo-K | plugin:previous [2015-05-27 22:36] (current) – Klap-in | ||
---|---|---|---|
Line 5: | Line 5: | ||
author | author | ||
email : tr.klein AT tvm DOT nl | email : tr.klein AT tvm DOT nl | ||
- | type : | + | type : |
lastupdate : 2010-11-03 | lastupdate : 2010-11-03 | ||
compatible : | compatible : | ||
Line 11: | Line 11: | ||
conflicts | conflicts | ||
similar | similar | ||
- | tags : | + | tags : |
---- | ---- | ||
Line 19: | Line 19: | ||
In your plugins folder create a folder named " | In your plugins folder create a folder named " | ||
- | <code php> | + | < |
<?php | <?php | ||
/** | /** | ||
Line 31: | Line 31: | ||
if (!defined(' | if (!defined(' | ||
- | if (!defined(' | ||
- | if (!defined(' | ||
- | if (!defined(' | ||
- | |||
- | require_once DOKU_PLUGIN.' | ||
class syntax_plugin_previous extends DokuWiki_Syntax_Plugin { | class syntax_plugin_previous extends DokuWiki_Syntax_Plugin { | ||
Line 46: | Line 41: | ||
- | function handle($match, | + | function handle($match, |
$match = substr($match, | $match = substr($match, | ||
list($url, $alt) = explode('>', | list($url, $alt) = explode('>', | ||
Line 59: | Line 54: | ||
- | function render($mode, | + | function render($mode, |
if($mode != ' | if($mode != ' | ||
- | if(!$data[' | ||
$R->doc .= '< | $R->doc .= '< | ||
$R->doc .= '<a href=" | $R->doc .= '<a href=" | ||
Line 68: | Line 62: | ||
$R->doc .= '</ | $R->doc .= '</ | ||
$R->doc .= '</ | $R->doc .= '</ | ||
- | }else{ | + | |
- | $opts = array( | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ); | + | |
- | if(!$data[' | + | |
- | if(!$data[' | + | |
- | if($data[' | + | |
- | $params = buildAttributes($opts); | + | |
- | + | ||
- | $R->doc .= '< | + | |
- | $R->doc .= '<a href=" | + | |
- | $R->doc .= hsc($data[' | + | |
- | $R->doc .= '</ | + | |
- | $R->doc .= '</ | + | |
- | } | + | |
return true; | return true; | ||
} | } | ||
Line 96: | Line 74: | ||
If you want an other color or anything; create a style.css file within the Previous map, with for example: | If you want an other color or anything; create a style.css file within the Previous map, with for example: | ||
- | <code css> | + | < |
div.plugin_previous a{ | div.plugin_previous a{ | ||
color: #007500 !important; | color: #007500 !important; |
plugin/previous.1288797137.txt.gz · Last modified: 2010-11-03 16:12 by Theo-K