bbPress

Simple, Fast, Elegant

bbPress support forums » Troubleshooting

Change throttle. Also, is it based on username or IP?

(2 posts)
  • Started 9 months ago by t3ch33
  • Latest reply from _ck_
  • This topic is not resolved

Tags:

  1. How do I change the throttle limit; what files or db fields? Also, is it based on username or IP? Thanks.

    Posted 9 months ago #
  2. The throttle is right in each user's profile page.
    It's based on username.

    If you want to tinker with increasing it, try this plugin I whipped up to avoid core hacks:

    function post_regulation($text) {
    global $bb_current_user;
    $wait=45;    // seconds between posts
    
    if (isset($bb_current_user->data->last_posted) && time() < ($bb_current_user->data->last_posted + $wait)  &&  !bb_current_user_can('throttle'))
    	bb_die(__('Slow down; you are posting too often.'));
    
    if (strlen(trim($text))<10)
    	bb_die(__('Your post is too short, please say something meaningful!'));
    
    if (strlen($text)>2500)
    	bb_die(__('Your post is too long!'));
    
    return $text;
    }
    add_filter('pre_post', 'post_regulation');

    In theory it would be possible to hack that further to regulate based on IP by doing a mysql query for the last post time that has the current user's IP.

    Posted 9 months ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.