View Full Version : DataManager Thread_FirstPost help.

17 Nov 2009, 20:18
I have the following code which worked perfectly in 3.8.x...

$threaddm =& datamanager_init('Thread_FirstPost', $vbulletin, ERRTYPE_ARRAY, 'threadpost');
$threaddm->set_info('forum', $foruminfo);
$threaddm->registry->options['floodchecktime'] = 0;
$threaddm->set('forumid', $forumid);
$threaddm->set('username', $username);
$threaddm->set('title', $title);
$threaddm->set('prefixid', strtolower($section));
$threaddm->set('pagetext', '$placeholder');
$threaddm->set('allowsmilie', 0);
$threaddm->set('lastposter', $username);
$threaddm->set('visible', 1);
$threaddm->set('dateline', time());

in 4.0.x it creates a thread as expected, database info looks fine... however...

When I view forumdisplay the prefixid's don't show. Am I missing something?

If I advance edit the thread and assign the prefixid again it does show.

17 Nov 2009, 20:23
prefixid is set by $section. Have you done any testing regarding that variable yet - making sure it is set and such?

17 Nov 2009, 20:30
I know that its inserting correctly as I can see in the database that its correct, its just not displaying the prefix in forumdisplay.

I am wondering if there is some datastore or cache i need to rebuild after creating a thread this way?

17 Nov 2009, 20:37
So it is showing the correct last post, but just not the prefix? What is in the page source? And it shows prefixes for other threads on the forumdisplay page?

17 Nov 2009, 22:49
I will have to look through the standard newpost code and see if I am missing something.

--------------- Added 1258522512 at 1258522512 ---------------

my bad, the code above works fine, seems i was sleepy when i created my prefix's and made a few of them in capitals :/