Subversion Repositories Applications.papyrus

Rev

Rev 773 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 773 Rev 832
1
<?php
1
<?php
2
require_once GEN_CHEMIN_API.'syndication_rss/syndication_rss.php';
2
require_once GEN_CHEMIN_API.'syndication_rss/syndication_rss.php';
3
 
3
 
4
class Text_Wiki_Render_Xhtml_Syndication extends Text_Wiki_Render {
4
class Text_Wiki_Render_Xhtml_Syndication extends Text_Wiki_Render {
5
    
5
    
6
    /**
6
    /**
7
    * 
7
    * 
8
    * Renders a token into text matching the requested format.
8
    * Renders a token into text matching the requested format.
9
    * 
9
    * 
10
    * @access public
10
    * @access public
11
    * 
11
    * 
12
    * @param array $options The "options" portion of the token (second
12
    * @param array $options The "options" portion of the token (second
13
    * element).
13
    * element).
14
    * 
14
    * 
15
    * @return string The text rendered from the token options.
15
    * @return string The text rendered from the token options.
16
    * 
16
    * 
17
    */
17
    */
18
    
18
    
19
    function token($options)
19
    function token($options)
20
    {
20
    {
21
	// Initialisation des variables
21
	// Initialisation des variables
22
        $sortie = '';
22
        $sortie = '';
23
        $titre = $options['titre'];
23
        $titre = $options['titre'];
24
        $urls = $options['url'];
24
        $urls = $options['url'];
25
        $nblimite = $options['nb'];
25
        $nblimite = $options['nb'];
26
        $nouvellefenetre = $options['nouvellefenetre'];
26
        $nouvellefenetre = $options['nouvellefenetre'];
27
        $formatdate = $options['formatdate'];
27
        $formatdate = $options['formatdate'];
28
        $tab_url = array_map('trim', explode(',', $urls));
28
        $tab_url = array_map('trim', explode(',', $urls));
29
        foreach ($tab_url as $cle => $url) {
29
        foreach ($tab_url as $cle => $url) {
30
             $url = str_replace('&amp;', '&', $url) ;
30
             $url = str_replace('&amp;', '&', $url) ;
31
	     $sortie .= voir_rss($titre, $url, $nblimite, $nouvellefenetre, $formatdate);
31
	         $sortie .= voir_rss($titre, $url, $nblimite, $nouvellefenetre, $formatdate);
32
        }
32
        }
33
        return $sortie;
33
        return $sortie;
34
    }
34
    }
35
}
35
}
36
?>
36
?>