Custom User Fields not displaying in messages

LeaderJ

Member
Hello,

I have a custom user field set up that allows people to enter in their Minecraft game username on registration. I have the option "viewable in message user info selected" (http://prntscr.com/16ixw9) as well as "show custom user fields" (http://prntscr.com/16iy65) in the Style Properties > Message Elements. However, the custom user field does not display in the actual message post (http://prntscr.com/16iz4g), only the non-custom user fields do display.

Any suggestions? Thanks.
 
Hello,

I have a custom user field set up that allows people to enter in their Minecraft game username on registration. I have the option "viewable in message user info selected" (http://prntscr.com/16ixw9) as well as "show custom user fields" (http://prntscr.com/16iy65) in the Style Properties > Message Elements. However, the custom user field does not display in the actual message post (http://prntscr.com/16iz4g), only the non-custom user fields do display.

Any suggestions? Thanks.

Custom Theme?
 
Then it could be due to a style customization. Try reverting the message_user_info template. Just a guess.

Maybe the style was made for XF 1.0 before custom user fields existed.

The .XML file for the install contains this
Code:
<property property_name="messageExtraUserInfo" property_type="css"><![CDATA[{"background-color":"@primaryLightest","border-radius":"4px","font-size":"11px","padding-bottom":"4px","padding-left":"6px","padding-right":"6px","padding-top":"4px"}]]></property>
, so I would think it should be working.
 
I can't attach an image to the conversation, but for your ribbons (if you only display one for the group), you can do this
example.webp

This allows you to do an actual image instead of CSS.
 
This was my message_user_info before I reverted it and my current EXTRA.css:

message_user_info
Code:
<xen:require css="message_user_info.css" />
 
<div class="messageUserInfo" itemscope="itemscope" itemtype="http://data-vocabulary.org/Person">   
<div class="messageUserBlock">
    <xen:hook name="message_user_info_avatar" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
        <div class="avatarHolder">
            <xen:avatar user="$user" size="m" />
                     
            <!-- slot: message_user_info_avatar -->
        </div>
    </xen:hook>
<xen:if hascontent="true">
    <ul class="ribbon">
        <xen:contentcheck>
<xen:if is="{xen:helper ismemberof, $user, 15}">
<li class="ribbonVIP">
<div class="left"></div>
<div class="right"></div>
VIP
</li>
</xen:if>
<xen:if is="{xen:helper ismemberof, $user, 16}">
<li class="ribbonPatron">
<div class="left"></div>
<div class="right"></div>
Patron
</li>
</xen:if>
<xen:if is="{xen:helper ismemberof, $user, 17}">
<li class="ribbonElite">
<div class="left"></div>
<div class="right"></div>
Elite
</li>
</xen:if>
<xen:if is="{xen:helper ismemberof, $user, 18}">
<li class="ribbonLegend">
<div class="left"></div>
<div class="right"></div>
Legend
</li>
</xen:if>
<xen:if is="{xen:helper ismemberof, $user, 19}">
<li class="ribbonMaster">
<div class="left"></div>
<div class="right"></div>
Master
</li>
</xen:if>
<xen:if is="{xen:helper ismemberof, $user, 3}">
<li class="ribbonOwner">
<div class="left"></div>
<div class="right"></div>
Owner
</li>
</xen:if>
<xen:if is="{xen:helper ismemberof, $user, 20}">
<li class="ribbonVeteran">
<div class="left"></div>
<div class="right"></div>
Veteran
</li>
</xen:if>
<xen:if is="{xen:helper ismemberof, $user, 21}">
<li class="ribbonExMod">
<div class="left"></div>
<div class="right"></div>
Ex-Mod
</li>
</xen:if>
            <xen:if is="{xen:helper ismemberof, $user, 4}">
                <li class="ribbonMod">
                    <div class="left"></div>
                    <div class="right"></div>
                    Staff / Moderator
                </li>
            </xen:if>
        </xen:contentcheck>
    </ul>
</xen:if>
<center><xen:if is="!{$isQuickReply}">
    <xen:hook name="message_user_info_text" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
        <h3 class="userText">
            <xen:username user="$user" itemprop="name" rich="true" />
            <xen:if hascontent="true"><b><em class="userTitle" itemprop="title"><xen:contentcheck>{xen:helper userTitle, $user}</xen:contentcheck></em></xen:if></b>
            <!-- slot: message_user_info_text -->
        </h3></center>
    </xen:hook>
       
    <xen:if hascontent="true">
        <div class="extraUserInfo">
            <xen:contentcheck>
            <xen:hook name="message_user_info_extra" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
                <xen:if is="@messageShowRegisterDate">
                    <dl class="pairsInline">
                        <dt>{xen:phrase member_since}:</dt>
                        <dd>{xen:date $user.register_date}</dd>
                    </dl>
                </xen:if>
               
                <xen:if is="@messageShowMessageCount">
                    <dl class="pairsInline">
                        <dt>{xen:phrase message_count}:</dt>
                        <dd><a href="{xen:link search/member, '', 'user_id={$user.user_id}'}" class="concealed">{xen:number $user.message_count}</a></dd>
                    </dl>
                </xen:if>
               
                <xen:if is="@messageShowTotalLikes">
                    <dl class="pairsInline">
                        <dt>{xen:phrase likes_received}:</dt>
                        <dd>{xen:number $user.like_count}</dd>
                    </dl>
                </xen:if>
               
                <xen:if is="@messageShowTrophyPoints">
                    <dl class="pairsInline">
                        <dt>{xen:phrase trophy_points}:</dt>
                        <dd><a href="{xen:link 'members/trophies', $user}" class="OverlayTrigger concealed">{xen:number $user.trophy_points}</a></dd>
                    </dl>
                </xen:if>
           
                <xen:if is="@messageShowGender AND {$user.gender}">
                    <dl class="pairsInline">
                        <dt>{xen:phrase gender}:</dt>
                        <dd itemprop="gender"><xen:if is="{$user.gender} == 'male'">{xen:phrase male}<xen:else />{xen:phrase female}</xen:if></dd>
                    </dl>
                </xen:if>
               
                <xen:if is="@messageShowOccupation AND {$user.occupation}">
                    <dl class="pairsInline">
                        <dt>{xen:phrase occupation}:</dt>
                        <dd itemprop="role">{xen:string censor, $user.occupation}</dd>
                    </dl>
                </xen:if>
               
                <xen:if is="@messageShowLocation AND {$user.location}">
                    <dl class="pairsInline">
                        <dt>{xen:phrase location}:</dt>
                        <dd><a href="{xen:link 'misc/location-info', '', 'location={xen:string censor, $user.location}'}" target="_blank" rel="nofollow" itemprop="address" class="concealed">{xen:string censor, $user.location}</a></dd>
                    </dl>
                </xen:if>
           
                <xen:if is="@messageShowHomepage AND {$user.homepage}">
                    <dl class="pairsInline">
                        <dt>{xen:phrase home_page}:</dt>
                        <dd><a href="{xen:string censor, $user.homepage}" rel="nofollow" target="_blank" itemprop="url">{xen:string censor, $user.homepage}</a></dd>
                    </dl>
                </xen:if>
               
                <xen:comment>
                <xen:foreach loop="{$user.identities}" key="$service" value="$account">
                    <dl class="pairsInline">
                        <dt>{$service}</dt>
                        <dd>{$account}</dd>
                    </dl>
                </xen:foreach>
                </xen:comment>
           
            </xen:hook>
            </xen:contentcheck>
        </div>
    </xen:if>
       
</xen:if>
 
    <span class="arrow"><span></span></span>
</div>       
</div>

EXTRA.css
Code:
.ribbon { font-size: 10px; font-weight: bold; margin: -5px -5px -2px; text-align: center; }
.ribbon li
{
    border-radius: 3px;
    border-top-right-radius: 0px;
    border-top-left-radius: 0px;
    box-shadow: 0px 1px 3px rgba(0,0,0, 0.25);
    padding: 1px;
    position: relative;
    margin-bottom: 5px;
}
.ribbon li:last-child { margin-bottom: 0px; }
.ribbon li div { position: absolute; top: -4px; width: 4px; height: 4px; }
.ribbon li .right { border-top-right-radius: 3px; right: -1px; }
.ribbon li .left { border-top-left-radius: 3px; left: -1px; }
 
.ribbonPatron
{
    background: #000;
    border: 1px solid #000;
    color: #F5F;
}
.ribbonPatron div { background-color: #000;  }
 
.ribbonVIP
{
    background: #000;
    border: 1px solid #000;
    color: #55F;
}
.ribbonVIP div { background-color: #000;  }
 
.ribbonMod
{
    background: #000;
    border: 1px solid #000;
    color: #5F5;
}
.ribbonMod div { background-color: #000;  }
 
.ribbonLegend
{
        background: #000;
        border: 1px solid #000;
        color: #FA0;
}
.ribbonLegend div { background-color: #000; }
 
.ribbonElite
{
        background: #000;
        border: 1px solid #000;
        color: #5FF;
}
.ribbonElite div { background-color: #000; }
 
.ribbonMaster
{
        background: #000;
        border: 1px solid #000;
        color: #A0A;
}
.ribbonMaster div { background-color: #000; }
 
.ribbonOwner
{
        background: #000;
        border: 1px solid #000;
        color: #E02D2D;
}
.ribbonOwner div { background-color: #000; }
 
.ribbonExMod
{
        background: #000;
        border: 1px solid #000;
        color: #A3731F;
}
.ribbonExMod div { background-color: #000; }
 
.ribbonVeteran
{
        background: #000;
        border: 1px solid #000;
        color: #FF5;
}
.ribbonVeteran div { background-color: #000; }
 
/* WIKI MENU STUFF */
.wiki-menu
{
  background: #d1e4ee;
  color: #000;
  width: 300px;
  border: 1px solid #2180b7;
}
 
 
.wiki-menu-title
{
  background-color: #469fd3;
  padding: 2px;
  border-bottom: 1px solid #2180b7;
  font: 16pt "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
  color: #FFF;
}
 
.wiki-menu-title a
{
color: #FFF;
}
 
.wiki-menu-items
{
  margin: 0 !important;
  padding: 10px;
  list-style: none;
  list-style-type: none;
}
 
.wiki-menu-items li
{
  list-style: none !important;
  margin: 0 !important;
  padding: 0;
  list-style-type: none !important;
  font: 11pt "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
  color: #146390;
  padding-bottom: 3px;
  border-bottom: 1px solid #dbf1fe;
  margin-bottom: 5px;
  padding-top: 3px;
}
 
.wiki-menu-items li a
{
  color: #146390;
  text-decoration: none;
}
 
.wiki-menu-items li a:hover
{
  color: #338abb;
}
 
.colorCode div
{
    display: inline-block;
    width: 60px;
    text-align: center;
    padding: 5px;
    margin: 3px;
    font-family: Arial, sans-serif;
        color:black;
}
 
And this is my current, unmodified message_user_info:
Code:
<xen:require css="message_user_info.css" />
 
<div class="messageUserInfo" itemscope="itemscope" itemtype="http://data-vocabulary.org/Person">   
<div class="messageUserBlock">
    <xen:hook name="message_user_info_avatar" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
        <div class="avatarHolder">
            <span class="helper"></span>
            <xen:avatar user="$user" size="m" />
            <!-- slot: message_user_info_avatar -->
        </div>
    </xen:hook>
 
<xen:if is="!{$isQuickReply}">
    <xen:hook name="message_user_info_text" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
        <h3 class="userText">
            <xen:username user="$user" itemprop="name" rich="true" />
            <xen:if hascontent="true"><em class="userTitle" itemprop="title"><xen:contentcheck>{xen:helper userTitle, $user}</xen:contentcheck></em></xen:if>
            <!-- slot: message_user_info_text -->
        </h3>
    </xen:hook>
       
    <xen:if hascontent="true">
        <div class="extraUserInfo">
            <xen:contentcheck>
            <xen:hook name="message_user_info_extra" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
                <xen:if is="@messageShowRegisterDate">
                    <dl class="pairsInline">
                        <dt>{xen:phrase member_since}:</dt>
                        <dd>{xen:date $user.register_date}</dd>
                    </dl>
                </xen:if>
               
                <xen:if is="@messageShowMessageCount AND {$user.user_id}">
                    <dl class="pairsInline">
                        <dt>{xen:phrase message_count}:</dt>
                        <dd><a href="{xen:link search/member, '', 'user_id={$user.user_id}'}" class="concealed">{xen:number $user.message_count}</a></dd>
                    </dl>
                </xen:if>
               
                <xen:if is="@messageShowTotalLikes AND {$user.user_id}">
                    <dl class="pairsInline">
                        <dt>{xen:phrase likes_received}:</dt>
                        <dd>{xen:number $user.like_count}</dd>
                    </dl>
                </xen:if>
               
                <xen:if is="@messageShowTrophyPoints AND {$user.user_id}">
                    <dl class="pairsInline">
                        <dt>{xen:phrase trophy_points}:</dt>
                        <dd><a href="{xen:link 'members/trophies', $user}" class="OverlayTrigger concealed">{xen:number $user.trophy_points}</a></dd>
                    </dl>
                </xen:if>
           
                <xen:if is="@messageShowGender AND {$user.gender}">
                    <dl class="pairsInline">
                        <dt>{xen:phrase gender}:</dt>
                        <dd itemprop="gender"><xen:if is="{$user.gender} == 'male'">{xen:phrase male}<xen:else />{xen:phrase female}</xen:if></dd>
                    </dl>
                </xen:if>
               
                <xen:if is="@messageShowOccupation AND {$user.occupation}">
                    <dl class="pairsInline">
                        <dt>{xen:phrase occupation}:</dt>
                        <dd itemprop="role">{xen:string censor, $user.occupation}</dd>
                    </dl>
                </xen:if>
               
                <xen:if is="@messageShowLocation AND {$user.location}">
                    <dl class="pairsInline">
                        <dt>{xen:phrase location}:</dt>
                        <dd><a href="{xen:link 'misc/location-info', '', 'location={xen:string censor, $user.location, '-'}'}" target="_blank" rel="nofollow" itemprop="address" class="concealed">{xen:string censor, $user.location}</a></dd>
                    </dl>
                </xen:if>
           
                <xen:if is="@messageShowHomepage AND {$user.homepage}">
                    <dl class="pairsInline">
                        <dt>{xen:phrase home_page}:</dt>
                        <dd><a href="{xen:string censor, $user.homepage, '-'}" rel="nofollow" target="_blank" itemprop="url">{xen:string censor, $user.homepage}</a></dd>
                    </dl>
                </xen:if>
                           
            </xen:hook>           
            <xen:if is="@messageShowCustomFields AND {$user.customFields}">
            <xen:hook name="message_user_info_custom_fields" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
           
                <xen:foreach loop="$userFieldsInfo" key="$fieldId" value="$fieldInfo">
                    <xen:if is="{$fieldInfo.viewable_message}">
                        <xen:if hascontent="true">
                            <dl class="pairsInline userField_{$fieldId}">
                                <dt>{xen:helper userFieldTitle, $fieldId}:</dt>
                                <dd><xen:contentcheck>{xen:helper userFieldValue, $fieldInfo, $user, {$user.customFields.{$fieldId}}}</xen:contentcheck></dd>
                            </dl>
                        </xen:if>
                    </xen:if>
                </xen:foreach>
               
            </xen:hook>
            </xen:if>
            </xen:contentcheck>
        </div>
    </xen:if>
       
</xen:if>
 
    <span class="arrow"><span></span></span>
</div>
</div>
 
Back
Top Bottom