Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
custom profile fields
Avatar
JINCUI HAO
Member
Free Members
sp_UserOfflineSmall Offline
Jan 3, 2015 - 7:02 am

ok i corrected it to this

'profileAvatarRank');

                                               sp_SectionStart('tagClass=spPlainSection spCenter', '');

                                                        sp_UserAvatar('context=user&link=', $spProfileUser);

                                                        sp_UserForumRank($args='', $spProfileUser->rank);

                                                        sp_UserSpecialRank($args='', $spProfileUser->special_rank);

                        sp_CustomProfileFieldsDisplay(‘Country’, $spPostUser->ID);

                        sp_CustomProfileFieldsDisplay(‘Gender’, $spPostUser->ID);

                                               sp_SectionEnd();

                                     sp_ColumnEnd('', 'profileAvatarRank');

 

                                     # show profile info

                                     sp_ColumnStart('tagClass=spProfileShowInfoSection spRight&width=65%', 'profileInfo');

                                               sp_ProfileShowDisplayName('', __sp('Username'));

                                               sp_ProfileShowFirstName('', __sp('First Name'));

                                               sp_ProfileShowLastName('', __sp('Last Name'));

                                               sp_ProfileShowLocation('', __sp('Location'));

                                               sp_ProfileShowWebsite('', __sp('Website'));

                    sp_CustomProfileFieldsDisplay(‘Orientation’, $spProfileUser->ID);

                    sp_CustomProfileFieldsDisplay(‘Lookingfor’, $spProfileUser->ID);

                    sp_CustomProfileFieldsDisplay(‘Preference’, $spProfileUser->ID);

                                               sp_ProfileShowBio('', __sp('Bio'));

                                     sp_ColumnEnd('', 'profileInfo');

                            sp_SectionEnd('tagClass=spClear', 'profileBasic');

 

                            # output section for detailed user info

                            sp_SectionStart('tagClass=spProfileShowDetailsSection', 'profileDetails');

                                     # show user identities

                                     sp_ColumnStart('tagClass=spProfileShowIdentitiesSection spLeft&width=45%',

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 3, 2015 - 7:10 am

and has that done the trick?

andy-signature.png
YELLOW
SWORDFISH
Avatar
JINCUI HAO
Member
Free Members
sp_UserOfflineSmall Offline
Jan 3, 2015 - 8:00 am

nope they dont display ??

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jan 3, 2015 - 11:43 am

the country and gender ones should be using $spProfileUser->ID and not $spPostUser...

could you please upload an image of your forum - profile - custom profile fields admin panel?

Avatar
JINCUI HAO
Member
Free Members
sp_UserOfflineSmall Offline
Jan 3, 2015 - 1:42 pm

There written like that so they appear under the avatar and forum rank on posts as directed here :

An  example of showing a custom field for a user under his avatar would be

1
sp_CustomProfileFieldsDisplay(

$name,$spPostUser->ID);

 

 

The others follow this example so they appear on the profile page only

To show the Custom profile display of a user in their profile pages you could use.

1
sp_CustomProfileFieldsDisplay(

$name$spProfileUser->ID);

,

 

 

084.jpgImage Enlarger

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jan 3, 2015 - 2:22 pm

think we need to take a step back... it appears you are taking multiple examples and applying it to a single case...  showing up under a user is a different template file... the one you are editing is for profiles only...

so lets go one by one... where do you want the country to appear??  under a user avatar when viewing a topic (ie list of posts)?  if so, you need to edit the spTopicView.php template file in the theme...  so edit that file, and find this line:

                                    sp_UserAvatar('tagClass=spPostUserAvatar spCenter&context=user', $spThisPostUser);

underneath it add:

sp_CustomProfileFieldsDisplay(‘Country’, $spThisPostUser->ID);

lets get this one working, then take them one by one...

remember, we strongly recommend you have your own custom theme or child theme vice editing our delivered themes to keep from losing changes on updates...

Avatar
JINCUI HAO
Member
Free Members
sp_UserOfflineSmall Offline
Jan 3, 2015 - 2:33 pm

OMG I hate coding sadme-710x453.jpgImage Enlarger

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jan 3, 2015 - 2:33 pm

;) understand...

did this first one work?

Avatar
JINCUI HAO
Member
Free Members
sp_UserOfflineSmall Offline
Jan 3, 2015 - 5:29 pm

Nope didn't work 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jan 3, 2015 - 5:59 pm

and you were looking at a topic?  and the user had actually entered something for their country?  if nothing entered for the user, you wont see anything...

sp_CustomProfileFieldsDisplay('Country', $spThisPostUser->ID)

just tested and works fine for me...  see image

profile.pngImage Enlarger

be sure to copy the code if using mine so you get correct quotes...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625