I have a contact form on my forum that's powered by a simple script; when submitted, it creates a thread in one of my forums.
Below is the relevant portion of the script:
PHP Code:
$foruminfo = verify_id('forum', $formforumid, 0, 1);
$forumperms = fetch_permissions($foruminfo[forumid]);
$newpost['username'] =& $vbulletin->userinfo['username'];
$newpost['message'] =& $formsend;
$newpost['title'] =& $posttitle;
$newpost['signature'] = '0';
$newpost['parseurl'] = '1';
$newpost['poststarttime'] = $poststarttime;
$newpost['posthash'] = $posthash;
// make sure it doesn't enter the moderation queue
$foruminfo['moderatenewthread'] = 0;
build_new_post('thread', $foruminfo, array(), array(), $newpost, $errors);
My problem is this: whenever someone submits the form, he is automatically subscribed to the thread. Is there some foruminfo or newpost parameter I can set to get around this, or is it being triggered by some forum setting? Thanks for any help.
---
BTW- for anyone having problems with a similar script, your thread may also end up being moderated if you don't either set moderatenewthread to 0 (
see this thread) or use threadman to set visible to 1.
--------------- Added [DATE]1269752666[/DATE] at [TIME]1269752666[/TIME] ---------------
EDIT: Found what was missing. Simply add this:
PHP Code:
$newpost['emailupdate'] = 9999;