Search Results for 'profile fields'
-
AuthorSearch Results
-
April 13, 2010 at 1:14 am #73216
jfcarter
ParticipantAfter registration. These are not required fields.
April 13, 2010 at 12:39 am #73210Gene53
ParticipantOops,sorry, I think there was a misunderstanding, bp-register loads all groups by default, what I’m trying to accomplish is to hide (or not load) groups 3 and 4 so the user can fill those optional field groups once they’ve activated their accounts..
April 12, 2010 at 10:54 pm #73202jivany
ParticipantOK. I’m thinking you can do something like this. Find this part of the file in register.php:
<?php /***** Extra Profile Details ******/ ?>
<?php if ( bp_is_active( 'xprofile' ) ) : ?>
<div class="register-section" id="profile-details-section">
<h4><?php _e( 'Profile Details', 'buddypress' ) ?></h4>
<?php /* Use the profile field loop to render input fields for the 'base' profile field group */ ?>
<?php if ( function_exists( 'bp_has_profile' ) ) : if ( bp_has_profile( 'profile_group_id=1' ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
<?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>At this point, add in a line like:
if( (bp_the_profile_group != "3") || (bp_the_profile_group != "4") ) :Then go down to this part of the file:
<?php endwhile; ?>
<input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php bp_the_profile_group_field_ids() ?>" />
<?php endwhile; endif; endif; ?>
</div><!-- #profile-details-section -->Before the first endwhile line, insert this:
<?php endif; ?>I *think* that should spit out groups 3 & 4 (assuming you have groups 3 & 4 defined in your profile groups). You might need to add in group “1” also to get the Base. The only part I’m not sure about right now is if the number need to be in double quotes or just bare. So it might be:
if( (bp_the_profile_group != 3) || (bp_the_profile_group != 4) ) :I think.
April 12, 2010 at 9:59 pm #73193Gene53
Participant@jivany, I’ve been playing around with this all afternoon but to no avail (learning PHP as I go along), either group no. 2 shows up but group 1 (name) doesn’t, or group 1 and only 1 field out of 6 from group 2 or neither groups 1 and 2.
I give up, LOL
Thanks,
Gene
April 12, 2010 at 5:30 pm #73024newbie999
ParticipantHello again. I posted this question on a new topic, no responses. I’ll try asking the question here since I have received responses on this thread. Thank you. Here goes:
I added the code below in wp-content/plugins/buddypress/bp-themes/bp-default/members/members-loop.php, to display additional profile fields in the member directory and to display the member’s role (either ‘Subscriber’ or ‘Provider’). In the code below, I specifically checked for the user’s role to determine whether I need to display ‘Subscriber’ or ‘Provider’.
Questions:
– is there a way to check for the capability instead – i.e., if the user can ‘edit posts’ then I will display ‘Subscriber’, otherwise I will display ‘Provider’? If so, can you please let me know how to do that as I have not been able to figure it out.
– is there a way to display a newline so that ‘Subscriber’ or ‘Provider’ will display on the next line, below the member’s title and company name. I tried to echo “n” but it’s not outputting a newline and I have no idea why.
Thank you for the help.
<?php
/***
* If you want to show specific profile fields here you can,
* but it’ll add an extra query for each member in the loop
* (only one regadless of the number of fields you show):
*
* bp_member_profile_data( ‘field=the field name’ );
*/
if( bp_get_member_profile_data ( ‘field=Title’ ) )
echo bp_member_profile_data( ‘field=Title’ ), ‘ (‘, bp_member_profile_data( ‘field=Company’ ), ‘)’, ‘ – ‘;
$user = new WP_User( bp_get_member_user_id() );
if ( $user->roles[0] == ‘subscriber’ )
echo ‘Subscriber’;
else
echo ‘Provider’;
?>
April 12, 2010 at 5:30 pm #73124newbie999
ParticipantHello again. I posted this question on a new topic, no responses. I’ll try asking the question here since I have received responses on this thread. Thank you. Here goes:
I added the code below in wp-content/plugins/buddypress/bp-themes/bp-default/members/members-loop.php, to display additional profile fields in the member directory and to display the member’s role (either ‘Subscriber’ or ‘Provider’). In the code below, I specifically checked for the user’s role to determine whether I need to display ‘Subscriber’ or ‘Provider’.
Questions:
– is there a way to check for the capability instead – i.e., if the user can ‘edit posts’ then I will display ‘Subscriber’, otherwise I will display ‘Provider’? If so, can you please let me know how to do that as I have not been able to figure it out.
– is there a way to display a newline so that ‘Subscriber’ or ‘Provider’ will display on the next line, below the member’s title and company name. I tried to echo “n” but it’s not outputting a newline and I have no idea why.
Thank you for the help.
<?php
/***
* If you want to show specific profile fields here you can,
* but it’ll add an extra query for each member in the loop
* (only one regadless of the number of fields you show):
*
* bp_member_profile_data( ‘field=the field name’ );
*/
if( bp_get_member_profile_data ( ‘field=Title’ ) )
echo bp_member_profile_data( ‘field=Title’ ), ‘ (‘, bp_member_profile_data( ‘field=Company’ ), ‘)’, ‘ – ‘;
$user = new WP_User( bp_get_member_user_id() );
if ( $user->roles[0] == ‘subscriber’ )
echo ‘Subscriber’;
else
echo ‘Provider’;
?>
April 12, 2010 at 10:51 am #72833In reply to: Anyone else working on integrating Gigya?
rsqst
ParticipantI agree with @dennis_h,
Gigya has some great (stable) plugins it would be nice to see this adjusted for BP. It sort of works. It will get them logged in, but its setup for WP so everything goes to the WP profile pages and not BP. I would say moding this would be ,much easier than try to make a stable version from scratch.
If this plugin would let you map FB profile info into xprofile fields, it would be exceedingly useful.
April 12, 2010 at 10:51 am #72933In reply to: Anyone else working on integrating Gigya?
rsqst
ParticipantI agree with @dennis_h,
Gigya has some great (stable) plugins it would be nice to see this adjusted for BP. It sort of works. It will get them logged in, but its setup for WP so everything goes to the WP profile pages and not BP. I would say moding this would be ,much easier than try to make a stable version from scratch.
If this plugin would let you map FB profile info into xprofile fields, it would be exceedingly useful.
April 12, 2010 at 6:01 am #72818stwc
ParticipantIf it’s on registration, work with a child theme as described in this thread: https://buddypress.org/forums/topic/adding-some-text-to-the-signup-form
Then just prepopulate the fields (assuming it’s static info for all registrants) using standard forms HTML stuff.
If it’s dynamic info, well, same first step, but after that, I’m out of my depth!
April 12, 2010 at 6:01 am #72918stwc
ParticipantIf it’s on registration, work with a child theme as described in this thread: https://buddypress.org/forums/topic/adding-some-text-to-the-signup-form
Then just prepopulate the fields (assuming it’s static info for all registrants) using standard forms HTML stuff.
If it’s dynamic info, well, same first step, but after that, I’m out of my depth!
April 12, 2010 at 3:00 am #72806Gene53
ParticipantThanks, I’ll give it a whirl tomorrow.
April 12, 2010 at 3:00 am #72906Gene53
ParticipantThanks, I’ll give it a whirl tomorrow.
April 12, 2010 at 2:54 am #72803jivany
ParticipantYou would probably have to do something like:
if( bp_the_profile_group != "3" || bp_the_profile_group != "4" ) {
//display the profile stuff in register.php
}You should be able to just toss that check near the top of that while loop and then remember your closing brace at the bottom.
April 12, 2010 at 2:54 am #72903jivany
ParticipantYou would probably have to do something like:
if( bp_the_profile_group != "3" || bp_the_profile_group != "4" ) {
//display the profile stuff in register.php
}You should be able to just toss that check near the top of that while loop and then remember your closing brace at the bottom.
April 12, 2010 at 2:40 am #72800Gene53
ParticipantThanks jivany, if I want to filter out groups 3 and 4, do I simply need to replace your above code’s “group number” with “3, 4”?
Thanks again
April 12, 2010 at 2:40 am #72900Gene53
ParticipantThanks jivany, if I want to filter out groups 3 and 4, do I simply need to replace your above code’s “group number” with “3, 4”?
Thanks again
April 12, 2010 at 2:31 am #72797jivany
ParticipantBasically, check your register.php main loop and only show the groups you want to show.
You’re looking for the while loop after the bp_is_active( ‘xprofile’ ) call.
Within the loop, you can filter out groups by doing a simple if check using
if (bp_the_profile_group() == "group number")where group number is the number of the group you want to show.Similar sort of idea in this thread: https://buddypress.org/forums/topic/profile-fields-questions
April 12, 2010 at 2:31 am #72897jivany
ParticipantBasically, check your register.php main loop and only show the groups you want to show.
You’re looking for the while loop after the bp_is_active( ‘xprofile’ ) call.
Within the loop, you can filter out groups by doing a simple if check using
if (bp_the_profile_group() == "group number")where group number is the number of the group you want to show.Similar sort of idea in this thread: https://buddypress.org/forums/topic/profile-fields-questions
April 10, 2010 at 9:05 pm #72667rsqst
ParticipantI found a solution here: http://www.code-zen.net/2009/using-custom-profile-field-data-in-buddypress-templates/
What I needed did in fact exist in the members loop already; just needed some help identifying it.
Line 36:
<?php/***
* If you want to show specific profile fields here you can,
* but it'll add an extra query for each member in the loop
* (only one regadless of the number of fields you show):
*
* bp_member_profile_data( 'field=the field name' );
*/
?>
April 9, 2010 at 9:32 pm #72594cupedoll
ParticipantCould be I got the same issue here. 2.92 WordPress (single user) and latest BuddyPress installed via BuddyPress Template Pack Plugin.
With nothing disabled in BP general settings, everything enabled in component setup.
There is no “create group” in the “groups” tab. Only “My Groups” and “Invites”. Clicking the “groups” tab goes to http://www.ultimatecultureclash.com/members/cupedoll/groups/ which seems fine.
But I want forums. And it seems forums are a property of groups. So I need groups. How to create groups?
(After much confusion) I enter MANUALLY: http://ultimatecultureclash.com/groups/create/step/group-details/
This goes to /groups/create/step/group-details/images/images/bg_body.gif which looks good. The heading says “Create a Group” and there’s input fields for “Group Name” and “Group Description”.
But entering group name, group description and pressing “Create Group and Continue —->” button only reloads blog homepage and creates nothing.
Here’s more examples. “Activity” tab + “Personal” tab resolves to http://www.ultimatecultureclash.com/members/cupe3903doll/activity/just-me/ which is probably right. But “Profile” tab + “Edit profile” tab redirects back to home page.
How weird is that?
And one more thing I noticed. When tabs resolve where they should? I get logged out. But when tabs redirect to home page? I remain logged in.
April 9, 2010 at 6:39 pm #72572In reply to: xprofile vs usermeta syncing problems
peterverkooijen
ParticipantI’m still on 1.1.3. In 1.1.3 xprofile only gets synchronized with wp_usermeta when the user updates his account, which means you can never count on the data being there, which makes it pointless.
Lousy synchronization between xprofile and usermeta is not a bug, it’s a conscious design feature. Why? I’ve brought this issue up many times and have never received a clear answer.
I use a custom function like this below to synchronize member data upon registration into all the different, unconnected places in the database where data is stored:
function synchro_wp_usermeta($user_id, $password, $meta) {
global $bp, $wpdb;
$uid = get_userdata($user_id);
$email = $uid->user_email;
$fullname = $meta[field_1];
... whatever you need here ....
update_usermeta( $user_id, 'nickname', $fullname );
update_usermeta( $user_id, 'first_name', $firstname );
update_usermeta( $user_id, 'last_name', $lastname );
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET display_name = %s WHERE ID = %d", $fullname, $user_id ) );
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET user_url = %s WHERE ID = %d", bp_core_get_user_domain( $user_id ), $user_id ) );
}
add_action( 'wpmu_activate_user', 'synchro_wp_usermeta', 10, 3);Not sure if this still works in 1.2. I had posted my work-arounds under ‘FAQ: How To, Code Snippets and Solutions’, but they have been deleted. So I guess they solved the issues in 1.2?
To synch xprofile you’d need to create the fields in xprofile that you have in wp_usermeta and then do something backwards like the above function, if that hook etc. is still valid.
April 9, 2010 at 5:44 am #72487In reply to: Adding some text to the signup form?
jwack
Participanthmmm, any idea how to add the a paragraph under the “name” field, under profile details? I am not seeing where its being added? Here is where it pulls in the custom fields, but the name field can’t be edited to add a description like the other custom fields in the admin.
<?php if ( 'textbox' == bp_get_the_profile_field_type() ) : ?>
<label for="<?php bp_the_profile_field_input_name() ?>"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label>
<?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?>
<input type="text" name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>" value="<?php bp_the_profile_field_edit_value() ?>" />
<p><?php endif; ?>
April 8, 2010 at 6:20 pm #72382r-a-y
KeymasterI’d like all the subscribers/authors/etc (aka artists) for a given blog (aka art project) to be listed at the top of the blog’s index.php page, with a few fields from the xprofile (bio, specialty, etc.). Ideally, I’d get them to echoed in a way that was easy to feed into a snazzy jquery slider gizmo.
Should be possible, Nathan, using some WP template tags combined with that code snippet I posted above.
I’d help out if you can guarantee me some free lodging in that art monastery some time in the future
April 8, 2010 at 11:47 am #72341In reply to: Skeleton Key: Login as any user plugin
Mike Pratt
Participant@xezo that is correct. I thought he was talking about access to all profile fields for edit/delete, for which you do have access via the extra Admin bar menus created by BP for admins. Those are the ones I use all the time (fixing avatar crop screw ups, as an example)
So, from that perspective, the only use for Skeleton Key would be for additional stuff introduced by less that robust plugins, no?
April 8, 2010 at 11:13 am #72331rsqst
ParticipantThanks for your help @r-a-y
It’s for the next version of this website: http://www.artmonastery.org
It’s for a network of artists. Each blog will be a specific art project, and each subscriber/author will be an artist participating in that art project. Many artists will be participating in many different art projects, and I’d like their bio information to be publicly displayed on each blog/project.
The blogs will be the public “portal” for each of the art projects, which we will us to promote the projects. The groups that are associated with each blog (with the group blog plugin) will be the internal communication tool for the artists.
I’d like all the subscribers/authors/etc (aka artists) for a given blog (aka art project) to be listed at the top of the blog’s index.php page, with a few fields from the xprofile (bio, specialty, etc.). Ideally, I’d get them to echoed in a way that was easy to feed into a snazzy jquery slider gizmo.
artists.
I’m trying to build a resource for these artists that is really 1 database with many faces, and given that I love wordpress, buddypress seemed like the best way to do that. It’s just stretching my abilities, at the moment
-
AuthorSearch Results