Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin Tips & Tricks
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Change time between reported posts
Lynne's Avatar
Lynne
Join Date: Sep 2004
Posts: 41,180

 

California/Idaho
Show Printable Version Email this Page Subscription
Lynne Lynne is offline 05-22-2009, 10:00 PM

The time allowed between reporting posts is set by the vBulletin Option "Email Flood Check". Sometimes you want to have that value set to one thing (default is 60 seconds), but allow users to report posts sooner than that value. To do this, you may create a simple plugin (change 'x' to be the time you wish, in seconds, to allow between reported posts):

hook_location: global_start

PHP Code:
if (THIS_SCRIPT == 'report'
$vbulletin->options['emailfloodtime'] = x
Reply With Quote
  #2  
Old 06-12-2009, 02:47 PM
mme42 mme42 is offline
 
Join Date: Feb 2009
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Lynne, it's working great. Is there an easy way to modify it so that you can have different time limits for different usergroups?
Reply With Quote
  #3  
Old 06-12-2009, 02:56 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Probably just something like this:
PHP Code:
if (THIS_SCRIPT == 'report'
{
  if (
is_member_of($vbulletin->userinfoa,b,c))
  {
    
$vbulletin->options['emailfloodtime'] = xxx;  
  } else if (
is_member_of($vbulletin->userinfod,e,f))
  {
    
$vbulletin->options['emailfloodtime'] = yyy;  
  } else
  {
    
$vbulletin->options['emailfloodtime'] = zzz;  
  }

(Not tested.)
Reply With Quote
  #4  
Old 06-12-2009, 03:10 PM
mme42 mme42 is offline
 
Join Date: Feb 2009
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow, quick reply, thanks. So as far as replacing....

a,b,c = first set of usergroup IDs
xxx = sets time for first set

d,e,f = second set of usergroup IDs
yyy = sets time for second set

zzz = default time for usergroups not defined?

Is that correct?
Reply With Quote
  #5  
Old 06-12-2009, 04:11 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, that is correct. If you have some specific usergroupids and times, I can try to write it for you.
Reply With Quote
  #6  
Old 06-12-2009, 04:43 PM
mme42 mme42 is offline
 
Join Date: Feb 2009
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great. Because I tried and it didn't seem to work out for me. I just want 5,6,7 (mods and up, though I think admins are exempt anyway right?) at 0/no limit. And all others at 30s. I think I messed up by trying to remove the second group (else if).
Reply With Quote
  #7  
Old 06-12-2009, 06:17 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this:
PHP Code:
if (THIS_SCRIPT == 'report'
{
  if (
is_member_of($vbulletin->userinfo5,6,7))
  {
    
$vbulletin->options['emailfloodtime'] = 0;  
  } else
  {
    
$vbulletin->options['emailfloodtime'] = 30;  
  }


Reply With Quote
  #8  
Old 06-13-2009, 01:14 PM
mme42 mme42 is offline
 
Join Date: Feb 2009
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That worked great thanks. I was missing "else."
Reply With Quote
  #9  
Old 06-22-2009, 01:36 AM
upkelk upkelk is offline
 
Join Date: Jun 2009
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That worked great thanks. I was missing "else."
Reply With Quote
  #10  
Old 06-22-2009, 02:29 PM
mme42 mme42 is offline
 
Join Date: Feb 2009
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by upkelk View Post
That worked great thanks. I was missing "else."
Uhh.....? Are you copying me?
Reply With Quote
Reply


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:10 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.04980 seconds
  • Memory Usage 2,296KB
  • Queries Executed 25 (?)
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
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (2)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete