Quote:
Originally Posted by ascroft
Hi there - tried that.
I removed the variables for the form (as they don't change when you copy) - anyway this shows the forum ID of what I selected in the drop down but it posted in to the default forum. (65 is the ID of the other forum) Its like it doesn't actually update it prior to submission.
...
|
Try this...
AdminCP -> Plugins & Products -> Add New Plugin
Hook Location
Code:
newthread_post_complete
Title
Code:
Move Thread created by easy forms
PHP Code
PHP Code:
if ($fid == 43)
{
$forumid = $q['forumid'];
$dataman =& datamanager_init('Thread', $vbulletin, ERRTYPE_ARRAY, 'threadpost');
$dataman->set_existing($threadinfo);
$dataman->setr('forumid', $forumid);
$dataman->pre_save();
if (count($dataman->errors) > 0)
{
foreach ($errors as $error)
{
$errorss .= $error. "<br />";
}
$errormessage = "Form failed to submit. The following error(s) occured: <br /> ".$errorss;
eval(standard_error($errormessage));
}
else
{
$dataman->save();
$foruminfo = fetch_foruminfo($forumid);
$threadinfo = fetch_threadinfo($newpost['threadid']);
mark_thread_read($threadinfo, $foruminfo, $vbulletin->userinfo['userid'], TIMENOW);
}
}
Plugin is active
Change 43 to appropriate form id.