Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Throttle Posts/Threads (restrict number of posts/threads by usergroup/forum by time) Details »»
Throttle Posts/Threads (restrict number of posts/threads by usergroup/forum by time)
Version: 2.1, by CyberRanger CyberRanger is offline
Developer Last Online: Jan 2015 Show Printable Version Email this Page

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:
  1. 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!
  2. 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.
  3. 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.
  4. 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.
  5. 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.
3 благодарности(ей) от:
aaronhaul, akz645, TAIFUN_T

Comments
  #52  
Old 06-27-2007, 07:17 PM
CyberRanger's Avatar
CyberRanger CyberRanger is offline
 
Join Date: Mar 2004
Posts: 1,319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ElForro View Post
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))));

  
$threadremaining = ($permissions['throttle_threadspermissions']) - ($tempmax2['threadcount']);

        
  if (
$threadremaining <= AND $permissions['throttle_threadspermissions'] >= 0)
  {
     eval(
standard_error(fetch_error('throttle_threads_max_reached'$permissions['throttle_threadspermissions'], $vbulletin->options['throttle_threads_time'])));
  }

The per forum/usergroup number of posts is also not working properly. I'll have that in tomorrow's fix.
Reply With Quote
  #53  
Old 06-27-2007, 08:49 PM
bigcurt's Avatar
bigcurt bigcurt is offline
 
Join Date: Nov 2004
Location: KierDarby.php
Posts: 1,009
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did that and everything seems to be fixed so far.
Reply With Quote
  #54  
Old 06-29-2007, 05:23 PM
ElForro ElForro is offline
 
Join Date: Mar 2006
Posts: 123
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CyberRanger View Post
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))));

  
$threadremaining = ($permissions['throttle_threadspermissions']) - ($tempmax2['threadcount']);

        
  if (
$threadremaining <= AND $permissions['throttle_threadspermissions'] >= 0)
  {
     eval(
standard_error(fetch_error('throttle_threads_max_reached'$permissions['throttle_threadspermissions'], $vbulletin->options['throttle_threads_time'])));
  }

The per forum/usergroup number of posts is also not working properly. I'll have that in tomorrow's fix.
Thanks! I think it's working just fine now!!!
Reply With Quote
  #55  
Old 06-29-2007, 05:40 PM
CyberRanger's Avatar
CyberRanger CyberRanger is offline
 
Join Date: Mar 2004
Posts: 1,319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ElForro View Post
Thanks! I think it's working just fine now!!!
Great! I just uploaded ver2.1 that incorporates the fix for the per forum/usergroup setting for threads and posts.
Reply With Quote
  #56  
Old 06-29-2007, 11:06 PM
TCattitude's Avatar
TCattitude TCattitude is offline
 
Join Date: Oct 2004
Location: Chile
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Really nice mod.
Thanks for this
Reply With Quote
  #57  
Old 07-10-2007, 12:27 AM
jwocky jwocky is offline
 
Join Date: Mar 2005
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CyberRanger View Post
Great! I just uploaded ver2.1 that incorporates the fix for the per forum/usergroup setting for threads and posts.
Awesome! does 2.1 include the update to exclude the deleted/closed threads?
Reply With Quote
  #58  
Old 07-13-2007, 02:49 AM
CyberRanger's Avatar
CyberRanger CyberRanger is offline
 
Join Date: Mar 2004
Posts: 1,319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jwocky View Post
Awesome! does 2.1 include the update to exclude the deleted/closed threads?
No, but I'll get that out "soon"!
Reply With Quote
  #59  
Old 07-16-2007, 08:42 PM
jwocky jwocky is offline
 
Join Date: Mar 2005
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CyberRanger View Post
No, but I'll get that out "soon"!
Can't wait, thanks!!!
Reply With Quote
  #60  
Old 07-24-2007, 10:07 PM
Nathan2006's Avatar
Nathan2006 Nathan2006 is offline
 
Join Date: Feb 2006
Location: UK
Posts: 862
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for the update
Reply With Quote
  #61  
Old 09-09-2007, 04:50 AM
lostgirl815 lostgirl815 is offline
 
Join Date: Apr 2006
Posts: 228
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It seems that people can get around this by using Quick Reply. Anybody have a solution?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:35 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05145 seconds
  • Memory Usage 2,365KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (3)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete