Subversion Repositories Applications.papyrus

Rev

Rev 773 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 773 Rev 881
Line 1... Line 1...
1
<?php
1
<?php
2
// $Id: Syndication.php,v 1.4 2006-03-14 16:00:05 florian Exp $
2
// $Id: Syndication.php,v 1.5 2006-07-03 10:07:12 alexandre_tb Exp $
Line 3... Line 3...
3
 
3
 
4
 
4
 
5
/**
5
/**
Line 13... Line 13...
13
* @package Text_Wiki
13
* @package Text_Wiki
14
*
14
*
15
*/
15
*/
16
class Text_Wiki_Parse_Syndication extends Text_Wiki_Parse {
16
class Text_Wiki_Parse_Syndication extends Text_Wiki_Parse {
Line 17... Line 17...
17
    
17
    
Line 18... Line 18...
18
    var $regex = '/\{\{Syndication titre="(.+?)" url="(.+?)" nb=(.+?) nouvellefenetre=(.+?) formatdate="(.+?)"\}\}/';
18
    var $regex = '/\{\{Syndication titre="(.+?)" url="(.+?)" nb=(.+?) nouvellefenetre=(.+?) formatdate="(.+?)"( template="(.+?)")?\}\}/';
19
    
19
    
20
    /**
20
    /**
21
    * 
21
    * 
Line 35... Line 35...
35
    function process(&$matches)
35
    function process(&$matches)
36
    {
36
    {
37
        $options = array(
37
        $options = array(
38
            'titre' => $matches[1], 'url' => $matches[2], 'nb' => $matches[3], 'nouvellefenetre' => $matches[4], 'formatdate' => $matches[5],
38
            'titre' => $matches[1], 'url' => $matches[2], 'nb' => $matches[3], 'nouvellefenetre' => $matches[4], 'formatdate' => $matches[5],
39
        );
39
        );
-
 
40
        if ($matches['7'] != "") $options['template'] = $matches[7]; 
40
        return $this->wiki->addToken($this->rule, $options);
41
        return $this->wiki->addToken($this->rule, $options);
41
    }
42
    }
Line 42... Line 43...
42
    
43
    
43
}
44
}
44
?>
45
?>