Post Limit Per Node by AddonsLab

Post Limit Per Node by AddonsLab 1.6.1

No permission to download

AddonsLab

Well-known member
AddonsLab submitted a new resource:

Post Limit Per Node by AddonsLab - Set limit on number of threads and posts user can make in a predefined time configured per node

The add-on allows setting limits on how many threads users can start and how many posts they can make in a predefined time. The number of threads and posts and the time limits are configurable from user group permissions, under Forum Permissions section. They can also be set on a per-node basis for each forum.

View attachment 148683

The support will be provided here in the Discussion thread. Please feel free to report any issues and they will be reviewed asap.

Please consider...

Read more about this resource...
 
Beautiful. I was just about to develop this addon for our forum, but it looks like you beat me to it. Wonderful!
 
Actually, I am having a problem. If I set up one usergroup to have 1 thread every 24 hours, that works fine. But if I set another usergroup to "Unlimited" under all 4 settings, that usergroup isn't able to post at all. It's almost like "unlimited" is being interpreted as 0.
 
Actually, I am having a problem. If I set up one usergroup to have 1 thread every 24 hours, that works fine. But if I set another usergroup to "Unlimited" under all 4 settings, that usergroup isn't able to post at all. It's almost like "unlimited" is being interpreted as 0.

Thank you for the report. The issue is fixed and the new version is released.

Thank you!
 
I'm not sure what's going on here, but this addon isn't working correctly for me.

The default installation permissions for this addon set the limits to 0 for all usergroups. In other words, by default, users can create 0 new threads and posts every 0 hours. That doesn't make much sense, but it appears to work and allow users to post as normal.

I then set up my registered usergroup to be limited to 1 post every 14 days for one specific node.
When I use the analyze permissions function in the admincp for a test user who belongs to several usergroups including the registered usergroup, he has the "Can create threads" set to yes for this node and the following values for this addon:

Limit number of threads within time defined below:
1 (Details)
Time limit for threads (hours):
336 (Details)
Limit number of posts within time defined below:
Unlimited (Details)
Time limit for posts (hours):
Unlimited (Details)

And yet, the user cannot create a new thread in the node. Some other users, however, CAN create new threads in the node.

Additionally, this add-on doesn't appear to work with the "Test Permissions" function of XF. When I test the permissions of the above user, the new thread button shows up, even though for the actual user it does not.

There is a lot of confusion right now on what the proper settings should be for this add-on to ensure that users can post unlimited posts and threads as normal, aside from this one specific node, and in this one specific node, some usergroups should be able to post unlimited threads and posts, but one specific usergroup should be limited to 1 thread every 14 days.

Lots of info here, I know. If you need any clarification, let me know.
 
Hello, @SpecialK !

Setting the times to 0 doesn't make any sense for addon configuration, as if you don't want to allow the user post any thread, you have other permission settings for that. The interface of XenForo permissions page requires the Unlimited/0 options, it is not possible to change it just for this permission.

I see where the misunderstanding is coming. The add-on limits the number of threads in the entire board, in any board, not in the current node. Setting permission values per-forum just means, that if a user has that many threads anywhere in the forums, they can't post a thread in that node. I think this was the original idea of the add-on at https://xenforo.com/community/threads/post-limit-per-node.110999/

It seems the best solution for this would be counting the total number of threads, if the setting is coming from general usergroup permissions, and counting the threads in that particular forum if the setting is put on a per-node basis. Please confirm, that this would work for you. Also, in this case, please let me know if you think we should count the threads in the current forum only, or include its child nodes as well.

Didn't check the product with permission tester, will do so soon.

Please let me know your thoughts.

Thank you!
 
@AddonsLab - When we installed the add-on, it set the 4 permissions to 0 for all usergroups automatically. We did not do that.

Your explanation of the misunderstanding seems accurate. I re-read that original request thread and I think you're right in what they were asking for. In our case, we simply care how many threads the user has posted IN THIS NODE. The rest of the board is unlimited threads and posts but in our classifieds forum, they're only allowed 1 thread every 14 days and unlimited posts. I think your fix would work. Just to make sure:


I would set up all usergroups with unlimited set for all 4 options. This way, the user can post unlimited threads and posts everywhere.
I would think set up my registered usergroup for our classifieds node to allow 1 thread every 14 days.
I would set the registered usergroup for the classifieds node to allow unlimited posts every unlimited days.
For our administrator usergroup, I would set the classifieds node to allow unlimited threads every unlimited days.

The end result of this should be:

Users can post unlimited threads AND unlimited posts in all forums except the classifieds forum.
In the classifieds forum, users can post 1 thread every 14 days and unlimited posts.
Administrators can post unlimited threads and unlimited posts in the classifieds forum.

