Skip to:

Re: Profile Comments with BP 1.2

Boone Gorges


Yeah, it’s a bit of a change, isn’t it?

My strategy for making the transition easier for my users is two-fold:

1) Make the profile the default view for users (rather than activity), by adding

define( 'BP_DEFAULT_COMPONENT', $bp->default_component = 'profile' );

to wp-config.php

2) Adding the @mentions profile tab, plus some explanatory text, to the members/single/home.php template in my child theme. Thus, right below

<?php locate_template( array( 'members/single/profile.php' ), true ) ?>

I’m adding

<h4><?php bp_displayed_user_fullname(); ?>'s mentions</h4>
<p>Whenever anyone posts an update on this site containing <?php bp_displayed_user_fullname(); ?>'s handle (<strong>@<?php bp_displayed_user_username() ?></strong>), it shows up as a public message below.</p>

<p>Want to leave your own public message for <?php bp_displayed_user_fullname(); ?>?

<div class="generic-button" id="post-mention" >
<a href="<?php bp_send_public_message_link() ?>" title="<?php _e( 'Mention this user in a new public message, this will send the user a notification to get their attention.', 'buddypress' ) ?>"><?php _e( 'Mention this User', 'buddypress' ) ?></a>

followed by the activity loop, taken right from bp-default/activity/activity-loop.php, but with the following relevant modification: the arguments for bp_has_activities are

<?php if ( bp_has_activities( 'scope=mentions' ) ) : ?>

(You’ll have to do some styling to make it look right, but you get the idea.)

It’s not an exact duplication of the Wire – I’ve tried to embrace the new @mention stuff, while still capturing the “leave a note for me” spirit of the Wire.

Skip to toolbar