Search Results for 'profile fields'
-
Search Results
-
Hello,
I’m using BP 1.2.3 on a WordPress 2.9.2 install with the WP-FB-AutoConnect plugin.
On registration, WP-FB-AutoConnect automatically set the user first_name and last_name and I like that. However, once registred users can not change these first_name and last_name when editing their BP profile.
Is it possible to let members change the WP user data in adition the the BP profile fields ?
Hello. 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’). I only have 2 types of roles – Subscribers cannot edit posts and Providers can edit posts. 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’;
?>
Topic: Can I use buddypress for..
A blog community on which users have their own profiles and post their own articles (in one blog – not multiple MU blogs)? Also with custom login screens. They would just have a screen with a new post form and some custom fields. Lastly, would I be able to display popular articles?
Buddypress seems very exciting, not sure how powerful it is.
I use some checkboxes in my extended profile fields, to have a better layout in the members-profile the clicked values should not be seperated with ‘,’ I want them seperated in a new line with a or as a list. Where can I change this.
I got a profile field with a drop down menu and for some options there are apostrophes.
When I save it, the apostrophe generates a backslash before itself.
Example:
It’s never enough
Becomes:
It\’s never enough
This is quiet annoying. Any fix?
Hi,
Being that my site is Username only (I have changed Name to Username in General Settings), I only have that field in Base and other fields in a different group.
How can I hide the Base group in “edit profile” so the user can’t change his username?
Cheers,
Gene
I want to add one or two fields on an event registration form in a plugin to update the xprofile data of that user. I have no clue where to start with this.
The query would presumably look something like this:
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->bp_xprofile_data} SET value = %s WHERE ID = %d AND field_id=2", $companyname, $user_id ) );Lets say I want to create a form from scratch to update one field ‘companyname’ in xprofile. If there’s already data in that field it should echo that on the form as value.
How do I echo the value? What do I need to get the data from the form to the query? How do I make sure the update is made in the records of the logged-in user?
Is there an example anywhere of a basic xprofile update form? Built-in examples in BP all use arrays and loops, they’re not for specific single fields in xprofile. It’s very hard to figure out what’s going on if you’re not a php programmer.