Search Results for 'profile fields'
-
Search Results
-
This may not be the most elegant solution but perhaps it will be useful to others. I use WP=2.9.2 & BP 1.2.1 and a simplistic child theme based on the BuddyPress Default 1.2.1 theme.
I want to have certain xProfile fields that are visible to others but could only be administered by the site administrator (e.g. is their membership payment up-to-date). I decided the easiest strategy would be to prevent a user from having access to the “SAVE CHANGES” button on the admin page of a specific xProfile group named “Admin-only”.
1) i copied a file from the default theme: BLOG_BASE/wp-content/plugins/buddypress/bp-themes/bp-default/members/single/profile
2) I placed the file into my child theme: BLOG_BASE/wp-content/themes/MY_CHILD_THEME/members/single/profile/edit.php
3) Within the file, I replaced these lines (from around line #104):
<?php do_action( ‘bp_after_profile_field_content’ ) ?>
<div class=”submit”>
<input type=”submit” name=”profile-group-edit-submit” id=”profile-group-edit-submit” value=”<?php _e( ‘Save Changes’, ‘buddypress’ ) ?> ” />
</div>
with the following lines:
<?php do_action( ‘bp_after_profile_field_content’ ) ?>
<!–
****** RESTRICT ADMINISTRATION OF ADMIN-ONLY XPROFILE GROUP TO ADMINISTRATORS
****** BY REMOVING THE “SAVE CHANGES” BUTTON UNLESS USER IS A SITE ADMINISTRATOR
–>
<?php if ( bp_get_the_profile_group_name() == “Admin-only” && !is_site_admin() ) : ?>
<h4>
<?php printf( __( “Only Administrators can save changes in this Profile Group”, “buddypress” ) ); ?></h4><?php else: ?>
<div class=”submit”>
<input type=”submit” name=”profile-group-edit-submit” id=”profile-group-edit-submit” value=”<?php _e(
‘Save Changes’, ‘buddypress’ ) ?> ” />
</div>
<?php endif; ?>
<!– ****** END OF ADMIN-ONLY RESTRICTION –>
4) From the Dashboard: BuddyPress –> Profile Field Setup create a new Field Group called “Admin-only”
Now, any field added into this group will have the restriction that its value can only be changed by a site-administrator.
As I said, not elegant, but i hope it helps.
Hi,
I’m building a BP/WP single install site for a local organization and the extra profile fields are divided in 4 sections:
Group 1- Full Name (base group)
Group 2- General Info (location, age, gender, occupation)
Group 3 – Personal Info (bio, interests, etc.)
Group 4 – Contact (messengers ID’s, Twitter, etc.)
What I’m trying to accomplish is to hide groups 3 and 4 on the registration page not to overwhelm the user with a bunch of fields to fill out during sign-up, those fields can be filled out once the user has activated her/his account via “edit profile”.
Thanks,
Gene
I’d like to pre-populate some BuddyPress profile fields with certain information.
Where would I go to add the information/code that I want to appear in a specific profile field?
I’d like to add some information from the various profile fields to the Members directory. I can pull the info from the profile fields, but the challenge is figuring out how to format it so that it shows up in multiple columns (instead of one giant column) next to the basic member entries.
Any thoughts on how I can do this? I know enough CSS to use the float properties, but the multiple columns is giving me a bit of trouble.
Thanks.