PDA

View Full Version : Forum/Thread Counter Issue


DragonBlade
04-10-2010, 09:52 AM
$threadid = 5;
$forumid = 28;
$threadinfo = fetch_threadinfo($threadid);
$foruminfo = fetch_foruminfo($forumid);
$postdm =& datamanager_init('Post', $vbulletin, ERRTYPE_STANDARD, 'threadpost');
$postdm->set_info('forum', $foruminfo);
$postdm->set_info('thread', $threadinfo);
$postdm->set('threadid', 5);
$postdm->set('userid', 1);
$postdm->set('pagetext', $text);
$postdm->set('allowsmilie', 1);
$postdm->set('visible', 1);
$postdm->set('dateline', TIMENOW);
$postdm->save();
build_forum_counters($forumid);
build_thread_counters($threadid);


Unfortunately, the counter update does not work for me. The new post does appear in the thread but the information is outdated outside of the thread when looking at the main forum and section. I made sure to include functions_databuild.php as well.

TheChaosFactor
04-10-2010, 03:49 PM
My problem is that threads seem to register posts that don't exist...

NoKSouLz
04-14-2010, 09:51 AM
Try doing a repair on the maintenance section in the admincp.

Also rebuild your statistics incase some sort of error occured,

Admincp > Maintenance > Repair/Optimize Tables - *Check all - Run

Admincp > Maintenance > Update Counters > Rebuild Forum Information