Version: 2.1, by CyberRanger
Developer Last Online: Jan 2015
Category: Add-On Releases -
Version: 3.6.7
Rating:
Released: 11-06-2006
Last Update: 06-28-2007
Installs: 189
Uses Plugins
Re-useable Code Additional Files Translations
No support by the author.
Users can be restricted to a set number of posts and/or new threads per a defined time period. The settings can be global for all forums by usergroup and/or specific to certain usergroups by forum.
FAQ:
I don't understand!!! Why would I use this? Say, for example, you wanted to have a sub-forum where registered users could only post 2 messages a day but a premium group could post unlimited messages. This mod will let you configure that! Here's another example. You want registered users to be able to only create 1 thread per 6 hours in a sub-forum but they can have an unlimited number of replies in that sub-forum. This product will let you do that!
Do I have to configure every usergroup and forum combination?
Nope! By default, all usergroups (that normally can post or create threads) can create and unlimited amount of threads and posts. You have the option to create settings by usergroup that apply to all sub-forums for that usergroup. Plus, you can fine tune the settings on a usergroup/sub-forum basis.
I have a lot of forums and usergroups. How will I keep up with all my custom throttle settings? In the admincp, there is a feature that gives a summary of all settings by usergroup and forum. You can filter based on usergroup or forum and change the sort order.
What does the "-1" mean in the settings? "-1" indicates unlimited. So, a usergroup with a -1 setting for the time period means there is no time restriction.
Is this fully phrases? YES! 100% fully phrased including all admincp text!
Product will work with any version of vb 3.5.x and up (including 3.7.x).
Installation
1. Upload the contents of 'upload' to your forum directory
2. From the admincp, import the product file product-throttle_posts.xml
3. REFRESH your admincp page.
4. Change the usergroup setting for any usergroup you want to restrict.
5. OPTIONAL - To set per forum/usergroup settings, set "Activate per Forum/Usergroup Checking" (under Throttle Posts/Threads -> General Settings) to "Yes"
6. OPTIONAL - Set any forum/usergroup settings under Throttle Posts/Threads -> Per Forum/Usergroup Settings.
7. Done!
Special note: a new thread does NOT count as a post (for the purpose of this mod) but a new thread does count as a post!
Enjoy!
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
I'm sorry... but this is not working in any way when I try to limit to ONE forum... I've changed the settings a million times, and there are only two results:
- I can post unlimited times
- I can't post not even one time
Could you explain a little more how to limit a usergroup to post X times in 24 hs in ONE forum?
Okay, I figured out the stupid coding mistake I made.
I'll release a full update tomorrow. In the meantime, for the per forum/usergroup number of allowed threads to work right, replace the plugin "Check if Max Number of Threads Reached" with the code below:
PHP Code:
global $vbulletin;
$vbulletin->input->clean_array_gpc('r', array(
'f' => TYPE_INT
));
$limitquery = '';
if ($vbulletin->options['throttle_advanced'])
{
// see if per forum/usergroup permissions exist
$tempadvanced = $db->query_first("
SELECT *
FROM " . TABLE_PREFIX . "tp_throttleposts
WHERE `tp_forumid` = " . $vbulletin->GPC['f'] . " AND `tp_usergroupid` = ".$db->sql_prepare($vbulletin->userinfo['usergroupid']));
if ($tempadvanced['tp_id'] > 0) // forum\usergroup advanced record exists
{
$vbulletin->options['throttle_threads_time'] = $tempadvanced['tp_threadtime'];
$permissions['throttle_threadspermissions'] = $tempadvanced['tp_threadlimit'];
$limitquery = " AND `forumid` = " . $vbulletin->GPC['f'] . " ";
}
}
if ($permissions['throttle_threadspermissions'] >= 0)
{
$tempmax2 = $db->query_first("SELECT COUNT(threadid) AS threadcount FROM " . TABLE_PREFIX . "thread WHERE `postuserid`=".$db->sql_prepare($vbulletin->userinfo['userid'])."
AND `visible`=1
$limitquery AND `dateline` >= ".$db->sql_prepare((int) (TIMENOW - ($vbulletin->options['throttle_threads_time'] * 60))));
Okay, I figured out the stupid coding mistake I made.
I'll release a full update tomorrow. In the meantime, for the per forum/usergroup number of allowed threads to work right, replace the plugin "Check if Max Number of Threads Reached" with the code below:
PHP Code:
global $vbulletin;
$vbulletin->input->clean_array_gpc('r', array(
'f' => TYPE_INT
));
$limitquery = '';
if ($vbulletin->options['throttle_advanced'])
{
// see if per forum/usergroup permissions exist
$tempadvanced = $db->query_first("
SELECT *
FROM " . TABLE_PREFIX . "tp_throttleposts
WHERE `tp_forumid` = " . $vbulletin->GPC['f'] . " AND `tp_usergroupid` = ".$db->sql_prepare($vbulletin->userinfo['usergroupid']));
if ($tempadvanced['tp_id'] > 0) // forum\usergroup advanced record exists
{
$vbulletin->options['throttle_threads_time'] = $tempadvanced['tp_threadtime'];
$permissions['throttle_threadspermissions'] = $tempadvanced['tp_threadlimit'];
$limitquery = " AND `forumid` = " . $vbulletin->GPC['f'] . " ";
}
}
if ($permissions['throttle_threadspermissions'] >= 0)
{
$tempmax2 = $db->query_first("SELECT COUNT(threadid) AS threadcount FROM " . TABLE_PREFIX . "thread WHERE `postuserid`=".$db->sql_prepare($vbulletin->userinfo['userid'])."
AND `visible`=1
$limitquery AND `dateline` >= ".$db->sql_prepare((int) (TIMENOW - ($vbulletin->options['throttle_threads_time'] * 60))));