Search Results for 'buddypress'
-
AuthorSearch Results
-
May 12, 2017 at 3:11 am #265938
In reply to: required Username twice at Registration
manm0untain
ParticipantExtended Buddypress profile fields demands an additional name / username field. This is the case whether you are using Buddypress Usernames Only plugin or not.
This is only relevant if you require extended profile fields. If you don’t, then go into Buddypress settings and turn off extended profiles. That will remove the requirement for a second name on the registration / profile area.
If you want to use extended profile fields on BP, but you don’t want the second username / name field uglying up your registration flow, you can do the following.
You have to be careful with this, because if you hack it, remove the second required name / username field, or any of a dozen other solutions I’ve found – the registration will break down. You will get 500 errors, missing confirmation emails etc.
The solution I used for this is as follows.
1. Assuming you just want to use a singular Username for your site – install the Buddypress Usernames Only plugin. It says the plugin is old but it is still working as of WP version 4.7.4 (for me at least). This deals with the display / access of various username / name / fullname / nickname issues throughout the WP / Buddypress install.
2. Next you’ll need to hide the extra name / username field on the registration area, and the BP profile area. Stick this CSS into your theme custom CSS under Appearance > Customize:
#profile-edit-form .field_1 { display: none;} #signup_form .field_1 { display: none;}(I have seen a 3rd line of CSS on other solutions – #register-page p { display: none;} – all this did for me was to hide the confirmation message after the user registers. You probably want that so I’d leave that line out).
3. The fields should now be hidden, but the system still requires that information to process properly. So next create a file in notepad and save it as name_remove.js
In that file put the following javascript:
document.getElementById("signup_username").onchange = function() {myFunction()}; function myFunction() { var x = document.getElementById("signup_username"); document.getElementById("field_1") .value = x.value }Save that file and upload it to your theme folder (same folder as functions.php etc). This javascript automatically populates the hidden field with the username, so the system does not complain or fall over.
4. Finally you need WordPress to pick this javascript file up. You can do that with a function, using file enqueing. Copy and paste this function into your themes functions.php file Appearance > Editor
function wpb_adding_scripts() { wp_register_script('name_field_remove', get_stylesheet_directory_uri() . '/name_remove.js', array('jquery'),'1.1', true); wp_enqueue_script('name_field_remove'); } add_action( 'wp_enqueue_scripts', 'wpb_adding_scripts' );You have to be careful about the path. If it’s not working at this point, you can view the page source of your register page, and search for “name_remove.js” – look at the path on that script line. If the path is wrong, tweak it in the function above (you might need to change the get_stylesheet_directory_uri() part, or the path part after it. You can check if the path is correct by clicking the link to the .js file in the page source. If the path is wrong, you will get a 404 error. If the path is right, you should see the script code contained in the js file. Fiddle around with the path until it’s correct.
At that point, you have hidden the fields with CSS, and populated the second hidden username / name field automatically with javascript. Test your registration / confirmation email etc to make sure everything is working. But you should be good to go.
Hope that helps someone. Thanks to the folks I cobbled this solution together from.
May 11, 2017 at 9:10 pm #265937Jay
Participant@6logics – Thanks! This is exactly what I needed to effect the use of BuddyPress email templates with Postman SMTP.
It’s a shame the core code has to be modified, but until some sort of filter can be provided (eg, “bp_email_force_use_of_templates”), this seems to be our only recourse. Perhaps something along the lines of:
$must_use_wpmail = apply_filters( 'bp_email_use_wp_mail', $wp_html_emails || ! $is_default_wpmail ); if ( $must_use_wpmail ) { $to = $email->get( 'to' ); $use_template = $wp_html_emails && return wp_mail( array_shift( $to )->get_address(), $email->get( 'subject', 'replace-tokens' ), apply_filters( 'bp_email_force_use_of_templates', false ) ? $email->get_template( 'add-content' ) : $email->get( 'content_plaintext', 'replace-tokens' ) ); }May 11, 2017 at 3:56 am #265927Topic: Sidebars and pages
in forum How-to & Troubleshootinglordmatt
ParticipantI have BuddyPress installed on a network and I am using the customizr theme. I have set the “members” page to no sidebar. This works for the members list but for some reason /members/someuser still has the sidebar.
What do I need to do to get that sidebar to vanish?
May 10, 2017 at 2:52 am #265918In reply to: Removing content filter on registration page
Henry Wright
ModeratorCause using hooks is more sustainable and less likely to have conflicts in the future?
Possibly but the template hierarchy is integral to BuddyPress and use is encouraged. If you find a water-tight alternative way of doing it then by all means use that approach instead.
May 9, 2017 at 10:17 pm #265906In reply to: Removing content filter on registration page
Henry Wright
ModeratorWhy are you unhooking the reg form from the content? I think the BuddyPress template hierarchy can help you here.
You can just nuke the reg form from your-child-theme/buddypress/members/register.php and then add your custom form.
May 9, 2017 at 12:09 am #265895In reply to: WordPress Register Pages
Henry Wright
ModeratorI want it to show the welcome page, which I have associated with the Buddypress register pageā¦.
Can you describe what the welcome page is and how you’ve associated it with the reg page?
May 8, 2017 at 9:04 pm #265891In reply to: WordPress Register Pages
chief1971
ParticipantYeah I logged out and tried to login as a new user. When I type the website address it shows the registration question page, however I want it to show the welcome page, which I have associated with the Buddypress register page…..
May 8, 2017 at 6:47 pm #265889In reply to: Profile Page Layout
r-a-y
KeymasterYou’ll want to look at our template hierarchy codex page:
https://codex.buddypress.org/themes/theme-compatibility-1-7/template-hierarchy/
https://codex.buddypress.org/themes/theme-compatibility-1-7/template-hierarchy/#single-member-pagesThen, you could customize the layout of your member profile pages by adding a sidebar or whatever only on member profile pages.
May 6, 2017 at 12:10 pm #265857In reply to: Upload avatar after activation
threwthenevr
ParticipantThank you for the reply.
Unfortunatly thats not what i was trying to do.
Here’s what iv done so far.I created an empty file in /kleo-child/buddypress/members/single and named index-action-change-avatar.php
in /kleo-child/buddypress/members/single/index-action-change-avatar.php i’ve copied/pasted the content of the bp-templates/bp-legacy/buddypress/members/single/profile/change-avatar.php template.
added get_header(); before the pasted content and get_sidebar(); & get_footer(); after it.
I then copied the code fron change-avatar.php and pasted it to my newly created page(Avatar Upoload).
it works but it has some template issue.

not sure how to fix that yet but im still searchng, the actual upload and crop part im sure to have issues to sort out there as well.May 6, 2017 at 1:48 am #265854In reply to: Can’t upload profile pic with ipad or iphone
r-a-y
KeymasterHere’s
avatar.cssthat’s been patched up:
https://pastebin.com/raw/X6Nc0QdsIf your site doesn’t use RTL, then you just need
avatar.css.Please replace
/buddypress/bp-core/css/avatar.csswith this file and retry in iOS. Remember to purge your browser cache.May 5, 2017 at 9:02 pm #265846In reply to: Upload avatar after activation
Henry Wright
ModeratorI did a quick search and found Buddypress Upload Avatar Ajax. Not sure if it helps?
May 4, 2017 at 10:17 am #265819cliffsuss
Participantokay, got it,
1. From (in my case) your host’s homepage, find the CP file manager.
2. in the manager, at the top, where there is a search bar, search for – wp-config.php.
3. Read and remember where file is located. Next, go to it, and press edit.
4. Once inside, there will be lots of text, look for ………DB_COLLATE’,”);
5. paste the following code right after that, on the next line
/**
* Change BuddyPress default Members landing tab.
*/
define(‘BP_DEFAULT_COMPONENT’, ‘profile’ );6. Save and its done!:)
May 4, 2017 at 6:53 am #265817cliffsuss
ParticipantHello, There is this link:
for how to Change Default Members Profile Landing TabBut it is quite brief, and I am not very good at this, can someone just, very simply, guide me on how to do this step by step? Especailly the part on creating config.php or bp-custom.php on the plugin folder.
Any help would be so much appreciated!
Kind Regards
Cliff
May 3, 2017 at 11:45 pm #265808In reply to: Questions about a new community project
Nahum
ParticipantPlus this https://wordpress.org/plugins/buddypress-simple-events/ maybe? In the pro version, users can mark if they will attend(“register on it”).
May 3, 2017 at 8:50 pm #265802In reply to: Questions about a new community project
Henry Wright
Moderator1- need to create a website where users login
BuddyPress can do this but the rest of your requirements will either need to be custom coded or you’ll need to find a plugin because BuddyPress doesn’t have that functionality out-of-the-box.
May 3, 2017 at 8:16 pm #265796In reply to: Creating a Custom Component Without Plugin
Nahum
Participant@shanebp thanks for the reply
I was looking at the BP component references, even on your event simple plugin to get an idea…
If what I would like to do is just assign all my CPT comments tracking under a united CPT comments component or post component with all the different cpt post actions in one stream, I would need to create a different plugin for each combination of mixed activities?
Let’s say I want to move around specific actons like “updated_profiles” from activity to custom component in order to address an issue like this https://buddypress.org/support/topic/removing-actions-from-activity-stream-with-filtering-options/…wouldn’t it be a solution to reassign an unwanted action to a custom component.
May 3, 2017 at 3:25 pm #265781In reply to: how to change the count display to the left?
Peter Hardy-vanDoorn
ParticipantAdd this to your CSS:
#buddypress div.item-list-tabs ul li a span { float: left; }May 3, 2017 at 12:31 am #265767Topic: How To: Remove “All Members” Activity Feed
in forum How-to & Troubleshootingzsauce
ParticipantAfter much research through many old threads, using the combination of a few, I figured out how to remove the “All Members” view of the Activity feed.
I originally tried a solution posted by paulhastings0 on the page https://buddypress.org/support/topic/change-the-default-activity-tab/
However, as a member in that thread posted a few comments later, this only changes the default selection of the tab, it does not in fact change the feed that is loaded. So the tab said “My Friends” (or whatever tab you set as selected), but the feed that loaded was still the “All Members” feed.
The second option I found (which I can’t find again to link to while writing this) only removed the “All Members” tab option, but simply left the tab as a blank space, while still loading the “All Members” feed.
If you combine the two solutions however, it works like a charm!
So, here’s the solution:
You should be working in the BP Child theme.
1) Copy the index.php file from ../wp-content/themes/boss/buddypress/activity
2) Paste the index.php into your ../wp-content/themes/boss-child/buddypress/activity directory (it doesn’t exist, so you’ll have to create it)
3) Use the first solution by paulhastings0 in the old thread to change which tab is default selected by removingclass="selected"from the<li class="selected" id="activity-all"><a href="<?php bp_activity_directory_permalink(); ?>" title="<?php esc_attr_e( 'The public activity for everyone on this site.', 'boss' ); ?>"><?php printf( __( 'All Members <span>%s</span>', 'boss' ), bp_get_total_member_count() ); ?></a></li>line (on line 24) and addclass="selected"to the new tab you want selected (I chose the “My Friends” tab, so for me it was<li id="activity-friends"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/'; ?>" title="<?php esc_attr_e( 'The activity of my friends only.', 'boss' ); ?>"><?php printf( __( 'My Friends <span>%s</span>', 'boss' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ); ?></a></li>on line 34.
4) Now, delete the<li id="activity-all"><a href="<?php bp_activity_directory_permalink(); ?>" title="<?php esc_attr_e( 'The public activity for everyone on this site.', 'boss' ); ?>"><?php printf( __( 'All Members <span>%s</span>', 'boss' ), bp_get_total_member_count() ); ?></a></li>code from line 24.Hope this saves someone from hours of searching like I did!
May 2, 2017 at 4:14 pm #265765In reply to: Can’t upload profile pic with ipad or iphone
r-a-y
KeymasterHi @elijeh,
Can you try the following fix?
https://buddypress.trac.wordpress.org/attachment/ticket/7416/7416.01.patchApril 30, 2017 at 12:42 pm #265734In reply to: Custom Post Type Tracking
Nahum
Participantwell I was trying post the my code, but I think I spammed myself after trying to edit the reply to this …
CPT (and custom title thing)add_action('init', 'video_register_my_cpt'); function video_register_my_cpt() { register_post_type('video', array( 'label' => 'Videos', 'description' => 'Latest Videos', 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'show_in_nav_menus' => false, 'capability_type' => 'post', 'hierarchical' => false, 'rewrite' => array('slug' => 'videos'), 'query_var' => true, 'has_archive' => true, 'exclude_from_search' => false, 'supports' => array('title','editor','excerpt','trackbacks','custom-fields','comments','revisions','thumbnail','author','page-attributes','buddypress-activity'), 'bp_activity' => array( 'component_id' => buddypress()->blogs->id, 'action_id' => 'new_video', 'format_callback' => 'bp_blogs_format_activity_action_new_blog_post', 'comment_action_id' => 'new_video_comment', 'comment_format_callback' => 'bp_activity_format_activity_action_custom_post_type_comment', 'contexts' => array( 'activity', 'member' ), 'position' => 40, ), 'taxonomies' => array('video_category','video_tag'), 'labels' => array( 'name' => 'Videos', 'singular_name' => 'Video', 'menu_name' => 'Videos', 'add_new' => 'Add Video', 'add_new_item' => 'Add New Video', 'edit' => 'Edit', 'edit_item' => 'Edit Video', 'new_item' => 'New Video', 'view' => 'View Video', 'view_item' => 'View Video', 'search_items' => 'Search Videos', 'not_found' => 'No Videos Found', 'not_found_in_trash' => 'No Videos Found in Trash', 'bp_activity_admin_filter' => __( 'New video published', 'custom-domain' ), 'bp_activity_front_filter' => __( 'Videos', 'custom-domain' ), 'bp_activity_new_post' => __( '%1$s added <a href="%2$s">[Video]</a>', 'custom-domain' ), 'bp_activity_new_post_ms' => __( '%1$s added <a href="%2$s">[Video]</a>','custom-domain' ), 'bp_activity_comments_admin_filter' => __( 'Comments about video', 'custom-domain' ), // label for the Admin dropdown filter 'bp_activity_comments_front_filter' => __( 'Video Comments', 'custom-domain' ), // label for the Front dropdown filter 'bp_activity_new_comment' => __( '%1$s commented on a <a href="%2$s">video</a>', 'custom-domain' ), 'bp_activity_new_comment_ms' => __( '%1$s commented on a <a href="%2$s">[Video]</a>, on the site %3$s', 'custom-domain' ) ) ) ); } function my_video_include_post_type_title( $action, $activity ) { if ( empty( $activity->id ) ) { return $action; } if ( 'new_video' != $activity->type && 'new_video_comment' !=$activity->type ) { return $action; } preg_match_all( '/<a.*?>([^>]*)<\/a>/', $action, $matches ); if ( empty( $matches[1][1] ) || '[Video]' != $matches[1][1] ) { return $action; } $post_type_title = bp_activity_get_meta( $activity->id, 'post_title' ); if ( empty( $post_type_title ) ) { switch_to_blog( $activity->item_id ); $post_type_title = get_post_field( 'post_title', $activity->secondary_item_id ); // We have a title save it in activity meta to avoid switching blogs too much if ( ! empty( $post_type_title ) ) { bp_activity_update_meta( $activity->id, 'post_title', $post_type_title ); } restore_current_blog(); } return str_replace( $matches[1][1], esc_html( $post_type_title ), $action ); } add_filter( 'bp_activity_custom_post_type_post_action', 'my_video_include_post_type_title', 10, 2 );BP CUSTOM
/*////////////////////////////////////////////////////////////////////////////////////////////*/ // Modifying CPT Activity Actions /*///////////////////////////////////////////////////////////////////////////////////////////*/ function record_blogpost_activity_action( $activity_action, $post, $post_permalink ) { global $bp; if( $post->post_type == 'jobs' || get_post_type($post->ID) == 'jobs' ) { $activity_action = sprintf( __( '%1$s', 'buddypress' ), bp_core_get_userlink( (int) $post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>'); } elseif( $post->post_type == 'video' || get_post_type($post->ID) == 'video' ) { $activity_action = sprintf( __( '%1$s posted a video', 'buddypress' ), bp_core_get_userlink( (int) $post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' ); } elseif($post->post_type == 'post' ) { $activity_action = sprintf( __( '%1$s posted a blog', 'buddypress' ), bp_core_get_userlink( (int) $post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' ); } return $activity_action; } add_filter('bp_blogs_activity_new_post_action', 'record_blogpost_activity_action', 11, 3); /*////////////////////////////////////////////////////////////////////////////////////////////*/ // Modifying CPT Comment Activity Actions /*///////////////////////////////////////////////////////////////////////////////////////////*/ function comment_activity_action( $activity_action, $post, $post_permalink ) { global $bp; if( $post->post_type == 'post' ) { $activity_action = sprintf( __( '%1$s commented on %2$s', 'buddypress' ), bp_core_get_userlink( (int) $post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' ); } elseif( $post->post_type == 'video' || get_post_type($post->ID) == 'video' ) { $activity_action = sprintf( __( '%1$s replied on the video %2$s', 'buddypress' ), bp_core_get_userlink( (int) $post->post_author ), '<a href="' . esc_url( $post_permalink ). '">' . $post->post_title . '</a>' ); } return $activity_action; } add_filter('bp_blogs_activity_new_comment_action', 'comment_activity_action', 11, 3); /*//// ? /////*/ function bbg_record_video_post_type_comments( $post_types ) { $post_types[] = 'video'; return $post_types; } //add_filter( 'bp_blogs_record_post_post_types', 'bbg_record_video_post_type_comments' ); //add_filter( 'bp_blogs_record_comment_post_types', 'bbg_record_video_post_type_comments' );doing it this way, everything works except my custom comment action.
April 29, 2017 at 8:02 pm #265714In reply to: Update Notification With Using Ajax
MadManSam
Participant@dono12 I’m experiencing the same browser behavior, and it would be a better UI for notifications if we were to add AJAX and a batch (read/unread) feature would be great too.
Or is that open to use something like wp-api for buddypress to solve this.
How did you solve this?April 29, 2017 at 5:57 pm #265710In reply to: Resend activation email
threwthenevr
ParticipantUpdate: nvm it only worked flawlessly when I had it all to the default wp-login.php.
When someone registers to my site they are redirected to my buddypress register.php and within that page is would say thank you for registering please check your email for activation link.
I wanted to place a resend activation email on the same page so I placed this code in that register.php file
$resend_url=( ‘If you have not received an email yet, click here to resend it.’, ‘buddypress’ ), esc_url( $resend_url ) );
The problem is ran into is the plugin wp security I use has an option to change the wp-login.php to whatever I want so I just renamed it to /login.
I then changed the wp-login.php in the code to login?action and the linked redirected to the correct wp-login now the /login page but never sent the resent activation email.
I also have it when a user trys to login without activating first it would post an error on the login popup with the resend activation email, if I keep wp-login.php it works but if I change the wp-login.php to just /login it won’t work.
Those two issues have me confused. I’m totally new to php and recently been studying as much as I can but all the documentation out there had me struggling to Figuer this out.
Does anyone by chance have any insight on this?April 28, 2017 at 12:01 pm #265682In reply to: Solved – Customize the login page of wordpress
lalitavalon
ParticipantHello, I found the solution for the same.
this is the link that is helpful for me.
There are many internal configuration settings that can be changed by adding a configuration definition line to our wp-content/plugins/bp-custom.php file.My another concerned is that In the message there is a button of starred and also a feature to make a message as a star marked so i want to disable/remove this feature form the message please help me in this if you have any idea
April 28, 2017 at 10:59 am #265679In reply to: Solved – Customize the login page of wordpress
Henry Wright
ModeratorThe Customizing Labels, Messages, and URLs article should help.
April 28, 2017 at 8:33 am #265675In reply to: Solved – Customize the login page of wordpress
lalitavalon
ParticipantHi @henry,
There are some labels like friends, nitifications, messages etc we want to change thees labels. Suppose we have to change Friends to Member and also url corresponding. How we can chnage all the things in the buddy press because buddypress donot provide any settings to change so please help me. -
AuthorSearch Results
