<!-- WELCOME TO FORUM -->
*Post reply · Invite friends · From end
Maximax Setting
<!--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=$default_feed,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/science_and_environment/rss.xml
# Other settings
var $per_page=3
var $items=0
var $time_ago=1
var $template=<a href=".link." target="_blank"><span class="title">.title.</span></a><div class="post"><div class="descr">.description.<div class="meta"><span name="pubdate">.pubDate.</span></div></div></div>
get feed
# Cookies
if $feed
call cookie::set $name=last_feed;$val=$feed;$expire=2419200;$force_current=1
else
var $feed=call cookie::get $name=last_feed;$default=$default_feed
endif
<!--/parser:xtscript-->

Copy code


Main
<!--parser:xtscript-->
# Outer container
print <div class="xt_forum"><div id="xt_feed">

# Feed selection menu
var $offset=0
var $action=<xt:url noquery="yes"/>
print <div class="controls compo">
print <form class="" action="$action" method="post">
print <select class="select" name="feed">
@loop0
var $next_feed = call strpos $haystack=$feeds,;$needle=,;$offset=$offset
if not $next_feed
goto @end_select
endif
var $this_feed= call substr $val=$feeds,;$start=$offset;$length=($next_feed-$offset)
var $split=call strpos $haystack=$this_feed;$needle=|
var $option_title=call substr $val=$this_feed;$start=0;$length=$split
if $feed==$this_feed
print <option value="$this_feed" selected="selected">
else 
print <option value="$this_feed">
endif
print $option_title</option>
var $offset=($next_feed+1)
goto @loop0
@end_select
# Submit and close form
print  </select><input class="xt_button submit" type="submit" value="go"/></form></div>
# Main RSS function call
var $feed_split=call strpos $haystack=$feed;$needle=|
var $feed_title=call substr $val=$feed;$start=0;$length=$feed_split
var $feed_url= call substr $val=$feed;$start=($feed_split+1)
get_or_default __xt_content_page;1
var $count=1
var $offset=2
var $template=call htmlspecialchars $val=$template
var $feed=<xt:feed feed="$feed_url" number="$items" template="||$template" />||
var $feed_end=call strlen $val=$feed

print <div class="breadcrumbs compo"><big>$feed_title</big></div>


print <!--parser:xt_pagination-->
@loop
var $start_item=$offset
var $end_item=call strpos $haystack=$feed;$needle=||;$offset=$offset
if not $count > ($__xt_content_page*$per_page) or not $count <= ($__xt_content_page-1*$per_page)
print <div class="thread">
call substr $val=$feed;$start=$start_item;$length=($end_item-$start_item-6)
print </div>
endif

if $count==$per_page
print <!--parser:xt_page_split-->
var $count=0
endif
var $offset=($end_item+2)
if $offset < $feed_end
var $count=($count+1)
goto @loop
endif

print <!--/parser:xt_pagination-->
print </div>
# Close outer container
print </div></div>
<!--/parser:xtscript-->

Copy code


Time ago
<!--parser:xtscript-->
if $time_ago
print_raw {{
<script type="text/javascript"> 
// Function
function timeAgo (dateString) {
var rightNow = new Date();
var then = new Date(dateString);
var diff = rightNow - then;
var second = 1000,
minute = second * 60,
hour = minute * 60,
day = hour * 24,
week = day * 7;
if (isNaN(diff) || diff < 0) {return ""; }
if (diff < second * 2) {return "right now";}
if (diff < minute) {return Math.floor(diff / second) + " seconds ago";}
if (diff < minute * 2) {return "about 1 minute ago";}
if (diff < hour) {return Math.floor(diff / minute) + " minutes ago";}
if (diff < hour * 2) {return "about 1 hour ago";}
if (diff < day) {return  Math.floor(diff / hour) + " hours ago";}
if (diff > day && diff < day * 2) {return "yesterday";}
if (diff < day * 365) {return Math.floor(diff / day) + " days ago";}
else {return "over a year ago";} 
}
// Function call
a=document.getElementsByName('pubdate');
for (b=0;b<a.length;b++){
c=Date.parse(a[b].innerText);
a[b].innerText=timeAgo(c);}
</script>
}}
endif
<!--/parser:xtscript-->

Copy code
2016-11-10 00:40 · Reply · (0)

Online: Guests: 1
Traffic Exchange:
fake Taxi Videos

Total Blog Posted: 012 Entries
Your Internet Service Provider:
Select Themes:

Categories

Blogroll

Disneyland 1972 Love the old s