MyBB Community Forums

Full Version: Anti-Flood/Leech System
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone Smile

Overview :
This plugin allows you to forbid users from posting in specific forums if they don't post in other sections.

Options :
- Sections which are concerned by the system
- Maximum messages that can be posted in a row, in those sections
- Needed posts count in other sections to unset the antiflood
- Notification text

Note :
FID = Forum ID
You can get it by hovering the link of the specific section, you get for example : forumdisplay.php?fid=5
Means the FID is 5

Download in MyBB Mods : https://community.mybb.com/mods.php?acti...w&pid=1077

Github : https://github.com/DD-GitH/mybb-anti-flood-leech
Support : https://developement.design/forum/Forum-support--13
Website : https://developement.design/
Skype : ef.team
Email : [email protected] (for business only)

To support our contributions, please donate to us in MyBB mods page : https://community.mybb.com/mods.php?acti...w&pid=1037

Best Regards,
AmazOuz
You have forumselect, forumselectsingle, groupselect, and groupselectsingle at your disposal for more user friendly experience. IIRC the single setting types were included after 1.8.0 but the other two should be available for use since it.

You might want it to be available for 1.6 users but lets be honest, that version is years behind and prolonging its life usage isn't worth it nor are you doing any good to its user base by allowing them to prolong their updates.

You should also make use of the install/uninstall routines imo instead of creating an unnecessary "activate" setting but this is very common practice and not a big deal I suppose. As for settings and templates I would recommend to improve deletion as well. With your current code you are deleting all "antiflood" templates even if these weren't included by you for example, or if users created custom settings inside your setting group (can't think of any reason why but possible none the less) they will be left orphan after deleting the group altogether without checking if there were another settings left. Contrary to templates in this case I believe you should indeed delete all settings inside the setting group regardless of who created them (at least the way you implemented templates).

As for vulnerabilities well, I would sanitize anything that goes into a query ( $mybb->user['uid'] ) regardless of the implication of its safeness, but that would be me, and if anything your plugin is likely not be the culprit.

As for implementation, I would probably have looked into another way instead of adding a query in show thread specially considering you are querying the post table, but I'm not sure what I would've implemented myself (probably display the quick reply even if they can't use it?). But for the error message you can use _error_no_permission()_ instead of a new template. Or simply _error()_.

Good luck and thanks for contributing, its always nice to review new code. (If you don't like my comment feel free to request its deletion.)
Thank you for your reply.
In fact this is a plugin i made near than 2 years ago for my old forums and i decided to contribute it maybe someone needs that, i just edited the author info my new ones (website, username...), it's the reason why it's still a bit outdated Toungue
this seems interesting ,-, might take a look at it Smile
Maybe make it so that the ratio doesn't trigger when a user registers and makes his first post?
I just enabled the plugin and received like 12 PMs from new registered users who can't make their first post on the site.

If I have the ratio as 0.2, make it so that the plugin triggers after the user makes his first 5 posts.
Thanks for the plugin the idea is amazing, but I had to disable it because a user just spent 2-5 minutes registering on the site isn't going to come up with a thread as well just to make his first post.
(2018-05-09, 10:39 AM)pg001 Wrote: [ -> ]Maybe make it so that the ratio doesn't trigger when a user registers and makes his first post?
I just enabled the plugin and received like 12 PMs from new registered users who can't make their first post on the site.

If I have the ratio as 0.2, make it so that the plugin triggers after the user makes his first 5 posts.
Thanks for the plugin the idea is amazing, but I had to disable it because a user just spent 2-5 minutes registering on the site isn't going to come up with a thread as well just to make his first post.

Hey Big Grin
I'm very busy these times, but i may help you to edit the plugin and make it as you wish, just go to my forums (developement.design/forum/)