The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Datamanager doesn't update forum "last post"
I use the following code in a script to move threads to a forum that is otherwise locked:
Code:
$threadman->set('title', "$customprefix $threadinfo[title]"); $threadman->set('forumid', 81); $threadman->save(); $threadman =& datamanager_init('Thread', $vbulletin, ERRTYPE_ARRAY, 'threadpost'); $threadman->set_existing($threadinfo); $threadman->set('lastpost', TIMENOW); $threadman->save(); Thanks for any help! |
#2
|
||||
|
||||
See this post - https://vborg.vbsupport.ru/showthrea...421#post960421
|
#3
|
|||
|
|||
Thanks.
It didn't work at first, but I figured out why. build_forum_counters($threadinfo['forumid']); Would update the forum counters of the original forum, not of the forum to which the thread was moved. I replaced this with: build_forum_counters(81); And we were golden! |
#4
|
||||
|
||||
Glad you got it working.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|