First it would be nice to know what version of bp you are using. The latest trunk has lots of template functions and a new template class for the xprofile component.
Frankly the profile component is complicated in that it uses three tables to organize and get access to profile field data. Fields are accessed first by field group then field id then field value.
I don’t think that anyone is going to waste time on a detailed tutorial for RC1 code. Look at the following files and you’ll get an initial idea of how to access the profile fields.
/bp-xprofile/bp-xprofile-templatetags.php
/bp-xprofile/bp-xprofile-classes.php
With the template tags file being the most useful probably and the classes showing you how things are organized.
Alright I am not the greatest when it comes to PHP/MySQL in general. I am trying to make my own Search page that will let you search for multiple profile fields at the same time via a form. However, I can’t wrap my head around how to do this in the current setup. What is confusing me is that all of the extra profile values are in the same column (called “values”) but they are separated by rows differentiated by “field_id”.
So, I am trying to do a query like:
SELECT * FROM wp_bp_xprofile_data WHERE value LIKE ‘%–MY SEARCH PARAMS–%’
Problem is, the search parameters are all in the same column, “value” but all in different rows? So how do you select from the same column, but from different rows? How do you overcome this problem? I am totally confused and could use some general guidance!
I’m not quite sure what you are asking…judging by your thread title you’ll need this function:
bp_core_get_username( $uid )
and then you can just call the profile fields accordingly…
Hello,
I would like to know what tags to call up in a template to be able to display the profile fields for a particular user, such as the administrator. Does anyone have any suggestions for what to use?
Hi,
In my profile fields, I have the following:
Permanent Address
Permanent Street
Permanent Country
Correspondance Address
Correspondance Street
Correspondance Country
I want to replace the ‘
‘ by a checkbox which, when clicked will copy the data from the top three fields to the corresponding bottom fields. How can I do that?
Hi,
While creating a ‘Country’ field in profile, I used the pre-defined field. It worked great on my local setup. However, when I created a ‘Country’ profile field on the server, it shows empty list. I checked the profile field creation page and no data appears there too.
I checked out the file that is used to populate the country fields. However things aren’t working very well.
How can I fix this?
Vito687-
I can not change or create avatars
I assume you mean that you cannot create avatars at all. If that is the case, then you cannot even get the chance to change your avatar. Is this correct?
The error you mentioned in your OP is found in only two places in BP:
- bp_core_avatar.php –> in the function bp_core_avatar_admin
- bp_xprofile_signup.php –> in the function xprofile_validate_signup_fields
So, either you do not have sufficient permissions in the folder where the avatar is first uploaded, or you’re uploading an avatar that is too big. I will guess that it is the first problem based on the error message.
But, let’s be thorough.
You mentioned that you’re running a very recent BP trunk version and WPMU 2.7.1_beta from branch. We’ll assume that everything is correct with your upgrade and that you’ve also read the thread Lance mentioned and tried any applicable suggestions.
Here, then, are some additional or follow-up questions:
- What is the size of the avatar you’re trying to upload?
- What is the avatar’s format?
- Are you using the standard buddypress-member theme or a customized theme?
- What version of GD is installed?
- What version of PHP are you using?
- Have you checked all the folders in blog.dir and made sure that there are indeed no files?
- Have you checked the permissions of each of the subfolders in blog.dir?
Here is what I would do… And what I do mostly on all of my BuddyPress installations…
In your BuddyPress->General Settings, make the “Full Name field name” be called “Display Name” or in your case “First Name/Last Initial”
That way, people know right away what you want shown there. You won’t need to baby sit them because it says right there what you want entered. Most people will follow suit, and the ones that don’t, what’s the diff?
(Notice I use my middle name here on bp.org?) 
Then, create extra fields for First Name and Last Name, for yourself to use. Make them visible if you’d like, or whatever.
This way you’re not trying to create a crazy filter to micro manage anything.
2448027Inactive
got it working it was my stupid php… so what exactly does this do ? when you post a blog on wpmu does it post it on fb as well?? and vice versa ?
also isnt there anyway to take out users profile info … and put em into there buddypress if they have the same fields..?
I’m sure you can but I haven’t looked at xprofile_fields just yet. A bunch of other problems to solve. Burt Adsit might be able to help
It\’s not found in a form. It is located in the wp_bp_xprofile_fields table as a piece of data.
The function xprofile_add_signup_fields in the file bp-xprofile-signup.php extracts it from that table.
I need a filter that will only show the first letter of the users last name
r-1324 Trunk pulls in xprofile fields by field value and field type
while
RC1 pulls in xprofile by field_id field-type and field_value
with field_id i can filter the results:
only show if admin,
if this, do this
etc
how is this possible now that trunk has changed?
Why don’t you just add two additional profile fields (last name & first name) , make them required so they show up on registration and then write a custom function to tweak the sign up email?
Yes, that’s what I want to do. But how would that work?
I’d already tried editing wpmu-functions.php, replace ‘Dear User’ with ‘Dear DISPLAYNAME’ and then add this line:
\’$welcome_email = str_replace( “DISPLAYNAME”, $user->display_name, $welcome_email );\’
But the display_name field in wp_users has the username, not the full name. Full name and other profile fields are in wp_bp_xprofile_fields + wp_bp_xprofile_data. I have no clue how to get them from there.
Is it possible to write a function to retrieve full name (or first + last) from wp_bp_xprofile_data and put the result in the email? How does that work? Can you point me to a code example that shows the basic principles?
Why don’t you just add two additional profile fields (last name & first name) , make them required so they show up on registration and then write a custom function to tweak the sign up email?
btw, this is standard across a lot of social media sites. Look at Facebook – aside from the fact that they login with email instead of username, they also have display name, first and last….just like BP can have. Make FullName your Display name.
if i’m not wrong, the Full Name has a filter, if you use it, you could replace it with the wp built-in name & last name, or use xprofile fields fot that,
it depends on your php & wp skills
I assume you’re specifically talking about customizing a BuddyPress template. If so, then you need to look in the BuddyPress profiles tables in MySQL.
For instance, the field definition for the “Full Name” field is stored in the wp_bp_xprofile_fields table and any corresponding datum is stored in the wp_bp_xprofile_data table.
With respect to this:
At the moment Buddypress/WP MU makes it very hard, perhaps impossible, to flexibly use member’s real names or other data (companyname, city) in the site or have something like ‘Hello John’ in email notifications.
That is not true. Any piece of stored data can be accessed and spit out in any number of ways. It just must first be in the database. Look in the bp-xprofile.php file and the bp-xprofile subdirectory for a number of functions that can be called to extract a user’s data.
By the way, I did see your other post about this topic and it was answered appropriately. With the default WPMU and BuddyPress setup, you will not be able to use a user’s full name until they’ve entered that data. They will not be able to enter their full name until after they register.
So, unless you hack the wp-signup.php or register.php files, and require that a full name be provided when registering, you will not be able to send them a welcome email with their full name since that piece of data does not yet exist.
All of what you are asking is possible but requires either a pre-existing plugin, a custom hack, or your ability in customizing and coding a BuddyPress template.
If I add fields to the wp_users table in the database, how can I add those fields to the registration form?
I know Buddypress has a way to add profile fields, but they get stored in weird places. I want one table with all the basic members data -> full name, company, city, URL, etc.
2393723Inactive
I am trying to set it up so that a blog has a profile as well. It would essentially only need to be a page (the home) on the blog that has a way to edit the custom fields. Though I am looking for a good way to do this.
The features I would like is to be able to upload a photo, and plain text as well as some option select fields.
Does anyone have an idea for the best way to implement this?
This is in the pipeline to come in future releases of BuddyPress (after v1.0).
Please, I’m sure it’s not so complicated to do 
For example, make an UP arrow and DOWN arrow in a column next to the label name, to let us re-order the fields because I’m tired of deleting 12 fields just because I’m asking to put another *last* field on top of them …
Thank you
and bravo for this fantastic plugin !
somewhat of a similar issue:
xprofile fields are filled in, but don’t show on the profile,
changes made to certain fields don’t “save” or “show” on the profile
using trunk from a couple of weeks ago… and haven’t kept vary god track of the trunks
proly a few new ones since…. but my install gets more and more customized as time goes..
these updates, are they only to bp-xprofile files? or would i want to get the whole trunk?
danke
2336115Inactive
It looks like some big changes happened to trunk over the weekend. After the update, I am unable to add new fields in the Profile setup page. I get the following error from bp-xprofile.php&group_id=1&mode=add_field:
Fatal error: Cannot redeclare xprofile_install() (previously declared in /Path/to/Wordpress/MU/wp-plugins/buddypress/bp-xprofile.php:32) in /Path/to/Wordpress/MU/wp-plugins/buddypress/bp-xprofile.php on line 99
You can see a picture of the admin page here: http://img.skitch.com/20090406-8nuimsryymim2k3w5156u6ss11.png
I’ve tried it on MU 2.7 and MU trunk, with the same error. I also tried it with all components on (same error) and only the profile component enabled (same error).
Thanks!
Hello,
I’d appreciate if someone could do following two very useful plugins –
1. [add more record] option in profile fields.
I’d like to give my users ability to add more number of similar type of records. For example, for my alumni website, I wish to create ‘Job history’. The user will enter following information:
Company:
Designation:
Duration – From: <date> Till: <date>
[Add More]
When the user clicks on ‘add more’ button, I’d like above information to be accumulated in a table and more empty fields (same as above) should appear.
2. Another plugin that will let me duplicate data to the fields upon click of a checkbox
This plugin will be useful when I’m adding “Permanent Address” & “Correspondance Address” to my profile field. User will fill in ‘Permanent Address” and if the correspondance address is same as the permanent address, the user will have an option to check a checkbox that says “same as above”.
Can anyone do this please? I’ll be thankful!
Is it still possible to rearrange via phpmyadmin, editing the filed IDs?