Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

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