Ive been given a script for the most viewed Thread. (From Script keeper)
See it here
http://www.audiotoolers.com/ubbt/ubbthreads.php/forum_summary.htmlwith a little tweak it could behave as
This weeks most viewed Topics.
With it being locked down to X days then it wont
stand still. 7 days being from the date of creation?
$notIn = '6';
$limit = 10;
$orderBy = 't.TOPIC_VIEWS';
$notIn = ($notIn) ? 'WHERE f.FORUM_ID NOT IN ('.$notIn.') ' : 'WHERE 1 ';
$stuff = '<table width="100%" cellspacing="0" cellpadding="1" border="0">';
$query = "
SELECT t.TOPIC_SUBJECT, t.TOPIC_VIEWS, t.POST_ID
FROM {$config['TABLE_PREFIX']}TOPICS t,
{$config['TABLE_PREFIX']}POSTS p,
{$config['TABLE_PREFIX']}FORUMS f,
{$config['TABLE_PREFIX']}USERS u
$notIn
AND t.FORUM_ID = f.FORUM_ID
AND t.TOPIC_IS_APPROVED = 1
AND t.TOPIC_LAST_POST_ID = p.POST_ID
AND t.TOPIC_LAST_POSTER_ID = u.USER_ID
ORDER BY $orderBy DESC
LIMIT $limit
";
$sth = $dbh->do_query($query,__LINE__,__FILE__);
$innerds = '';
$rowNum = 0;
while(list($pSubj,$tViews,$tPostID) = $dbh->fetch_array($sth)) {
$count = $tViews;
$innerds .= '<tr><td align=left style="border-bottom: 1px solid #202020;"><a href="'.$config['FULL_URL'].'/ubbthreads.php?ubb=showflat&Number='.$tPostID.'">'.$pSubj.'</a></td>
<td align=right valign=top style="border-bottom: 1px solid #202020;">'.$count.'</td></tr>';
$rowNum++;
}
$stuff .= $innerds.'</table>';
$body = <<<EOF
$stuff
EOF;
Sir Dude put the above together so credits to him
So that could be a New Stock Custom island ?
Just an idea as your looking for something quick.