Search Results for 'profile fields'
-
Search Results
-
Topic: XProfile Fields
I have a multi-select box for one of my profile fields and I need to add to that particular field a text box when the user selects other. Is there a way to do this. I know it’s possible with JQuery because I’ve done it but I haven’t tried to do it with a plugin and I’m not sure where I would put the code to make this happen. Any suggestions?
I’m trying to show an image on a profile based on whether a check box is checked in the extended profile.
For example, on a normal WordPress site I do this with custom fields like this:
<?php if (get_field('badge_certified')): ?> <div class="badge"><img src="<?php echo get_bloginfo('url'); ?>/media/badge-certified.png" class="tooltips" title="Certified Member"></div> <?php endif; ?>The above code only shows the badge if the ‘badge_certified’ custom field is filled out.
So if I have a BP extended profile checkbox named ‘Certified Member’ and I want an image to display if that field is checked, how could I do this?
Thanks to anyone willing to help out!
Hey BuddyPressers.
I’m brand spanking new to BP. I’m used to building themes from scratch in WordPress, and for designing a site, I’m a custom post type/custom field addict.
With that said, I have a current site that just launched with user profile pages that are really custom post types, with a bunch of custom fields assigned to them. I’m now moving this site to BuddyPress, and after looking at instructions on theme development, my approach is to take my existing styling, and instead of calling in custom fields, I’m using:
<?php bp_member_profile_data( 'field=Name' ); ?>to fully construct the profile pages. For each custom field I currently have, I’m adding an extended profile field in BuddyPress.
Does that make sense? Because this seems really easy to implement which is really nice!!!
Any comments appreciated….I don’t want to do it wrong.
(And yes, I’ve moved the buddypress and css folders to my theme’s root, and am styling the profile page using buddypress.php in the root of my theme)
Hi.
So I’m using Gravity Forms User Add On and Autochimp. What was happening was that Gravity Forms updated buddypress profile fields using the function: xprofile_set_field_data() but Autochimp was not updating the subscribers list with this information.
Autochimp updates your subscriber list with buddypress profile fields when the buddypress profile fields are updated, it uses this action: xprofile_updated_profile
However, this action: “xprofile_updated_profile” is only available here: bp-xprofile-admin.php line 659 in function user_admin_load() and here: bp-xprofile-screens.php in line 134 in function xprofile_screen_edit_profile(). It is not available in the function xprofile_set_field_data() that Gravity Forms and many other plugins use.
The action should also exist in the function xprofile_set_field_data() in the file bp-xprofile-functions.php .
However, my php level is 5 out of 10 and the format of filters/hooks and object programming is still not 100% clear to me.
If I add the action below “return $field->save();” I assume it won’t happen since the function ends at return, yes?
But I also can’t add it before because the data has not saved and there might be some errors. I saw there were 3 save() functions in bp-xprofile-clases.php and couldn’t figure out which one was being called.
All 3 functions do have this action: “xprofile_data_after_save” but it’s an array and I have no idea how to manage that.
This is how Mailchimp calls the action:
add_action('xprofile_updated_profile', array( $this, 'OnBuddyPressUserUpdate' ), 101 );inside this function
public function SyncBuddyPress() { // Used to sync users with MailChimp add_action('xprofile_updated_profile', array( $this, 'OnBuddyPressUserUpdate' ), 101 ); add_action('bp_core_signup_user', array( $this, 'OnBuddyPressUserUpdate' ), 101 ); }And the function the action calls is this:
public function OnBuddyPressUserUpdate( $user_id = 0 ) { if ( 0 == $user_id ) { // Get the current user $user = wp_get_current_user(); } else { $user = get_userdata( $user_id ); } // Pass their ID to the function that does the work. AC_OnUpdateUser( $user->ID, $user, TRUE ); }I have multiple questions:
– why does the action get called with an array? what’s $this?
– how can I make Autochimp update when this function is called: xprofile_set_field_data()Thank you in advance!
Hi!
I have created in the Base (Primary) extended profile group a drop-down menu/field ‘User Type’ with three options (Faculty, Student, Visitor). Also, I have created an extended profile fields group ‘Academic Profile’ (id number 2).
What I want to do is to hide the ‘Academic Profile’ fields group from editing (not displaying on the user edit profile page) if the drop-down field ‘User Type’ from the Base group is empty or not ‘Faculty’.
I have the next code in the bp-custom.php, but it not works. What am I doing wrong?
/* xProfile display for faculties */ function exclude_xProfile_group_if_user_is_not_a_faculty( $args = array() ) { //Check if the user is not a faculty if ( xprofile_get_field_data( 'User Type', $user_ID ) != 'Faculty' ) : //Comma-separated list of xProfile fields group IDs to exclude $args['exclude_groups'] = "2"; endif; return $args; } add_filter( 'has_profile', 'exclude_xProfile_group_if_user_is_not_a_faculty');WordPress 3.9.1
Buddypress 2.0.1
http://upsic.org/Hi everyone, first of all forgive my bad English.
I have one problem with this site, http://www.companyculture.com.php53-8.dfw1-2.websitetestlink.com/ especifically in the registration code.
At this lineif ( bp_is_active( 'xprofile' ) ) : if ( bp_has_profile( 'profile_group_id=1' ) ) : while ( bp_profile_groups() ) : bp_the_profile_group();The if ( bp_has_profile( ‘profile_group_id=1’ ) ) returns false, even when there is a profile group with the group_id=1.
I don’t know why is this happening, the site uses a 2 step registration form, the first one for basic info and the second one that supposedly run through the profile fields and build the form.
It was working before and my client says he didn’t do anything to cause the issue.
If you want I can add the full file code and the jQuery function.
Thanks for your help!
I’m a total novice with PHP and need some help with creating some code to go inside my functions.php file. The code I need is a clone of the call to bp_the_profile_group_field_ids() that will filter out 3 xprofile field names that I don’t want users to be able to edit.
Background: I’ve successfully modified the edit.php file to not display those 3 “required” fields (because I don’t want users to be able to edit them). However, the problem I discovered is that after modifying the edit.php file to hide those 3 fields (which I make “required” during registration), when a user clicks “Save Changes” on their Edit Profile page, it results in the message: “Please make sure you fill in all required fields in this profile field group before saving” (even though all required fields have data in them).
Through my online research, I found that the following line of code in the edit.php file is the problem…
<input type="hidden" name="field_ids" id="field_ids" value="<?php bp_the_profile_group_field_ids() ?>" />Apparently, the call to bp_the_profile_group_field_ids() which creates a list of the expected field names does not have a filter. So I would need to clone that function in my functions.php file and manually filter out my 3 desired fields from the string that gets generated.
Anyone able to help with this… PLEASE?
Hi guys!
I have extended my WordPress sign up form with additional BP profile fields. All text fields save to the database just fine apart from multi fields (I’m using checkboxes and dropdowns). The default values are not set, nor is the information saved to the database. Any ideas what may cause that? I’m running latest versions of WP and BP and have tested on a clean site with BP as only plugin.Thanks