Hi there.
One thing I noted today, when the thread is moved to the correct forum, is that it doesn't update the 'header' type of information in the forum summary i.e. last post details, no. of threads/posts. The thread itself is there fine. Example is:
http://www.shackchat.co.nz/listings/...lington-Region
I am thinking this needs more code to be added to the plugin in possibly?
Many thanks
Mark
Quote:
Originally Posted by bananalive
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.
|