Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
The Label with the Data in View Profile not Straight
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 12, 2015 - 11:36 am

Which template tag did you use and can you show me your source code here?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Ruben Kalitzki
Member
Free Members
sp_UserOfflineSmall Offline
Feb 12, 2015 - 11:55 am

I'm still use default theme and this is my code in spProfileShow.php

if ( ! empty( $spProfileUser->gender ) ){
echo '<div class="spColumnSection spProfileLeftCol">';
echo '<p class="spProfileLabel">Gender:</p>';
echo '</div>';
echo '<div class="spColumnSection spProfileSpacerCol"></div>';
echo '<div class="spColumnSection spProfileRightCol">';
echo '<p class="spProfileLabel">';
sp_CustomProfileFieldsDisplay('Gender', $spProfileUser->ID);
echo '</p>';
echo '</p></div>';
}
if ( ! empty( $spProfileUser->city ) ){
echo '<div class="spColumnSection spProfileLeftCol">';
echo '<p class="spProfileLabel">City:</p>';
echo '</div>';
echo '<div class="spColumnSection spProfileSpacerCol"></div>';
echo '<div class="spColumnSection spProfileRightCol">';
echo '<p class="spProfileLabel">';
sp_CustomProfileFieldsDisplay('City', $spProfileUser->ID);
echo '</p>';
echo '</p></div>';
}
if ( ! empty( $spProfileUser->steam ) ){
echo '<div class="spColumnSection spProfileLeftCol">';
echo '<p class="spProfileLabel">Steam:</p>';
echo '</div>';
echo '<div class="spColumnSection spProfileSpacerCol"></div>';
echo '<div class="spColumnSection spProfileRightCol">';
echo '<p class="spProfileLabel">';
sp_CustomProfileFieldsDisplay('Steam', $spProfileUser->ID);
echo '</p>';
echo '</p></div>';
}

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 12, 2015 - 12:30 pm

Well - the update to the custom field plugin made things a lot easier in that you can now do all of that in three lines of code and correct the alignment at the same time! Like this:

sp_CustomProfileFieldsProfileDisplay('gender', $spProfileUser->ID, 'Gender');

where the first parameter is the CF name. the second the user ID and the third the label.

Just repeat this for your city and steam entries.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Ruben Kalitzki
Member
Free Members
sp_UserOfflineSmall Offline
Feb 12, 2015 - 1:33 pm

Many thanks for your respond again and I already try your code but the data can't appear and after I check with detail, the CF name should be changed like the below:

sp_CustomProfileFieldsProfileDisplay('Gender', $spProfileUser->ID, 'Gender');

But, the are small issue again. My data that has http:// can't click-able again like hyperlink. Do you know what should I do again?

 

Thanks for your respond again.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 12, 2015 - 2:37 pm

Whoops! Glad you managed to put that right!

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 12, 2015 - 10:06 pm

see your other topic for answer to the hyperlink question...

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: 17363
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625