vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Post Flood Check - work around? (https://vborg.vbsupport.ru/showthread.php?t=162444)

LittleB@ 11-11-2007 03:50 PM

Post Flood Check - work around?
 
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

Quote:

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:
PHP Code:

$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?

Code:


$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 [DATE]1194806172[/DATE] at [TIME]1194806172[/TIME] ---------------

hmm, just got a error:

Code:

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 [DATE]1194807418[/DATE] at [TIME]1194807418[/TIME] ---------------

Anyone else able to give me a suggestion? =)

Opserty 11-11-2007 05:47 PM

Try this:
PHP Code:

$formforumid "13";
            
$foruminfo verify_id('forum'$formforumid01);
$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

Quote:

Originally Posted by Opserty (Post 1383716)
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.


All times are GMT. The time now is 09:14 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01114 seconds
  • Memory Usage 1,754KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete