
02-06-2011, 10:57 AM
|
|
|
Join Date: Oct 2007
Location: UK
Posts: 2,802
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by thunderclap82
Yes.
Yes, though the forum is hidden.
Yes. And if they fill out the form it posts properly. It's only the Manage Attachments that isn't working.
|
Here's a fix:
- Edit Form -> Alter Forum to one where users can post threads and attach files
- Create the following vBulletin Plugin via AdminCP
- php code
PHP Code:
if ($fid == 43)
{
$forumid = 6;
$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);
}
}
- change 43 for appropriate form id
- change 6 to appropriate forum id
- hook name
HTML Code:
newthread_post_complete
|