diff options
Diffstat (limited to 'inc/parser/handler.php')
-rw-r--r-- | inc/parser/handler.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 9cc53c42f..7a8fc9bc2 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -456,7 +456,22 @@ class Doku_Handler { function rss($match, $state, $pos) { $link = preg_replace(array('/^\{\{rss>/','/\}\}$/'),'',$match); - $this->_addCall('rss',array($link),$pos); + + // get params + list($link,$params) = explode(' ',$link,2); + + $p = array(); + if(preg_match('/\b(\d+)\b/',$params,$match)){ + $p['max'] = $match[1]; + }else{ + $p['max'] = 8; + } + $p['reverse'] = (preg_match('/rev/',$params)); + $p['author'] = (preg_match('/\b(by|author)/',$params)); + $p['date'] = (preg_match('/\b(date)/',$params)); + $p['details'] = (preg_match('/\b(desc|detail)/',$params)); + + $this->_addCall('rss',array($link,$p),$pos); return TRUE; } |