Subversion Repositories Applications.papyrus

Rev

Rev 932 | Go to most recent revision | Details | Compare with Previous | 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'];
1060 jp_milcent 25
        $tab_param_optionel = array('nb', 'nouvellefenetre', 'formatdate', 'template');
26
        foreach ($tab_param_optionel as $val) {
27
        	if (isset($options[$val])) {
28
        		$options[$val] = $options[$val];
29
        	} else {
30
        		$options[$val] = null;
31
        	}
32
        }
345 jpm 33
        $tab_url = array_map('trim', explode(',', $urls));
773 florian 34
        foreach ($tab_url as $cle => $url) {
35
             $url = str_replace('&amp;', '&', $url) ;
1060 jp_milcent 36
	         $sortie .= voir_rss($titre, $url, $options['nb'], $options['nouvellefenetre'], $options['formatdate'], $options['template']);
345 jpm 37
        }
38
        return $sortie;
39
    }
40
}
41
?>