Getting Custom Userfields to show in Members area:

CritiKiL

Active member
I would like for this code to show under a members name 'if the custom userfield is filled out:

Code:
<table><tr><td>
<xen:if is="{$user.customFields.psnlive}"><a href="http://us.playstation.com/playstation/psn/visit/profiles/{$user.customFields.psnlive}" target="_new"><img src="/community/game_images/psnlive.png" width="25px" height="25px" /></a>
</xen:if></td><td>
<xen:if is="{$user.customFields.xboxlive}"><a href="http://live.xbox.com/en-US/Profile?Gamertag={$user.customFields.xboxlive}" target="_new"/><img src="/community/game_images/xboxlive.png" width="25px" height="25px"></a>
</xen:if></td><td>
<xen:if is="{$user.customFields.pclive}"><a href="http://steamcommunity.com/id/{$user.customFields.pclive}" target="_new"/><img src="/community/game_images/pclive.png" width="25px" height="25px"></a>
</xen:if>
</td></tr></table>
It works under a members name in the message_user_info template but it won't work in the Registered Members / XenStaff areas under a members name. Can someone show me how to fix this code so that it works?

It it setup so that if one of 3 custom userfields are filled, an icon will display to show info has been filled out in that field. Here is how it looks in the message_user_info area (the PSN, XBL and PC icon circles):

membersconsoles1.webp

And this is where I want it to also show (under the members name):

membersconsoles.webp
 
You are still using {$user.customFields.pclive}. You need to use {$message.customFields.pclive}. The same goes for the other fields.
UPDATE: Jake, when we change from $user.customFields.pclive to $message.customFields.pclive, it does not carry the value entered initially in the custom users field in their profile. So when a person clicks on that icon the value is not what they put in their custom users field but is just blank. And if I DO use $user.customFields.pclive, then the icons do not show at all under the signature. Any ideas?

signatureicons.webp
 
$message is the author of the post. $visitor is the current logged in user. Maybe you mean to use $visitor?
No, it's supposed to work for the author of the post (either $user or $message), but the $message doesn't return that authors custom user field value ;-(. In the other places (messsage_user_info template & in the member list area), the $user____ works fine...
 
I was able to place {$message.customFields.psn} in the signature area of my sites and returned the custom field correctly. Perhaps there is conflicting code somewhere? Do you mind posting the entire template, again, with the $message changes?
 
My apologies Jake. I messed up again and everything works now. I only had changed the 'first instance of the {$message.customField.pclive} and second one was still {$user.customField.pclive} - lol It should be like this and I have it as such now:
Code:
<table><tr><td>
<xen:if is="{$message.customFields.psnlive}"><a href="http://us.playstation.com/playstation/psn/visit/profiles/{$message.customFields.psnlive}" target="_new"><img src="/community/game_images/psnlive.png" width="25px" height="25px" /></a>
</xen:if></td><td>
<xen:if is="{$message.customFields.xboxlive}"><a href="http://live.xbox.com/en-US/Profile?Gamertag={$message.customFields.xboxlive}" target="_new"/><img src="/community/game_images/xboxlive.png" width="25px" height="25px"></a>
</xen:if></td><td>
<xen:if is="{$message.customFields.pclive}"><a href="http://steamcommunity.com/id/{$message.customFields.pclive}" target="_new"/><img src="/community/game_images/pclive.png" width="25px" height="25px"></a>
</xen:if>
</td></tr></table>
 
Hi, I'm back one last time regarding this! I would like to have these show in the 'membercard' area, so that when a person views a persons membercard they can see these? I would want them to show just above the 'mood' image?

membercard.webp
 
Top Bottom