[AddonsLab] Post Limit Per Node

[AddonsLab] Post Limit Per Node 2.7.0

No permission to download

AddonsLab

Well-known member
AddonsLab submitted a new resource:

[AL]Post Limit Per Node - Limit number of posts/threads per usergroup

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 164518

View attachment 164519

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

Read more about this resource...
 
Can this be configured on Per forum basis instead of global?
Say in a particular set of Nodes, I would want that user posts only ONE thread during lifetime. Is this possible?
Also, I am a bit unclear on how not to count THREAD as a POST while setting limits.
 
Last edited:
Can this be configured on Per forum basis instead of global?
Say in a particular set of Nodes, I would want that user posts only ONE thread during lifetime. Is this possible?
Also, I am a bit unclear on how not to count THREAD as a POST while setting limits.

Yes, the permissions are forum based, which means they can be set not only for the entire usergroup, but also for a usergroup in particular forum. For that you need set them up in Node Permission section. Please note, that any numberic permission in XenForo follows the approach of considering the highest number when the same permission is set in different places. For example, if you set the number of threads on global usergroup level to be 10, and for particular forum you set it to 2, the value of 10 will be used instead of 2 when a user posts in that forum.

Another setting you should consider is setting "Node-based check ID list" in product's settings page. If you specify a node ID there, only threads/posts created under that node are considered when checking the limits (otherwise, the threads/posts in the entire board is calculated).

Another setting you can see in product's settings page is "Count threads as posts", in you case the value should be "Do not count as posts in all forums".

Just let us know if you have any other questions.

Thank you!
 
Would it be possible to inform the user once they reach their limit? Example: "You've reached your post limit. You can create a new post within X days, X hours, X minutes".
 
Would it be possible to inform the user once they reach their limit? Example: "You've reached your post limit. You can create a new post within X days, X hours, X minutes".

Sure, I have just added appropriate screenshots to product's description. Here they are, showing the message instead of usual "no permission" message under the list of threads/replies.

Thank you!
 

Attachments

  • Reply limit message.webp
    Reply limit message.webp
    37.4 KB · Views: 46
  • Thread limit message.webp
    Thread limit message.webp
    18.3 KB · Views: 46
Sure, I have just added appropriate screenshots to product's description. Here they are, showing the message instead of usual "no permission" message under the list of threads/replies.

Thank you!

Brilliant. Very useful. Thank you!
 
Yes, the permissions are forum based, which means they can be set not only for the entire usergroup, but also for a usergroup in particular forum. For that you need set them up in Node Permission section. Please note, that any numberic permission in XenForo follows the approach of considering the highest number when the same permission is set in different places. For example, if you set the number of threads on global usergroup level to be 10, and for particular forum you set it to 2, the value of 10 will be used instead of 2 when a user posts in that forum.

Another setting you should consider is setting "Node-based check ID list" in product's settings page. If you specify a node ID there, only threads/posts created under that node are considered when checking the limits (otherwise, the threads/posts in the entire board is calculated).

Another setting you can see in product's settings page is "Count threads as posts", in you case the value should be "Do not count as posts in all forums".

Just let us know if you have any other questions.

Thank you!

Thanks. I could figure out everything after testing in a test forum section.
Brilliant!
 
Can I set a node limit for a specific user?

The permissions are implemented using XenForo permission system, so just like any other permission, they be configured on usergroup level or for each user specifically under Admin -> Users -> Permissions -> User Permissions
 
Permission on post is still there. Member still post over the limit. And server got error:

