Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 11-11-2007, 03:50 PM
LittleB@ LittleB@ is offline
 
Join Date: Oct 2007
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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? )
Reply With Quote
  #2  
Old 11-11-2007, 04:09 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 11-11-2007, 04:19 PM
LittleB@ LittleB@ is offline
 
Join Date: Oct 2007
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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? =)
Reply With Quote
  #4  
Old 11-11-2007, 05:47 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 11-12-2007, 11:52 AM
LittleB@ LittleB@ is offline
 
Join Date: Oct 2007
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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)
Reply With Quote
  #6  
Old 11-16-2007, 01:45 AM
LittleB@ LittleB@ is offline
 
Join Date: Oct 2007
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone else able to shed some light on this? =)
Reply With Quote
  #7  
Old 11-16-2007, 12:14 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Don't you need another set of code to generate the second topic?
Reply With Quote
  #8  
Old 11-17-2007, 12:41 PM
LittleB@ LittleB@ is offline
 
Join Date: Oct 2007
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Opserty View Post
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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:06 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06167 seconds
  • Memory Usage 2,244KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete