Dragonfly CMS v9 ⇒ Modules & Blocks :: Archives ⇒ How to make a 'Top 10 News' RSS feed? :: Archived ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexModules & Blocks

Archived ⇒ How to make a 'Top 10 News' RSS feed?


I know how to code a normal RSS feed, but how would you go about coding a 'Top 10 from yesterday's News' feed? I get a lot of news each day so this would be great for me.

Any ideas?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Unix / 2.0.46 (Red Hat) / 0.9.7a / 4.1.9-standard / 4.3.2 / 9.0.6.1


Thanks for the help...

What I did was I copied /rss/news2.php to top_news.php

I then changes the $where variable and the SQL query of the new file to the following:

$time1 = gmtime() - (1 * 86400);
$time2 = gmtime() - (2 * 86400);

$where = (isset($_GET['cat']) && is_numeric($_GET['cat'])) ? 'WHERE time >= '.$time2.' and time < '.$time1.' and catid='.intval($_GET['cat']) : 'where time >= '.$time2.' and time < '.$time1;

$result = $db->sql_query('SELECT sid, title, time, hometext, score+ratings as SUMM FROM '.$prefix.'_stories '.$where.' order by SUMM DESC, ratings DESC LIMIT 0, 15');

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Unix / 2.0.46 (Red Hat) / 0.9.7a / 4.1.9-standard / 4.3.2 / 9.0.6.1

All times are UTC