New file |
0,0 → 1,36 |
<?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('&', '&', $url) ; |
$sortie .= voir_rss($titre, $url, $nblimite, $nouvellefenetre, $formatdate); |
} |
return $sortie; |
} |
} |
?> |