@mention autolink to profile
- 
		In buddypress forums the @username autolinks to the usernames profile. 
 Is this normal behavior or a plugin?
 The @mention link to profile does not work in my bbpress forum. It works in my buddypress activitiy stream.
 Any ideas to get @mention link to profile working in my bbpress site?
 Thanks
 Matthias
- 
		
			
@mentions doesn’t work (actually) in bbPress. To add it, so you can mention a user in a topic, add this snippet to bp-custom.php or child-theme’s functions.php function custom_bbpress_maybe_load_mentions_scripts( $retval = false ) { if ( function_exists( 'bbpress' ) && is_bbpress() ) { $retval = true; } return $retval; } add_filter( 'bp_activity_maybe_load_mentions_scripts', 'custom_bbpress_maybe_load_mentions_scripts' );On a profile header, it’s not intended to link to the profile, as you’re already on a profile when you see @username ! This is there as reminder for members who want to sent a message to that user. When on any activity page and you use @mention in a notice, you get a userlist depending the first letter you type after @. But never a link to a profile. Or do you mean that @mentions is not active, whithout any links on it ? The code works, but is not intended for what you want. 😉 What is used here is a custom function. To link to a profile within bbpress topic editor, you should add the snippet to bp-custom.php Read also here, where i mentionned a plugin 
 https://buddypress.org/support/topic/link-to-users-profile-non-template/Hi @danpb, 
 now I’m using your code and the plugin, but my forum still shows no links in @mention
 I just was searching in the bbpress support forum and it seems that it is a built in feature. But I don’t know why it is not working on my install?
 Here is how @mention are shown in my forum. No link to the user profile at all
  Any suggestions to solve the problem? 
 Thanks
 MatthiasHi @danpb, 
 sorry it is working. Not backwards for older posts, but for new posts.
 The plugin was the solution…
 Thanks for your support!
 MatthiasKeine ahnung ! It works on my forum… Do you use a cache or clear your browser history and cookies. Aside, did you allowed mention in BP settings ? Hi danbp, 
 I can not find a setting to allow explicit @mention. I allowed the activity stream in buddypress. And @mentions are working fine in there.
 The notifications if someone is mentioned in the bbpress forums are working fine, too. I even have a dropdown field with suggestions for @mention in bbpress.The only thing is the missing link to the profile behind the @mention in replies… 
 forums and buddypress sites are exluded from caching…Thanks 
 MatthiasHi @danpb, 
 I found a snippet in my theme functions.php that causes the missing link to profile in all @mentions in bbpress. When I delete the following code all @mentions in the bbpress topics and replies are shown.
 Can you have a look at the following code. Maybe you can see, why it deletes the mention links to the profiles…?// replies visible only for logged in users function bb_auth_reply_view( $reply_id ) { $reply_id = bbp_get_reply_id( $reply_id ); // Check if password is required if ( post_password_required( $reply_id ) ) return get_the_password_form(); $content = get_post_field( 'post_content', $reply_id ); // first topic reply shouldn't be hiding $rep_position = bbp_get_reply_position($reply_id); // if user is not logged in and not the first post topic if( !is_user_logged_in() && $rep_position > 0 ) { return "replies only for logged in users!"; } else { // return normal return $content; } } add_filter( 'bbp_get_reply_content', 'bb_auth_reply_view' );
- The topic ‘@mention autolink to profile’ is closed to new replies.
