MyBB Community Forums

Full Version: Maximum number of threads per day in X forum
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(2013-12-06, 10:13 PM)brad-t Wrote: [ -> ]Yeah, if there's a demand for this it might be worth fleshing out more. Maybe make a thread in dev? Thanks a bunch!

Will do.

I'll see if I can make some edits tonight and merge them probably by tomorrow. I know what I have to remove, some things would just have to be reformatted.

I'll throw up a thread in Plugin Releases once I'm complete that.

Thanks!
Seems like the plugin has an issue – I have it enabled for FID 15 and someone created a new thread in a different forum and consequently wasn't able to create a forum in FID 15. It should only take into account new threads created in the blocked forum; I don't know if this is a bug or a misunderstanding.
This was probably a misunderstand on my part. I apologize. The plugin was miscoded I guess to only query the amount of threads created per day on a global scale, and activate the block if that amount was reached.

I'll update the query so that it filters by the forum they are posting in, and edit here when I am done.

Thanks and I apologize for any inconveniences again.

-----
Update: I Updated the query. It should no longer limit them on a global scale. Let me know if this works as I am unable to test it right now, and if you have any more issues.

Thanks Smile
(2013-12-06, 06:39 AM)crazy4cs Wrote: [ -> ]edit: Alright, saw his file over at GitHub, replace these:

$plugins->add_hook('newreply_do_newreply_start', 'dailymaximum_start');
$plugins->add_hook('newthread_do_newthread_start', 'dailymaximum_start');

with:

$plugins->add_hook('newreply_start', 'dailymaximum_start');
$plugins->add_hook('newthread_start', 'dailymaximum_start');

Actually, AFAIU you need the four hooks for the plugin to work properly. Users could still be able to post if you don't block the post requests.
(2013-12-09, 01:04 AM)Omar G. Wrote: [ -> ]
(2013-12-06, 06:39 AM)crazy4cs Wrote: [ -> ]edit: Alright, saw his file over at GitHub, replace these:

$plugins->add_hook('newreply_do_newreply_start', 'dailymaximum_start');
$plugins->add_hook('newthread_do_newthread_start', 'dailymaximum_start');

with:

$plugins->add_hook('newreply_start', 'dailymaximum_start');
$plugins->add_hook('newthread_start', 'dailymaximum_start');

Actually, AFAIU you need the four hooks for the plugin to work properly. Users could still be able to post if you don't block the post requests.

Actually. To block the post requests. It wouldn't happen that often though, but nonetheless. That's a good point. I Didn't know for sure so I just left it out.

Thanks Smile I'll add it back in now (all 4)

Note: I'll probably be cleaning the plugin up soon. It's still functional as of now though.
(2013-12-09, 01:04 AM)Omar G. Wrote: [ -> ]
(2013-12-06, 06:39 AM)crazy4cs Wrote: [ -> ]edit: Alright, saw his file over at GitHub, replace these:

$plugins->add_hook('newreply_do_newreply_start', 'dailymaximum_start');
$plugins->add_hook('newthread_do_newthread_start', 'dailymaximum_start');

with:

$plugins->add_hook('newreply_start', 'dailymaximum_start');
$plugins->add_hook('newthread_start', 'dailymaximum_start');

Actually, AFAIU you need the four hooks for the plugin to work properly. Users could still be able to post if you don't block the post requests.
That's still hard considering a user would need to send a post request directly, but yeah, I do get your point. Any possible abuse needs to be blocked. Smile
Pages: 1 2 3