The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
Have you tried looking at the query in the admin cp for updating the post counts and thought of just substituting the userid for this one user? (The below code is from misc.php under do=updateposts and is for 3.6.8.)
First you have to get the forums (basically only get the forumids of those that allow post counts): Code:
$forums = $db->query_read(" SELECT forumid FROM " . TABLE_PREFIX . "forum AS forum WHERE (forum.options & " . $vbulletin->bf_misc_forumoptions['countposts'] . ") "); $gotforums = ''; Code:
$totalposts = $db->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$gotforums) AND deletionlog_t.primaryid IS NULL AND deletionlog_p.primaryid IS NULL |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|