I think I explained our particular use case pretty well and I think it should be doable with XF's permissions inheritance. If you can add this functionality to the plugin so that I don't have to code it myself, I'll happily throw a donation your way as it will have saved me a bit of time in doing this myself.
 
@AddonsLab - When we installed the add-on, it set the 4 permissions to 0 for all usergroups automatically. We did not do that.

Yes, the permissions are set to 0 by default. Setting permission value to -1 in the XML doesn't seem to have any effect, XenForo doesn't import them as "Unlimited". Checking the source code of XenForo for other similar permissions, I see it stores the values of -1 using direct MySQL queries. Tried this approach, stored the values of -1 for each usergroup on the board, and it did show Unlimited option selected. However, during further tests I have identified, that if a user has two usergroups assigned, one having the "Unlimited" set, and the other usergroup any positive, the combined permissions actually consider the Unlimited option (I guess taking the minimum of values across the usergroups, so -1 wins against all other values). So I have disabled the functionality of having the Unlimited option inserted as default during the installation.

As for the node-based handling requested, I found it the best to have a new option in product's options page, where you can set a comma-separated list of nodes, where the check should be node-based instead of forum-wide. I think this should solve your issue.

The new release will be published now. Please check and let me know your thoughts.

Thank you!
 
Will unlimited time limit a user to create a single thread in a given forum, forever... ???

XenForo permission system doesn't give an interface to edit the options available, but we could just have some particular value, for example, 999 to be considered as "all times". Other values, like 1000 will still work as normal values and the information about this could be added to the permission description. Do you think this would work for you? Just let us know and we will implement the enhancement asap.

Thank you!
 
I think, if possible, it should be interpreted as follows:

1 thread every 24 hours = 1 thread per day
1 thread every unlimited hours = 1 thread, FOREVER. Under this setting, if the user has posted a thread, they will not be able to post another.
Unlimited threads = Unlimited threads, no matter what the hour setting (Because unlimited threads ever 24 hours hours is equivalent to unlimited threads every 10 hours. They're both unlimited threads)
 
I think, if possible, it should be interpreted as follows:

1 thread every 24 hours = 1 thread per day
1 thread every unlimited hours = 1 thread, FOREVER. Under this setting, if the user has posted a thread, they will not be able to post another.
Unlimited threads = Unlimited threads, no matter what the hour setting (Because unlimited threads ever 24 hours hours is equivalent to unlimited threads every 10 hours. They're both unlimited threads)
No, that's ok. As per @SpecialK outlined, is how I would think it would work. I have an add-on that does this already, its just super old and unsupported nowadays.

We are going to implement this now and will update here soon with the newer release.

Thank you!
 
AddonsLab updated Post Limit Per Node by AddonsLab with a new update entry:

Rewrote the logic of checking

Hello everyone,

with this release we have modified the way the limits work a bit:

- Setting "Unlimited" for "Limit number of posts" or "Limit number of threads" will mean unlimited posts/threads, no matter what time is set for the time limit.
- Setting the time limit to "Unlimited" will mean "All Times". So, 10 posts in "unlimited" time means 10 posts in total, without any time limit.
- Setting the time limit to 0 is a misconfiguration, as it doesn't make any sense to count posts/threads...

Read the rest of this update entry...
 
A very useful addon, thanks!

Would it perhaps someday possible to add "Likes" to the things that can be limited? Like "Maximum thread age in days to be able to like" or a daily limit like with the posts and threads.
Some users tend to be "overly excited" with this function.
 
A very useful addon, thanks!

Would it perhaps someday possible to add "Likes" to the things that can be limited? Like "Maximum thread age in days to be able to like" or a daily limit like with the posts and threads.
Some users tend to be "overly excited" with this function.

Thank you for the suggestion. This seems to be a great idea indeed, just this add-on is named taking into accounts the posts. We will write a separate add-on for likes and release it here on XenForo.com for free.

Thank you!
 
A very useful addon, thanks!

Would it perhaps someday possible to add "Likes" to the things that can be limited? Like "Maximum thread age in days to be able to like" or a daily limit like with the posts and threads.
Some users tend to be "overly excited" with this function.

We have released the product now - https://xenforo.com/community/resources/like-limit-per-node-by-addonslab.5498/ We have implemented both hourly based and limit on post age in general. We considered implementing post-age based limit, as in some cases the same thread can have very old posts and recent ones, so we considering limiting the likes on these threads for the new posts wouldn't be something most of the users would want.

Please check out and let us know your thoughts there.

Thank you!
 
How do I limit threads and replies for a user on a specific forum, but allow mods to bypass this limit?
 
Last edited:
Top Bottom