Settings Xtscript
must go above the main Xtscript
Main Xtscript
Must go below the settings Xtscript
Time ago xtscript/javascript
Must go below the main Xtscript
For "time ago" conversion to work
.pubDate. must be wrapped in a element named pubdate in the $template variable
Comments:
<!--parser:xtscript-->
Default feed \( title and url separate with | )
var \$default_feed=Yahoo world news|https://uk.news.yahoo.com/rss/world
More Feeds \( title and url separate with | ) \( feed data chunks separate with , I use separate lines for clarity )
var \$feeds=\$defaultfeed,BBC world news|http://feeds.bbci.co.uk/news/world/rss.xml
var \$feeds=\$feeds,Yahoo oddly enough|https://uk.news.yahoo.com/rss/oddly-enough
var \$feeds=\$feeds,BBC science and enviroment news|http://feeds.bbci.co.uk/news/scienceand_environment/rss.xml
Other settings
var \$perpage=3
var \$items=0
var \$timeago=1
var \$template=<div class="xtfeeditem"><a href=".link.">.title.</a><br /><div name="pubdate">.pubDate.</div>.description.</div>
get feed
Cookies
if \$feed
call cookie::set \$name=lastfeed;\$val=\$feed;\$expire=2419200;\$forcecurrent=1
else
var \$feed=call cookie::get \$name=lastfeed;\$default=\$defaultfeed
endif
<!--/parser:xtscript-->