Support Forum

The Label with the Data in View Profile not Straight

RK Ruben Kalitzki
Ruben Kalitzki
Member

Hi there, I have add some fields from custom fields profile and already add some code to display the data on View Profile. The layout for the first label with the data is not problem but for the second to the last label with the data is like not straight.

As additional, I add the code into spProfileShow.php

This is the screenshot and it’s the source

Many thanks for your respond.

15 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

I think as with the other question – when you tell me which SP theme this is I can try and replicate as a first step in the diagnosis.

RK Ruben Kalitzki
Ruben Kalitzki
Member

I’m still using Default 1.2.12 theme and still not update it because there are some change in our old themes. I just worry should re-code again after I update the themes.

Should I upgrade the themes too? Is it effect to our old code?

IK Ike
Ike
Member

I don’t think there is anything in the Theme and Templates 5.5.4 update which might cause this but as a matter of course it’s always worth keeping up to date as the knock on effect on custom themes can be unpredictable.

When making a custom theme however – if you haven’t already done so – your custom theme should be a child theme. If you have a decent editor, it shouldn’t be too hard to pick the changes you have made to Default and paste them into a child theme stylesheet, then just copy over the templates you’ve changed to your child themes templates folder. This way you can update Default in the normal way to get the latest theme changes and you won’t need to add updated code manually.

If you have already made a child theme, you don’t need to worry about losing changes and can keep up to date.

YS Yellow Swordfish
Yellow Swordfish
Member

This is actually a bit of a mess. It is caused by a  combination of us, perhaps not offering enough choice, and the insane and annoying habit of WordPress wanting to put paragraph tags around anything that moves!

The fix is not going to be instant but I will see if I can get something in place later today and get it tested so we can release an update to the custom fields plugin ASAP.

I will let you know how I get on.

RK Ruben Kalitzki
Ruben Kalitzki
Member

Many thanks for your help to try solve this issue. I’ll waiting your next respond.

YS Yellow Swordfish
Yellow Swordfish
Member

OK – I have constructed a new template function that will do all the work of creating the divs etc., This is now in testing and I will try and make sure the new version of the plugin gets released quickly and then I can tell you what you need to do.

RK Ruben Kalitzki
Ruben Kalitzki
Member

It’s sound good. I’ll waiting for your new version of the plugin.

Many thanks for your help too.

MP Mr Papa
Mr Papa
Member

maybe this weekend we can get it updated… have go through our release process…

RK Ruben Kalitzki
Ruben Kalitzki
Member

Hi, I already update the Custom Profile Fields, but the layout for the label with the data is still like not straight like before. Should I add some code again or what should I do?

Many thanks for your respond.

YS Yellow Swordfish
Yellow Swordfish
Member

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

RK Ruben Kalitzki
Ruben Kalitzki
Member

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>’;
}

YS Yellow Swordfish
Yellow Swordfish
Member

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.

RK Ruben Kalitzki
Ruben Kalitzki
Member

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.

YS Yellow Swordfish
Yellow Swordfish
Member

Whoops! Glad you managed to put that right!