plugin:previous
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:previous [2010-11-03 16:14] – [previous plugin] Theo-K | plugin:previous [2015-05-27 22:36] (current) – Klap-in | ||
---|---|---|---|
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.txt · Last modified: 2015-05-27 22:36 by Klap-in