3 Allows to embed a RSS feed into a page. It retrieves and decodes the
4 external URL and caches results in the database for later reuse.
6 <?plugin Syndicate url="http://example.com/rss.php" limit=10 ?>
8 @depends: http, http_cache, xml, feed, feedparse
12 $ewiki_plugins["mpi"]["syndicate"] = "ewiki_mpi_syndicate";
14 function ewiki_mpi_syndicate($action, &$args, &$iii, &$s) {
18 ($url = $args["url"]) or ($args = $args["_"]);
19 ($cut = $args["limit"]) or ($cut = $args["cut"]) or ($cut = 10);
22 list($channel, $item) = ewiki_feed_get($url);
24 #-- insert as html into current page
26 $o = "<b><a href=\"".htmlentities($channel[link])."\">".htmlentities($channel[title]) . "</a></b><br />\n";
27 $item = array_slice($item, 0, $cut);
28 foreach ($item as $dat) {
29 $dat = array_map("htmlentities", $dat);
30 $o .= "<a href=\"$dat[link]\">$dat[title]</a> $dat[description] <br />\n";