vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin Tips & Tricks (https://vborg.vbsupport.ru/forumdisplay.php?f=239)
-   -   Change time between reported posts (https://vborg.vbsupport.ru/showthread.php?t=214386)

Lynne 05-22-2009 10:00 PM

Change time between reported posts
 
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


mme42 06-12-2009 02:47 PM

Thanks Lynne, it's working great. :D Is there an easy way to modify it so that you can have different time limits for different usergroups?

Lynne 06-12-2009 02:56 PM

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.)

mme42 06-12-2009 03:10 PM

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?

Lynne 06-12-2009 04:11 PM

Yes, that is correct. If you have some specific usergroupids and times, I can try to write it for you.

mme42 06-12-2009 04:43 PM

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).

Lynne 06-12-2009 06:17 PM

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;  
  }




mme42 06-13-2009 01:14 PM

That worked great thanks. I was missing "else."

upkelk 06-22-2009 01:36 AM

That worked great thanks. I was missing "else."

mme42 06-22-2009 02:29 PM

Quote:

Originally Posted by upkelk (Post 1834469)
That worked great thanks. I was missing "else."

Uhh.....? Are you copying me? :p


All times are GMT. The time now is 06:37 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.01177 seconds
  • Memory Usage 1,739KB
  • 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
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete