PDA

View Full Version : Change time between reported posts


Lynne
23 May 2009, 20:07
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

if (THIS_SCRIPT == 'report')
$vbulletin->options['emailfloodtime'] = x;

mme42
12 Jun 2009, 16:47
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
12 Jun 2009, 16:56
Probably just something like this:
if (THIS_SCRIPT == 'report')
{
if (is_member_of($vbulletin->userinfo, a,b,c))
{
$vbulletin->options['emailfloodtime'] = xxx;
} else if (is_member_of($vbulletin->userinfo, d,e,f))
{
$vbulletin->options['emailfloodtime'] = yyy;
} else
{
$vbulletin->options['emailfloodtime'] = zzz;
}
}
(Not tested.)

mme42
12 Jun 2009, 17:10
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
12 Jun 2009, 18:11
Yes, that is correct. If you have some specific usergroupids and times, I can try to write it for you.

mme42
12 Jun 2009, 18:43
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
12 Jun 2009, 20:17
Try this:
if (THIS_SCRIPT == 'report')
{
if (is_member_of($vbulletin->userinfo, 5,6,7))
{
$vbulletin->options['emailfloodtime'] = 0;
} else
{
$vbulletin->options['emailfloodtime'] = 30;
}

}

mme42
13 Jun 2009, 15:14
That worked great thanks. I was missing "else."

upkelk
22 Jun 2009, 03:36
That worked great thanks. I was missing "else."

mme42
22 Jun 2009, 16:29
That worked great thanks. I was missing "else."

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

ludachris
27 May 2010, 17:17
Any idea how to make this apply to blog entries too?

Lynne
28 May 2010, 00:22
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
22 Nov 2010, 14:00
great information
I was looking for block report for some usergroups :)
THX

Byggahus
22 Feb 2011, 12:36
Thanks, works fine for us as well.

Videx
26 Feb 2011, 03:48
Yes, I can see huge problems if users have to wait 61 seconds to report a second post. :)

Phases
13 Dec 2011, 19:46
Awesome, thank you.

cbiweb
24 Jan 2012, 15:06
Will this work on vB4?

Lynne
24 Jan 2012, 17:17
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
24 Jan 2012, 20:18
Okay, thanks!

M.C.
27 Jun 2013, 20:34
Hi! is there way to limit it by X per day or so...? thanks! (I need it for 4.2)

Lynne
28 Jun 2013, 17:58
Not by using this plugin, no. You would need to code your own plugin to do that.

M.C.
02 Jul 2013, 20:38
thanks! but... :( need some help!

Lynne
03 Jul 2013, 04:28
This is not the place to ask for help with that. Please post in the appropriate forum if you need help writing a plugin.