use plugin called theme my login
are you using any redirect plugin or code?
which theme are u using? can u use the wp2016 theme and see?
How do I do this?
You have to bake 5 894 pizza and search the forum ! Or experiment the following…
First you remove the counter. This can be done by using the language file.
Original string is Friends <span class="%s">%s</span> to replace by eg. Friends
or using this function (add to bp-custom.php)
function bpfr_remove_friends_count( $translated, $original_text, $domain ) {
if ( 'buddypress' !== $domain )
return $translated;
switch ( $original_text ) {
case 'Friends <span class="%s">%s</span>':
return 'Friends';
default:
return $translated;
}
}
add_filter( 'gettext', 'bpfr_remove_friends_count', 10, 3 );
The Friends subnav has only two elements: friendships and request.
Friendships is the default one and can’t be removed. So we have to hide it with css. Add this to your child-theme style.css
#friends-my-friends-personal-li {display:none;}
This is default css, and you have to check it as it can vary depending your theme.
Finally add a new subnav item with counter in replaciement of the one you’ve just hiden (add to bp-custom.php).
function bpfr_custom_profile_sub_nav() {
global $bp;
if( bp_is_active( 'friends' ) )
$count = friends_get_total_friend_count();
$class = ( 0 === $count ) ? 'no-count' : 'count';
//Add subnav item
bp_core_new_subnav_item( array(
'name' => sprintf( __( 'Friendships <span class="%s">%s</span>', 'buddypress' ), esc_attr( $class ), bp_core_number_format( $count ) ),
'slug' => 'friends',
'parent_url' => $bp->loggedin_user->domain,
'parent_slug' => $bp->friends->slug,
'screen_function' => 'friends_screen_my_friends',
'position' => 10
)
);
}
add_action( 'bp_setup_nav', 'bpfr_custom_profile_sub_nav' );
Sorry, my fault! I haven’t realised you mentioned /messages/compose.php
The snippet is intended to work on the what’s new form, not the compose message form.
To do this, we need the correct textarea name and another editor_id. Use this function:
function bpfr_compose_msg_tiny_editor() {
$content = "";
if ( isset( $_GET['r'] ) ) :
$content = esc_textarea( $_GET['r'] );
endif;
$editor_settings = array(
'content' => bp_messages_content_value(),
'textarea_name' => 'content',
'editor_id' => 'message_content',
'teeny'=>true,
'media_buttons'=>false
);
wp_editor( bp_messages_content_value(), "message_content", $editor_settings);
}
add_action( 'compose_edit_tools', 'bpfr_compose_msg_tiny_editor' );
In compose.php, remove line 38
<textarea name="content" id="message_content" rows="15" cols="40"><?php bp_messages_content_value(); ?></textarea>
and replace it by
<?php do_action( 'compose_edit_tools' ); ?>
Visual and Text tab may be unecessary. You can hide them by adding this to your theme style.css:
#wp-message_content-editor-tools {display:none!important;}
To get the edit tools on the reponse editor, same trick, replace the textarea line 123 in /messages/single.php with the above action hook.
Hey, it’s monday ! Site url ? Theme name ? Give details please.
See also the codex, as there is plenty of documentation about how BuddyPress can be setup and used.
User Extended Profiles
Ah, I see. I did try just putting the bare remove_action in bp-custom.php, but as you say that didn’t work either. I’ll try it in the theme functions.php.
BTW, why is it that some things only work in the theme’s functions.php, and not in bp-custom.php?
Don’t add a function, just do this:
remove_action( 'bp_notification_settings', 'groups_screen_notification_settings' );
And it won’t work in bp-custom.
Put it in your theme or child-theme functions.php.
Such a plugin doesn’t exist, sorry. Customizing (eg. insert css) starts here:
https://codex.wordpress.org/Child_Themes
Best place to get advice about your theme is here:
https://wordpress.org/support/theme/fashionistas
The file containing layout information is (your theme)/style.css
re installed my theme + buddypress plugin solved my problem.
i dont know wat caused this problem. because everything is just like before, and now it’s working.
thanks for your help @danbp and @sharmavishal
no no. i checked everything twice, sure abt that.
i really dont know wat has happened to register page.
i will backup my data, and detele the theme + buddypress plugin
then i will reinstall them again.
maybe that’ll work.
Hi @binary10,
the plugin is outdated and doesn’t work with BP 2.5.3 network activated. Last update was 2 years ago and his compatibility was up to WP 3.8.14… Meantime, @mention evoluted and this plugin has no objective reason to be alive today. On BP’s side, what’s new form has now it’s own template file (post-form.php) and works a bit differently as 3 years ago.
Except if you’re still using BP 1.8, BP default theme and WP 3.8, you’re loosing your time with it.
If you need a what’s new area somewhere, you can simply call his template. Eg.
if ( is_user_logged_in() ) :
bp_get_template_part( 'activity/post-form' );
endif;
Successfully tested on a MS install sub blog, and @mention 100% on hand.
Topic title explains it all! I want a notification on the activity page to show up when people add (and maybe edit?) a new entry via Gravity Forms to a specific form. It’s basically a character database.
So – “Username added CharacterName.” “Username edited CharacterName.”
I know it’s a matter of adding in a specific hook somewhere (child theme functions.php??), but I don’t know how to word it and really rather not break the site!!
Thank you!
The link is not restricted to members anymore.
–https://www.goalsarecool.com/activity/
Yes, users can comment on my site.
Yes, I have tested with Twenty Sixteen theme and the issue is still there.
Anything you can do to help would be greatly appreciated.
Thanks!
You have to debug and for this, use a Twenty theme. Read more use ajax and can generate conflict with outdated theme or plugins, or simply not updated js files.
Actually there is a little JS notice:
OneSignal: Could not load iFrame with URL https://otoparkcom.onesignal.com/sdks/initOneSignalHttp. Please check that your 'subdomainName' matches that on your OneSignal Chrome platform settings. Also please check that your Site URL on your Chrome platform settings is a valid reachable URL pointing to your site.
@dono12,
when the cover image option is enabled, BP use cover-image-header.php not member-header.
To get your idea to work, you need a function to calculate who is online and to add a class to the exiting div. Depending the result, we can then add an online or an offline class.
And of course, some css rules.
The function to add this class to the div with an action hook.
Add it to bp-custom.php
function check_connected(){
$last_activity = bp_get_user_last_activity( bp_displayed_user_id() );
$curr_time = time();
$diff = $curr_time - strtotime( $last_activity );
$time = 5 * 60; // = 3mn - time must be in seconds
if( $diff < $time ) {
echo 'online';
} else {
echo 'offline';
}
}
add_action( 'online_class', 'check_connected' );
Now you just have to add the hook to the template. Open from within child-theme, /buddypress/members/single/cover-image-header.php
Go to line 25, and change
<div id="item-header-avatar">
to
<div id="item-header-avatar" class="<?php do_action( 'online_class' ); ?>">
Open /child-theme/style.css and add:
div.online img {
border: solid 2px #008000!important;
background: rgba( 255, 255, 255, 0.8 )!important;
}
div.offline img {
border: solid 2px #be3631!important;
background: rgba( 255, 255, 255, 0.8 )!important;
}
And voila, you’re done !
Note: you can use the same hook in member-header.php, so you can enable/disable cover-image without loosing the on/offline layout on profile header avatar.
I have been using this code to echo out a bubble for my header however it used to work flawlessly but now it just gives me ” Fatal error: Call to undefined function bp_get_total_unread_messages_count() in C:\Program Files (x86)\Ampps\www\retaggr101\wp-content\themes\twentysixteen\header.php on line 167″
which kind of makes no sense at all.
<?php
$count = bp_get_total_unread_messages_count( bp_loggedin_user_id() );
if ( $count > 0 ) {
echo '<div class="site-header-user-notifcations-bubble">'; echo $count; echo '</div>';
} else {
// The notif count is 0.
}
?>
espcially when this code works
<?php
$count = bp_notifications_get_unread_notification_count( bp_loggedin_user_id() );
if ( $count > 0 ) {
echo '<div class="site-header-user-notifcations-bubble">'; echo $count; echo '</div>';
} else {
// The notif count is 0.
}
?>
That screen isn’t provided by BuddyPress. It’s something provided by another plugin, or perhaps within the theme. Can you identify which one?
this should fix it for u
THEME UPDATE – VERSION 3.0.11 (June 7th 2016)
Updates and fixes.
Updated to Slider Revolution v5.2.5.3.
Fixed BuddyPress multi-field checkboxes being output twice.
Fixed some PHP notices.
I’m unable to reproce this issue.
Check following tables for duplicate entries in DB
wp_bp_xprofile_fields and wp_bp_xprofile_groups (wp is the table prefix; could be different on your install)
Provide the list of used & activated plugins.
Did you found a similar issue mentionned on Salutation support ?
Note that it’s a premium theme for which we can’t assist you, as we have no access to it’s code or support.
I did more testing. It’s not the theme.
I have two other groups of fields that have single select radio buttons. When I changed the type of field to multi-select radio button instead of checkboxes, it worked.
can u test this on default 2015 or 2016 theme and let me know if the issue still remains?
@sjoerdlagraauw as r-a-y mentions test this version of bp
BuddyPress 2.6.0 Release Candidate 1 now available for testing
regarding @mention as danbp suggested its not a bp issue. i checked this myself. its working in default 2016 theme of wp. but NOT working for other paid themes i have.
mostly paid themes or custom themes use their own jss/css stuff in their own custom manner which creates an issue.
if you got jss/css issues best of be asked at the custom themes support
Just to make sure I understand. Is it a theme problem of will it be solved in the next update of Buddypress @sharmavishal, @r-a-y and @danbp? Cause there are some other issues with ajax in this theme as well.
I am in no hurrie so if it will be solved next week that would save me a lot of searching and debugging 😉
Thanks for all the help!
I’m using WordPress Version 4.5.2, BP Version 2.5.3 and installed Salutation WP Theme.
I have set up extended profile fields using multi-select checkboxes. It appears that I have set up the fields correctly. See screen shot #1. However, when a user tries to edit their personal interests they see duplicate fields on the edit screen. See screen shot #2.
How do I remove the duplicate fields on the user’s edit screen?
https://www.dropbox.com/sh/xc4suyybb8la56s/AAB752JqHXWBviJlkj68ANm9a?dl=0
I am very new to Buddypress and would appreciate any help you can provide.