Forum Replies Created
-
Make sure that you have member registration turned on in your wordpress installation, it will be located at in your wordpress backend dashboard under Settings > General > Membership.
Hope this helps
This is how I got the mentions in the profile activity feed.
Edit the file bp-activity-classes.php in the buddypress plugin folder.
`function get_filter_sql( $filter_array ) {
global $wpdb;if ( !empty( $filter_array ) ) {
$user_filter = explode( ‘,’, $filter_array );
$user_sql = ” ( a.user_id IN ( ” . $filter_array . ” ) “;
foreach ( $user_filter as $user_id ) {
$search_terms = ‘@’ . bp_core_get_username( $user_id ) . ‘<';
$user_sql .= “OR ( a.content LIKE ‘%%”.like_escape($search_terms).”%%’ ) “;
}
$user_sql .= ” ) “;
$filter_sql[] = $user_sql;
}`and replace this first top half of the function, No need to edit past the first “if” part of that function.
Hope this helps!
@murasaki – this is the code I used to show either “(3) Friends” or just “Friends” based on how many requests that users has on there profile page.
<li><a href="/members/user_login; ?>/friends">Friends</a></li> <li><a href="/members/user_login; ?>/friends"><span style="font-weight:bold">()</span> Friends</a></li>
and you can do the same thing with Messages
<li><a href="/members/user_login; ?>/messages/inbox">Messages</a></li> <li><a href="/members/user_login; ?>/messages/inbox"><span style="font-weight:bold">()</span> Messages</a></li>
hope this helps.
UPDATE!
I know this hasn’t been updated in 7 months, but I needed this feature and none of the plugins and mods here worked, but I figured out a way and wanted to share it.
Add this before HTML tag in your theme’s header.php file. (Note: Be sure to replace YOUR_DOMAIN_NAME with the domain of your buddypress installation.)
`<?php
global $post;
if ( is_home()) { ?>user_login; ?>
<?php
} else {
// User is not logged in – Display homepage
}
?>`Now I’m using a plugin called Branded Login for Buddypress by Brajesh Singh — This plugin includes `<input type="hidden" name="redirect_to" value="” />` on the login.php file but I’m pretty sure the normal BP login form has this as well so it should work.
Result summary:
After login the script checks if the current page is the site HOME page, if true it runs another script to see if the user is logged in, if the user is logged in it redirects them to there profile page. if the user is not logged in, or it is not the HOME page it does nothing and loads the page normally.
End Result: Instantly takes user to profile page after login, and if they try to reach the site homepage its now there profile page.
Hope this helps! working wonders for me