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 09: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 01: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 01: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 02: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 03: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 03: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 05: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 12:14 PM

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

upkelk 06-22-2009 12:36 AM

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

mme42 06-22-2009 01:29 PM

Quote:

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

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

ludachris 05-27-2010 02:17 PM

Any idea how to make this apply to blog entries too?

Lynne 05-27-2010 09:22 PM

Quote:

Originally Posted by ludachris (Post 2044148)
Any idea how to make this apply to blog entries too?

I would think you could just change THIS_SCRIPT from 'report' to 'blog_report'. I do not have a vB3 blog to try this out on, however.

mosz 11-22-2010 12:00 PM

great information
I was looking for block report for some usergroups :)
THX

Byggahus 02-22-2011 10:36 AM

Thanks, works fine for us as well.

Videx 02-26-2011 01:48 AM

Yes, I can see huge problems if users have to wait 61 seconds to report a second post. :)

Phases 12-13-2011 05:46 PM

Awesome, thank you.

cbiweb 01-24-2012 01:06 PM

Will this work on vB4?

Lynne 01-24-2012 03:17 PM

Quote:

Originally Posted by cbiweb (Post 2291750)
Will this work on vB4?

It's just php, so the php code should work. However, the global_start hook location is deprecated, so you'll need to pick another and may need to globalized $vbulletin.

cbiweb 01-24-2012 06:18 PM

Okay, thanks!

M.C. 06-27-2013 05:34 PM

Hi! is there way to limit it by X per day or so...? thanks! (I need it for 4.2)

Lynne 06-28-2013 02:58 PM

Not by using this plugin, no. You would need to code your own plugin to do that.

M.C. 07-02-2013 05:38 PM

thanks! but... :( need some help!

Lynne 07-03-2013 01:28 AM

This is not the place to ask for help with that. Please post in the appropriate forum if you need help writing a plugin.


All times are GMT. The time now is 02:38 PM.

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.02428 seconds
  • Memory Usage 1,759KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (23)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