Support Forum
I'm trying to customize what members see when they look at another member's profile. We are a business group and I want to use this for members to see each others phone numbers, for example.
I am using the Theme editor and I found the spProfileShow.php which currently displays the First Name and Last Name, website and bio. I copied the syntax from another line and changed the field name
....
sp_ProfileShowBusinessPhone('', __sp('Business Phone'));
Not only does it not show the business phone, but it stops the display of anything past that line. Where do I find the filed names, or whatever I have wrong above.
thanks!
not really sure what you are trying to to...
sp_ProfileShowBusinessPhone() would be a php function call... did you provide that function to do the display when called? if not, would explain why its stops - you cause an error trying to call a function that does not exist.
I would suggest you take a look at the custom profile fields plugin for sp... It will let you add new profile fields for users to fill in... so you could add a business phone field, a home phone field, etc... and then display it on the profile if you want...
Visit Cruise Talk Central and Mr Papa's World
As mentioned, I am using the Custom Profile Fields plugin but I have two problems.
1. the custom fields show up in the user's own 'Edit Profile' but when I enter a mobile phone, it doesn't stick. I've entered it multiple times now but, after I update and refresh - it disappears.
2. How do I get the custom fields to display where other users can see them?
yes, sorry but its two step process... setting up the custom profile field in the admin only makes it show up on the edit profile form... then you have to make it show up where you want it in your theme...
so now I understand what you were trying to do in the first post... and frankly, not that far off...
however, we couldnt possibly know what you would add so there is a generic routine to call for the custom profile fields and you just pass an argument telling us which one...
please see this post on the 'how to':
https://simple-press.com/suppo.....-1/#p97699
come on back if that's not clear...
Visit Cruise Talk Central and Mr Papa's World
that would be very tricky... but maybe possible... but before going too far, would suggest making sure you have a db backup...
what ever you create in forum - profile - custom profile fields for the slug (its auto generated from the name) will appear in the wp usermeta table... so for example if you created a custom profile field called 'phone number' the slug would be phonenumber... and you would see an entry in the usermeta for each user (when they saved) called phonenumber...
so if you create such a custom profile field and name it appropriately, it 'should' use your existing data... but have never actually tried this, but in theory should work... but thats the reason I say to have a db backup in case something heads south...
so if you already have a usermeta entry from another plugin or something, just name your sp custom profile field appropriately... you can always see what the generated slug is on the sp custom profile admin panel...
make sense?
Visit Cruise Talk Central and Mr Papa's World
Ok, thanks again for all the instruction 🙂 and all the upgrades! I just upgraded to build 7960
I used a plugin 'Import users from CSV' which created many metadata fields. I expected it to work just as you said - if the name was the same, the data would show. For example, I imported first_name and last_name and user_url and user_email and they show up appropriately in the user info. I know that is in the wp_users table and not the wp_usermeta, but I also imported a field called description - I see it in the metadata SQL table and it is showing up nicely as 'bio' in the user's displayed info?? How does description become bio?
One of the meta fields has a simple name of Join Date. In the SQL table (using phpMyAdmin) I can see the meta_key is JoinDate. So I added a custom profile field as Join Date - I checked and see that the slug comes out to joindate. Yet, when I edit a member's profile, the Join Date field is blank.
well as to bio vs description, I have to blame wp there... that really is simply the field on your user profile in the wp admin... they called the meta name description, but on the profile, they call it biographical info... so we just carried that forward to be consistent...
first_name, last_name, user_url and user_email are also wp standard usermeta info... the sp stuff just uses the wp stuff... they are not distinct and no reason to have a duplicate...
are you really sure you have a meta_key of 'Join Date' in your usermeta db?? I dont think the space is allowed... please dont confuse name and slug (or meta_key)... the slug is a db safe manipulation of the plain text name... so for this join date, please look in the db at the usermeta table and see what the meta_key is for it... you want to match the slug on custom profile fields to the meta_key... for example if its join_date, that is doable...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)