Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Create Group button like Create Account


belogical
Participant

@belogical

never mind, that was easier than I thought. had to do a hack in bp-core-widgets.php

add this under the function: (function bp_core_widget_welcome)

global $current_user;
$username = $current_user->user_login;

add this under the Create Account button: (line #49)

<?php if ( is_user_logged_in() ) { ?>
<div class="create-account"><div class="visit generic-button"><a hre f='/members/<?php echo $username; ?>/groups/create' title="<?php _e('Create a New Group', 'buddypress') ?>"><?php _e('Create a New Group', 'buddypress') ?></a></div></div>
<?php } ?>

how can i avoid a core hack on this one?

EDIT: Had to put a space in the href in order to get the code to display somewhat normal in the forum. Make sure to remove that if you use this.

Skip to toolbar