PDA

View Full Version : Post Flood Check - work around?


LittleB@
11-11-2007, 03:50 PM
Hi, I made this topic in the General Discussion but figured it might be to much coding for it so I should prolly post it here.

Link to topic: https://vborg.vbsupport.ru/showthread.php?t=162414

As the topic suggests I am looking for a way to Disable Post Flood Check for a specific forum or a specific user group and I do not know where to start looking.

I currently have a hack which gives users a application form - they fill in the form and press submit, now the plugin automatically makes a topic in the (Public)Recruitment Forum so that me and my moderators can keep an open discussion with the applicant - at the same time the hack also posts an identical topic in a (Hidden)Application Forum where me and my modds can talk freely about the applicant.

The problem here is post flood check as for me and my modds we have no problems at all - making test applications we always end up with two new topics exactly where we want them but when users of the Registered Users user group submits the form they only succeed in creating the first topic.

Now I do not want to disable the entire flood check system but rather temporarily grant Registered Users the same privilege as mods/admins or just edit the hack with some simple code line, for example

$floodcheck = "no";

or something like it (please note that I am unaware of where to find this flood check as well as what the real name of the variables are)

As long as I know where to look I guess I could just add a variable on my own and present the flood check with a if-statement like

if($applicationform == "0")
{
- original flood check code
};

so... any1 able to give me directions of where to find the flood check? or in some other way help me solve the problem?

thnx

--------------- Added 11 Nov 2007 at 18:47 ---------------

I might add that I searched all templates with the function to do so but wasnt sure of what to look for =/

oh, and is this the right sub-forum or should I post in the programming discussion?
(if yes, could some1 move my topic to prevent double posting of identical topics? )

Opserty
11-11-2007, 04:09 PM
How does your application script work? Does it use the datamanagers?

I'm taking a wild guess here but if you add a line like:
$threaddm->set_info('skip_floodcheck', true);
It might work but I'm not 100% sure.

LittleB@
11-11-2007, 04:19 PM
The hack looks like this, I guess it's datamanagers?



$formforumid = "13";

$foruminfo = verify_id('forum', $formforumid, 0, 1);
$forumperms = fetch_permissions($foruminfo[forumid]);

$newpost['username'] =& $vbulletin->userinfo['username'];
$newpost['message'] =& $formsend;
$newpost['title'] =& $posttitle;
$newpost['parseurl'] = '1';
$newpost['poststarttime'] = $poststarttime;
$newpost['posthash'] = $posthash;

if ($vbulletin->userinfo['autosubscribe'] != -1)
{
$newpost['emailupdate'] = $vbulletin->userinfo['autosubscribe'];
}
else
{
$newpost['emailupdate'] = 9999;
}

if ($vbulletin->userinfo['signature'] != '')
{
$newpost['signature'] = '1';
}
else
{
$newpost['signature'] = '0';
}

build_new_post('thread', $foruminfo, array(), array(), $newpost, $errors);

I'll add your code into it and see what happens, thnx =)

--------------- Added 1194806172 at 1194806172 ---------------

hmm, just got a error:

Fatal error: Call to a member function set_info() on a non-object in /home/exiled/www/www/forum/newthread.php(71) : eval()'d code on line 377

guess I'll have to add something else as well?

--------------- Added 1194807418 at 1194807418 ---------------

Anyone else able to give me a suggestion? =)

Opserty
11-11-2007, 05:47 PM
Try this:
$formforumid = "13";

$foruminfo = verify_id('forum', $formforumid, 0, 1);
$forumperms = fetch_permissions($foruminfo[forumid]);

$newpost['username'] =& $vbulletin->userinfo['username'];
$newpost['message'] =& $formsend;
$newpost['title'] =& $posttitle;
$newpost['parseurl'] = '1';
$newpost['poststarttime'] = $poststarttime;
$newpost['posthash'] = $posthash;

if ($vbulletin->userinfo['autosubscribe'] != -1)
{
$newpost['emailupdate'] = $vbulletin->userinfo['autosubscribe'];
}
else
{
$newpost['emailupdate'] = 9999;
}

if ($vbulletin->userinfo['signature'] != '')
{
$newpost['signature'] = '1';
}
else
{
$newpost['signature'] = '0';
}

build_new_post('thread', $foruminfo, array(), array('skip_floodcheck' => true), $newpost, $errors);

Again just a guess. :p

LittleB@
11-12-2007, 11:52 AM
nope, still only admins/modds who are able to create two posts - this time however I did not get any errors ^_^

(btw, the user grp trying to post have the right to create new topics but no view access in the "hidden" forum)

LittleB@
11-16-2007, 01:45 AM
Anyone else able to shed some light on this? =)

Opserty
11-16-2007, 12:14 PM
Don't you need another set of code to generate the second topic?

LittleB@
11-17-2007, 12:41 PM
Don't you need another set of code to generate the second topic?

yea, but I only posted the code needed for my "hidden" topic, it's basically the same as the first one but in a different forum.