I would do this by going into /member-themes/buddypress-member/blogs/create.php
and doing…
<?php if ( bp_blog_signup_enabled() ) : ?>
<?php
global $bp;
$blogs = bp_blogs_get_blogs_for_user($bp->loggedin_user->id);
if ($blogs['count'] != 9)
{
bp_show_blog_signup_form();
}
else
{
?>
<div id="message" class="info">
<?php _e( 'Limit nine blogs per member. If you would like another, please contact an Admin for assistance.', 'buddypress' ); ?>
</div>
<?php
}
?>
<?php else: ?>
<div id="message" class="info">
<?php _e( 'Blog registration is currently disabled', 'buddypress' ); ?>
</div>
<?php endif; ?>
Just remember not to overwrite the member theme if you do a BuddyPress update.
AWESOME. Dang John. You Rock. I just added the code and it worked. I changed the number to 1 just for testing and it worked when I tried to create the 2nd blog. With unlimited blogs, I don’t want students to go crazy with them! One bored 14 year old could create 20 or 30 in an evening.
How can I hook bp_show_blog_signup_form() or bp_create_blog_link or other related function?
I want it not to show registration blog content. I mean when user “has limited his numbers of blogs per member” there is no link to create a blog.
Or even better: There is a link, but without blog signup form, but with the message: ‘Limit nine blogs per member. If you would like another, please contact an Admin for assistance.’
I do not want to hard coding in member-themes’ files. I’m creating a plugin with Admin page to configure this.
much better solution here.. with an option to set the number of blogs you want the user to have..
https://buddypress.org/forums/topic.php?id=1900
EDIT: i didn’t notice that this topic was 3 weeks ago..