Code:
ErrorException: [E_NOTICE] Trying to get property of non-object src/addons/AL/PostLimit/Repository/ContentCounter.php:47
Generated By: xxxmember 29 Tháng một 2018 lúc 12:24
Stack Trace
#0 src/addons/AL/PostLimit/Repository/ContentCounter.php(47): XF::handlePhpError(8, '[E_NOTICE] Tryi...', '/home/handheld....', 47, Array)
#1 src/addons/AL/PostLimit/Repository/ContentCounter.php(64): AL\PostLimit\Repository\ContentCounter->getAllPosts(48, 7, 1517117048)
#2 src/addons/AL/PostLimit/XF/Entity/Thread.php(48): AL\PostLimit\Repository\ContentCounter->getPostsCached(48, 1517117048, 7, false)
#3 src/addons/AL/PostLimit/XF/Entity/Thread.php(23): AL\PostLimit\XF\Entity\Thread->_checkCanCreatePost()
#4 src/XF/Pub/Controller/Thread.php(408): AL\PostLimit\XF\Entity\Thread->canReply(NULL)
#5 src/XF/Mvc/Dispatcher.php(249): XF\Pub\Controller\Thread->actionAddReply(Object(XF\Mvc\ParameterBag))
#6 src/XF/Mvc/Dispatcher.php(87): XF\Mvc\Dispatcher->dispatchClass('XF:Thread', 'AddReply', 'json', Object(XF\Mvc\ParameterBag), 'forums', Object(EWR\Porta\Pub\Controller\Thread), NULL)
#7 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(1880): XF\Mvc\Dispatcher->run()
#9 src/XF.php(328): XF\App->run()
#10 index.php(13): XF::runApp('XF\\Pub\\App')
#11 {main}
 
Permission on post is still there. Member still post over the limit. And server got error:

Code:
ErrorException: [E_NOTICE] Trying to get property of non-object src/addons/AL/PostLimit/Repository/ContentCounter.php:47
Generated By: xxxmember 29 Tháng một 2018 lúc 12:24
Stack Trace
#0 src/addons/AL/PostLimit/Repository/ContentCounter.php(47): XF::handlePhpError(8, '[E_NOTICE] Tryi...', '/home/handheld....', 47, Array)
#1 src/addons/AL/PostLimit/Repository/ContentCounter.php(64): AL\PostLimit\Repository\ContentCounter->getAllPosts(48, 7, 1517117048)
#2 src/addons/AL/PostLimit/XF/Entity/Thread.php(48): AL\PostLimit\Repository\ContentCounter->getPostsCached(48, 1517117048, 7, false)
#3 src/addons/AL/PostLimit/XF/Entity/Thread.php(23): AL\PostLimit\XF\Entity\Thread->_checkCanCreatePost()
#4 src/XF/Pub/Controller/Thread.php(408): AL\PostLimit\XF\Entity\Thread->canReply(NULL)
#5 src/XF/Mvc/Dispatcher.php(249): XF\Pub\Controller\Thread->actionAddReply(Object(XF\Mvc\ParameterBag))
#6 src/XF/Mvc/Dispatcher.php(87): XF\Mvc\Dispatcher->dispatchClass('XF:Thread', 'AddReply', 'json', Object(XF\Mvc\ParameterBag), 'forums', Object(EWR\Porta\Pub\Controller\Thread), NULL)
#7 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(1880): XF\Mvc\Dispatcher->run()
#9 src/XF.php(328): XF\App->run()
#10 index.php(13): XF::runApp('XF\\Pub\\App')
#11 {main}

Hello!

The error is very unusual and seems to be caused by some other third-party add-on. The object on the line mentioned in the error has to exist based on XenForo syntax but might happen if some third-party add-on extends XenForo classes incorrectly. Please try disabling other add-ons (or installing out add-on on a clean installation of XenForo) and see if you still have the issue.

Thank you!
 
The error is very unusual and seems to be caused by some other third-party add-on. The object on the line mentioned in the error has to exist based on XenForo syntax but might happen if some third-party add-on extends XenForo classes incorrectly. Please try disabling other add-ons (or installing out add-on on a clean installation of XenForo) and see if you still have the issue.


I tried to disable all addons but yours. And the same error still there.
 
I tried to disable all addons but yours. And the same error still there.

I see. Still, we have tested our add-on on XenForo 2.x installation and it works just fine. The line mentioned just could not cause an error. There may be some other factor involved, like some XenForo files modified by a developer, or our add-on files modified. XenForo has a tool to check files for unexpected content under Admin -> Tools -> File health check. Please make sure all files are intact.

If you still have the issue, please contact us at https://customers.addonslab.com/admin/supporttickets.php and we will try to troubleshoot it on your board.

Thank you!
 
Oh, there is another problem:

It count and limit on every node, the setting "Node-based check ID list" is not effect.
 
Top Bottom