Nevermind I figured it out xD
To Update Forum Posts Easily I created a easy modifcation!
Find in /admincp/misc.php
Code:
define('CP_REDIRECT', 'misc.php');
print_stop_message('updated_post_counts_successfully');
}
}
Add Below:
Code:
// ###################### Start update Off Topic Post Counts ################
if ($_REQUEST['do'] == 'updatespam')
{
if (empty($perpage))
{
$perpage = 1000;
}
echo '<p>' . $vbphrase['updating_post_counts'] . '</p>';
$forums = $DB_site->query("
SELECT forumid
FROM " . TABLE_PREFIX . "forum AS forum
WHERE !(forum.options & $_FORUMOPTIONS[countposts])
");
$gootforums = 'X';
while ($forum = $DB_site->fetch_array($forums))
{
$gootforums .= ',' . $forum['forumid'];
}
$users = $DB_site->query("SELECT userid FROM " . TABLE_PREFIX . "user WHERE userid >= $startat AND userid < $finishat ORDER BY userid DESC");
while ($user = $DB_site->fetch_array($users))
{
$totalposts = $DB_site->query_first("
SELECT COUNT(*) AS posts FROM " . TABLE_PREFIX . "post AS post
INNER JOIN " . TABLE_PREFIX . "thread AS thread USING (threadid)
LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog_t ON (deletionlog_t.primaryid = thread.threadid AND deletionlog_t.type = 'thread')
LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog_p ON (deletionlog_p.primaryid = post.postid AND deletionlog_p.type = 'post')
WHERE post.userid = $user[userid] AND
thread.forumid IN (0$gootforums) AND
deletionlog_t.primaryid IS NULL AND
deletionlog_p.primaryid IS NULL
");
$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET otposts=$totalposts[posts] WHERE userid = $user[userid]");
echo construct_phrase($vbphrase['processing_x'], $user['userid']) . "<br />\n";
flush();
}
if ($checkmore = $DB_site->query_first("SELECT userid FROM " . TABLE_PREFIX . "user WHERE userid >= $finishat LIMIT 1"))
{
print_cp_redirect("misc.php?$session[sessionurl]do=updateposts&startat=$finishat&perpage=$perpage");
echo "<p><a href=\"misc.php?$session[sessionurl]do=updateposts&startat=$finishat&perpage=$perpage\">" . $vbphrase['click_here_to_continue_processing'] . "</a></p>";
}
else
{
define('CP_REDIRECT', 'misc.php');
print_stop_message('updated_post_counts_successfully');
}
}
Remember to change X in the above code
To whatever your off topic forums are.
Now Find:
Code:
print_submit_row($vbphrase['update_post_counts']);
Add Below:
Code:
print_form_header('misc', 'updatespam');
print_table_header("Update Off Topic Posts", 2, 0);
print_description_row("This will update the Off Topic Post Count");
print_input_row($vbphrase['number_of_users_to_process_per_cycle'], 'perpage', 1000);
print_submit_row("Update Off Topic Posts");
And there you go! Now you can up date it easily!