RSS ticker in NT

Discuss possible software enhancements/changes here.

Moderator: Matt

Post Reply
Posts: 175
Joined: Fri Apr 16, 2010 8:59 pm
Location: South East QLD, Gold Coast

RSS ticker in NT

Post by djstatic » Sun Aug 02, 2015 9:21 pm

As I was using NT and just updated to the test release, I though it would be good if NT actually told you the latest news (and the news was updated a little more frequently ;)).

I assume some users don't check in to the website or forum as often as they could/should and may miss stuff.

I think NT should have an RSS ticker that scrolls in the status bar (but not bold enough to be distracting), something like this:

I've aggregated the feed already:

This is the php code for it:

Code: Select all

echo "<?xml version=\"1.0\"?>\n<rss version=\"2.0\">\n<channel>\n";

$html = file_get_contents(''); //grab the news page

// find each article
    '/<div id=\'contentbox\'>.*?<a name=\'(.*?)\'><\/a>.*?<span class=\'mediumbold\'>(.*?)<\/span>.*?<i>(.*?)<\/i>.*?<br\/>(.*?)<\/div>.*?<div id=\'spacerbox\'>&nbsp;<\/div>/s',
    $posts, // will contain the news posts
    PREG_SET_ORDER // formats data into an array of posts

// loop through the new posts in RSS/XML format
foreach ($posts as $post) {
    $link = $post[1];
    $title = $post[2];
    $date = $post[3];
    $content = $post[4];

    echo "<item>\n <title>".$date.": ".$title."</title>\n";
    echo "<description>".$content."</description>";
    echo "<link>".$link."</link>\n</item>";

you could just save the code to to pull the news from the site

Post Reply