An easy way to achieve the second option would be to copy paste this code at the end of the file named functions.php in your current theme folder.
Make sure to create a backup of the file functions.php first. And always do the changes on a test server, not the live one.
function rsb_limit_posting( $retval ) {
// count topics of the current user
$topic_count = bbp_get_user_topic_count_raw( get_current_user_id() );
// if they are 10 or more, do not allow him to create new topic
if ( $topic_count > 9 ) return false;
// otherwise return the default
return $retval;
}
add_filter( 'bbp_current_user_can_access_create_topic_form', 'rsb_limit_posting' );
The code above hide the “new topic form” for users who posted 10 or more topics.
Hope it helps… good luck!
Hello,
That is VERY interesting.
However, I do not see the time limit in the code posted above.
Is it possible to include a reply limit as well?
Thanks a lot for your time and support!
Best regards,
Emmanuel
Ya i installed the code but it just dont allow any more post then 9!!!
I want to add time limit of it to reset so that countdown starts again from 0 on next day
Please some one help
How would we expand on this code to allow different forum roles to have different posting and topic limits?
Example:
Member = Can’t create topics, but can post replies 5x
Bronze = Can create up to 25 topics, and can post 250 replies
Silver = Can create 100 topics, and can post 1000 replies
Gold = Can create unlimited topics and unlimited replies
I wanted to create some new forum roles and was wondering if this sort of thing is possible? If so can someone assist or point to some functions that I would need to use to help accomplish this. Because this code example looks good I would just need to alter it with maybe some IF logic to look at the users role first and then limit them to topic and post counts.
Any thoughts?
@darkoned12000
this seems like some custom development
go to http://jobs.wordpress.net/ and post a job.