I'm pretty much lost at this point. Here is the code I have...
PHP Code:
// vBulletin Add Post Function (Start)
$threaddm =& datamanager_init('Thread_FirstPost', $vbulletin, ERRTYPE_ARRAY, 'threadpost');
$forumid = 17;
$foruminfo = fetch_foruminfo($forumid);
$threaddm->set_info('forum', $foruminfo);
$threaddm->set('forumid', $foruminfo['forumid']);
$threaddm->set('userid', $postuserid);
$threaddm->set('title', $title);
$threaddm->set('pagetext', $output);
$threaddm->set('allowsmilie', 0);
$threaddm->set('visible', 1);
$threaddm->set('dateline', TIMENOW);
$threaddm->save();
The code worked prior to my 3.7 upgrade, now it gives this error...
Fatal error: Database object is not an object in
[path]/includes/class_dm.php on line
172
I have the global.php included and directories are correct... like I said, this all worked pre-3.7. Any ideas? The output and title variables are set, by the way.
--------------- Added [DATE]1214074111[/DATE] at [TIME]1214074111[/TIME] ---------------
OK, so I took the code and put it into its own page and it works fine. Putting it into the page's IF statement seems to break it and gives me the error indicated above.