Hello there.
I've got one request. There's a script named "Cyb - Advanced Forum Statistics". It work's fine, i just really need one thing to join in this. There's an option to exclude specified forums from statistics, the var is $cybexclforums , but it don't work With TopThreadStarters.
here's part of code connected with topthreadstarters:
so all i need is to "$cybexclforums" join here somehow. I don't really know how to do it, don't know php and mysql.
It would be very nice if you'll be helpful. Thanks.
edit: im using 6,6 version of this script atm, so almost the newest one.
I've got one request. There's a script named "Cyb - Advanced Forum Statistics". It work's fine, i just really need one thing to join in this. There's an option to exclude specified forums from statistics, the var is $cybexclforums , but it don't work With TopThreadStarters.
here's part of code connected with topthreadstarters:
PHP:
if (($_REQUEST['show']=='threadstarters') AND $cybstats_threadstarters_enabled)
{
$db->hide_errors();
$get_stats_starters = $vbulletin->db->query_read("
SELECT COUNT(thread.threadid) AS threads, thread.postuserid, thread.dateline, user.userid, user.usergroupid, user.displaygroupid, user.username
FROM " . TABLE_PREFIX . "thread AS thread
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (thread.postuserid = user.userid)
LEFT JOIN " . TABLE_PREFIX . "forum AS forum ON (forum.forumid = thread.forumid)
WHERE thread.visible='1' AND (forum.options & 4096) AND user.userid > 0 $cybexclgroups_user $cybtopstats_timecut_topstarters
GROUP BY thread.postuserid
ORDER BY threads DESC
LIMIT 0, $resultsnr
");
while ($getstats_starter = $db->fetch_array($get_stats_starters))
{
$cybstats_rnr += 1;
$getstats_starter[threads] = vb_number_format($getstats_starter[threads]);
$getstats_starter[fullusername] = strip_tags($getstats_starter[username]);
if ($trimusername > 0)
{
$getstats_starter[username] = fetch_trimmed_title($getstats_starter[fullusername], $trimusername);
}
else
{
$getstats_starter[username] = $getstats_starter[fullusername];
}
$getstats_starter[musername] = fetch_musername($getstats_starter);
if ($vbulletin->options['cybtopstats_bold_remove'])
{
$getstats_starter[musername] = str_replace($cyb_afs_bpar, "", $getstats_starter[musername]);
}
eval('$cybtopstats_starters .= "' . $vbulletin->templatecache['cyb_topstats_starter'] . '";');
}
if ($vbulletin->db->num_rows($get_stats_starters) < $resultsnr)
{
$cybtopstats_starters .= str_repeat('<tr valign="top"><td class="smallfont" colspan="3" align="center"> </td></tr>', $resultsnr - $vbulletin->db->num_rows($get_stats_starters));
}
unset($get_stats_starters, $getstats_starter);
print_output($cybtopstats_starters);
$db->show_errors();
if (!$cybtopstats_starters)
{
print_output('<tr valign="top"><td class="smallfont" colspan="3" align="center">'.$vbphrase['cybstats_nodata'].'</td></tr>');
}
exit;
}
so all i need is to "$cybexclforums" join here somehow. I don't really know how to do it, don't know php and mysql.
It would be very nice if you'll be helpful. Thanks.
edit: im using 6,6 version of this script atm, so almost the newest one.