Forum Replies Created
-
In reply to: change name “view” in profile menu
It should be
$bp->bp_options_nav['profile']['public']['name'] = 'Visualizza nome profilo';In reply to: Best Theme for Busy Community?I’d vote for boss theme too. It looks awesome and is specifically built for buddypress network sites.
http://www.buddyboss.com/product/boss-theme/. You might want to check its live demo.In reply to: Get all options from custom profile fieldfunction wdw_bp_get_field_options( $field_id ){ global $bp, $wpdb; return $wpdb->get_col( $wpdb->prepare( "SELECT name FROM {$bp->profile->table_name_fields} WHERE parent_id=%d AND type='option'", $field_id ) ); }You can call the above function passing id of the field( fieldabc in your example ). This will return all options of the field in an array.
In reply to: Get Logged-In User Profile Link URL?You can wrap it in a shortcode.
Add following in your functions.php file:add_shortcode( 'CUSER-PROFILE', 'cuser_profile_shortocode_handler' ); function cuser_profile_shortocode_handler( $atts ){ $atts = shortcode_atts( array( 'text' => 'my profile', ), $atts ); if( !is_user_logged_in() ) return ''; $link = home_url( '/hbcmembers/' . bp_core_get_username( get_current_user_id() ) . '/profile/' ); return "<a href='". esc_attr( $link ) ."'>" . $atts['text'] . "</a>"; }Then you can add [CUSER-PROFILE text=”Edit Profile”] in html block etc..
In reply to: How to add custom fields/shortcode in my profileThere are many action hooks defined in member templates at different locations. Based on your design, you can hook into any of those and print the output of shortcode.
For example, to print it in member header, right after last activity update, you can hook into ‘bp_before_member_header_meta’. Untested code :-add_action( 'bp_before_member_header_meta', 'myprefix_display_mycred_rank' ); function myprefix_display_mycred_rank(){ echo do_shortcode( '[mycred_my_rank show_title="1" show_logo="1" user_id="' . bp_displayed_user_id() . '"]' ); }In reply to: Activation Email Name edit?Most likely its an issue with copying the code from here. It adds backticks in code, you need to remove those carefully.
In reply to: Activation Email Name edit?add_filter('wp_mail','my_custom_registration_mail'); function my_custom_registration_mail($email) { if (isset ($email['subject']) && substr_count($email['subject'],'Activate Your Account')>0 ) { //email sender name and email if( empty( $email['headers'] ) ){ $email['headers'] = array(); $email['headers'][] = 'from:YourDomain<signups@yourdomain.com>'; } } return ($email); }This should do it. Just change ‘yourdomain’ with something proper.
You’ll have to copy this code into bp-custom.php or your theme’s functions.phpIn reply to: Require profile image?Have a look at this.
This provides a way to upload profile pic during registration, but doesn’t force users to upload.
You can probably tweak the plugin to achieve that, although i am not sure how easy that’ll be.In reply to: Adding Custom JavaScript To x ProfilesTo add javascript to any page, you can put it in any of your theme’s javascript files.
To do layout changes you’ll need an understanding of BuddPress Templates Hierarchy and css customizations.
fields assigned with the URL type – they never show up once data is entered.
Must be something in your theme/plugins. It works by default.
text fields – data entered is being displayed with links added to words and phrases, linking to them as members.
Yeah buddypress does it deliberately. The purpose is to show/search all members who have entered same value in any of the fields.
You can disable it by adding following line of code in bp-custom.php or in your theme’s functions.php:
remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 2 );- If your theme already has register.php template file, go step 2 directly.
If not, copy file plugins\buddypress\bp-templates\bp-legacy\buddypress\members\register.php to themes\your-theme\buddypress\members\register.php - Open register.php file and find following code:
<?php do_action( 'bp_before_registration_submit_buttons' ); ?> <div class="submit"> <input type="submit" name="signup_submit" id="signup_submit" value="<?php esc_attr_e( 'Complete Sign Up', 'buddypress' ); ?>" /> </div> <?php do_action( 'bp_after_registration_submit_buttons' ); ?>Move this code block to just before the line which says
</div><!-- #profile-details-section -->
That should do it.
In reply to: Edit Profile Redirects to different pageDevs at nexgen are aware of this issue.
I ran into the same issue and had to deactivate nexgen. No other way!In reply to: Adding Terms of Service To Registrationhttps://wordpress.org/extend/plugins/bp-xtra-signup/ i did use this plugin a while ago (may be 4-5 months ago) and it sort of worked. I guess i did have to do some tweaking though.. uhhhh i never remember things.. but i can tell you it works, its one of my clients site so i shouldn’t share the url, but that things is still working perfectly even after upgrading to bp 1.6
In reply to: [Resolved] hide profile from non-logged-in usersI am sure it must be some typo mistake as the code isn’t complicated or error prone. Make sure while copying the code from here, you copy it correctly and have removed unwanted formatting
In reply to: [Resolved] hide profile from non-logged-in users@Chouf1 thanks. works like a charm.
Since i didn’t want anything (even the avatar image) to be displayed to non-logged in users, i added the code in home.php instead (and plugins.php, since i have 2-3 custom pages added to users profile).Many thanks.
In reply to: How to display User is online with image icon?I had to do something similar a while ago, wrote my own function

here it is http://webdeveloperswall.com/buddypress/check-if-a-user-is-onlineIn reply to: can’t access $_FILES inside my pluginyes javascript did work, thank you. i wonder why it didn’t cross my mind before

and i did submit an enhancement ticket..In reply to: can’t access $_FILES inside my pluginopps my bad! forgot that the form’s enctype attribute has to be set. if i edit the `wp-contentpluginsbuddypressbp-themesbp-defaultmemberssinglemessagescompose.php` file to set the forms enctype then it works. but then another problem, how do i set it through my plugin so that i dont have to go and edit that file manually. or is if possible in the first place? any work around?
- If your theme already has register.php template file, go step 2 directly.