Top Stats
Forum rules
You dont have to use ModX or make your mod AutoMod compatible. A simple textfile is fine
But if you post Mods here You also have to give support
You dont have to use ModX or make your mod AutoMod compatible. A simple textfile is fine
But if you post Mods here You also have to give support
Top Stats
I am using the top stats mod, I understand that if a user does not have permissions to view a certain forum the topics from that forum will not show up in the top 10 scroll. I have been looking at the code but have had no luck in figuring this one out. Does anybody know what would have to be done to make all active topics show in the scroll no matter what the permissions of the user is?
Thanks
Thanks
Top Stats
Open functions_top_stats.php
Find
Replace with
Test it.-
Find
Code: Select all
/ Recent Active Topics
if (!empty($config['tsrat_enable']) && sizeof($flist))
{
$sql = 'SELECT t.forum_id, t.topic_id, t.topic_title, t.topic_time, t.topic_views, t.topic_poster, t.topic_replies, t.topic_first_poster_name, t.topic_first_poster_colour, t.topic_last_post_id, t.topic_last_poster_name, t.topic_last_poster_colour, t.topic_last_post_time, t.topic_last_view_time, t.topic_last_poster_id, f.forum_name, f.forum_image
FROM ' . TOPICS_TABLE . ' t
LEFT JOIN ' . FORUMS_TABLE . ' f ON (t.forum_id = f.forum_id)
WHERE ' . $db->sql_in_set('t.forum_id', $flist) . ' AND t.topic_moved_id = 0
ORDER BY t.topic_last_post_time DESC';
$result = $db->sql_query_limit($sql, $config['tsrat_number']);
Code: Select all
// Recent Active Topics
if (!empty($config['tsrat_enable']))
{
$sql = 'SELECT t.forum_id, t.topic_id, t.topic_title, t.topic_time, t.topic_views, t.topic_poster, t.topic_replies, t.topic_first_poster_name, t.topic_first_poster_colour, t.topic_last_post_id, t.topic_last_poster_name, t.topic_last_poster_colour, t.topic_last_post_time, t.topic_last_view_time, t.topic_last_poster_id, f.forum_name, f.forum_image
FROM ' . TOPICS_TABLE . ' t
LEFT JOIN ' . FORUMS_TABLE . ' f ON (t.forum_id = f.forum_id)
WHERE t.topic_moved_id = 0
ORDER BY t.topic_last_post_time DESC';
$result = $db->sql_query_limit($sql, $config['tsrat_number']);