Subversion Repositories Applications.papyrus

Rev

Rev 773 | Go to most recent revision | Blame | Last modification | View Log | RSS feed

<?php
require_once GEN_CHEMIN_API.'syndication_rss/syndication_rss.php';

class Text_Wiki_Render_Xhtml_Syndication extends Text_Wiki_Render {
    
    /**
    * 
    * Renders a token into text matching the requested format.
    * 
    * @access public
    * 
    * @param array $options The "options" portion of the token (second
    * element).
    * 
    * @return string The text rendered from the token options.
    * 
    */
    
    function token($options)
    {
        // Initialisation des variables
        $sortie = '';
        $titre = $options['titre'];
        $urls = $options['url'];
        $nblimite = $options['nb'];
        $nouvellefenetre = $options['nouvellefenetre'];
        $formatdate = $options['formatdate'];
        $tab_url = array_map('trim', explode(',', $urls));
        foreach ($tab_url as $cle => $url) {
             $url = str_replace('&amp;', '&', $url) ;
                 $sortie .= voir_rss($titre, $url, $nblimite, $nouvellefenetre, $formatdate);
        }
        return $sortie;
    }
}
?>