• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Member Card doesn't contain gender, location, age - please help

#1
I just noticed when I upgraded to 1.2.5 that my member card doesn't contain the information it should.

Is there some standard css I'm missing somehow?

Hate to ask a "noob" or obvious question, but that's what you get for hiring developers who don't explain wtf they did.

Any help appreciated.
 

Chris D

XenForo developer
Staff member
#2
Who was the developer?

If you post your member_card template here, we can probably work out what's missing.
 
#4
OK think I figured it out... hopefully this won't have smileys...



Code:
<xen:edithint template="xenforo_overlay.css" />
<xen:require css="member_card.css" />

<div id="memberCard{$user.user_id}" data-overlayClass="memberCard">
    <div class="avatarCropper">
        <a class="avatar NoOverlay Av{$user.user_id}l" href="{xen:link members, $user}">
            <img src="{xen:helper avatar, {$user}, l}" alt="" style="{xen:helper avatarCropCss, $user}" />
        </a>
        <xen:if hascontent="true">
            <div class="modControls" style="position:absolute; bottom:0px; right:0px">
                <xen:contentcheck>
                    <xen:if is="{$canEditUsers}"><a href="{xen:adminlink users/edit, $user}" target="_blank">{xen:phrase edit}</a></xen:if>
                    <xen:if is="{$canCleanSpam}"><a href="{xen:link spam-cleaner, $user}" class="OverlayTrigger">{xen:phrase spam}</a></xen:if>
                    <xen:if is="{$canWarn}"><a href="{xen:link members/warn, $user}">{xen:phrase warn}</a></xen:if>
                    <xen:if is="{$canBanUsers}">
                        <xen:if is="{$user.is_banned}">
                            <a href="{xen:adminlink banning/users/lift, $user}">{xen:phrase lift_ban}</a>
                        <xen:else />
                            <a href="{xen:adminlink banning/users/add, $user}" target="_blank">{xen:phrase ban}</a></xen:if>
                        </xen:if>
                </xen:contentcheck>
            </div>
        </xen:if>
    </div>
   
    <div class="userInfo">
        <h3 class="username"><xen:username user="$user" class="NoOverlay" /></h3>
       
        <div class="userTitleBlurb">
            <h4 class="userTitle">{xen:helper userTitle, $user}</h4>
            <div class="userBlurb">{xen:helper userBlurb, $user, 0}</div>
        </div>
       
        <blockquote class="status">{xen:helper bodytext, $user.status}</blockquote>

        <div class="userLinks">
        <xen:hook name="member_card_links">
            <a href="{xen:link members, $user}">{xen:phrase profile_page}</a>
            <xen:if is="{$visitor.user_id} AND {$user.user_id} != {$visitor.user_id}">
                <xen:if is="{$canStartConversation}"><a href="{xen:link conversations/add, '', 'to={$user.username}'}">{xen:phrase start_conversation}</a></xen:if>
                <xen:follow user="$user" class="Tooltip" />
                <xen:if is="{xen:helper isIgnored, $user.user_id}"><a href="{xen:link members/unignore, $user}" class="FollowLink">{xen:phrase unignore}</a><xen:elseif is="{$canIgnore}" /><a href="{xen:link members/ignore, $user}" class="FollowLink">{xen:phrase ignore}</a></xen:if>
            </xen:if>
        </xen:hook>
        </div>
       
        <dl class="userStats pairsInline">
        <xen:hook name="member_card_stats">
            <dt>{xen:phrase member_since}:</dt> <dd>{xen:date $user.register_date}</dd>
            <!-- slot: pre_messages -->
            <dt>{xen:phrase messages}:</dt> <dd><a href="{xen:link search/member, '', 'user_id={$user.user_id}'}" class="concealed" rel="nofollow">{xen:number $user.message_count}</a></dd>
            <!-- slot: pre_likes -->
            <dt>{xen:phrase likes_received}:</dt> <dd>{xen:number $user.like_count}</dd>
            <!-- slot: pre_trophies -->
            <dt>{xen:phrase trophy_points}:</dt> <dd><a href="{xen:link members/trophies, $user}" class="concealed OverlayTrigger">{xen:number $user.trophy_points}</a></dd>
            <xen:if is="{$canViewWarnings}">
                <dt>{xen:phrase warning_points}:</dt> <dd><a href="{xen:link members, $user}#warnings" class="concealed">{xen:number $user.warning_points}</a></dd>
            </xen:if>
        </xen:hook>
        </dl>
   
        <xen:if is="{$canViewOnlineStatus}">
            <dl class="pairsInline lastActivity">
                <dt>{xen:phrase x_was_last_seen, 'username={$user.username}'}:</dt>
                <dd>
                    <xen:if is="{$user.activity}">
                        <xen:if is="{$user.activity.description}">
                            {$user.activity.description}<xen:if is="{$user.activity.itemTitle}"> <em><a href="{$user.activity.itemUrl}" class="concealed">{$user.activity.itemTitle}</a></em></xen:if>,
                        <xen:else />
                            {xen:phrase viewing_unknown_page},
                        </xen:if>
                        <xen:datetime time="{$user.effective_last_activity}" class="muted" />
                    <xen:else />
                        <xen:datetime time="{$user.effective_last_activity}" />
                    </xen:if>
                </dd>
            </dl>
        </xen:if>
    </div>
   
    <a class="close OverlayCloser"></a>
</div>
 
#5
Actually, on looking at it... it may just be a lack of data input by the user... the customization was to create multiple gender fields using a custom field, which is probably why gender isn't showing. Upon reflection, if someone will just check that this is the appropriate code for a standard installation I can go yell at the developer about the custom field.

Reading through this I don't see where gender comes from..
 
Last edited:

Chris D

XenForo developer
Staff member
#6
That template looks all in order. But if there is stuff missing it could be hidden using CSS. If you're able to share a URL to your site, it would be easier to inspect that.
 
#7
The site is genderedidentity.org/forum

The member_card.css is

Code:
.xenOverlay.memberCard
{
    @property "memberCardBox";
    color: white;
    background: rgba(0, 0, 0, .8);
    padding: 10px;
    border-radius: 10px;
    overflow: hidden;
    max-width: 565px;
    box-shadow: 0 0 15px 0 rgba(0,0,0, 0.8);
    @property "/memberCardBox";
}
   
    .xenOverlay.memberCard .avatarCropper
    {
        float: left;
        border: none;
        padding: 0;
        position: relative;
    }
   
    .xenOverlay.memberCard .avatarCropper .modControls
    {
        display: none;
    }
   
        .xenOverlay.memberCard .avatarCropper:hover .modControls,
        .Touch .xenOverlay.memberCard .avatarCropper .modControls
        {
            display: block;
        }
   
    .xenOverlay.memberCard .avatarCropper .modControls a
    {
        display: block;
        float: left;
        height: auto;
        width: auto;
        overflow: visible;
        position: static;
        background: rgba(0,0,0, 0.5);
        color: white;
        padding: 3px 6px;
        font-size: 11px;
        text-align: center;
        min-width: 32px;
    }
   
        .xenOverlay.memberCard .avatarCropper .modControls a:hover
        {
            background: rgba(0,0,0, 0.75);
            text-decoration: none;
        }

    .xenOverlay.memberCard .userInfo
    {
        margin-left: 205px;
        font-size: 11px;
    }

        .xenOverlay.memberCard .userInfo h3
        {
            @property "memberCardUserName";
            font-size: 18px;
            color: @primaryLighter;
            @property "/memberCardUserName";
        }

            .xenOverlay.memberCard .userInfo h3 a
            {
                color: @memberCardUserName.color;
            }
           
        .xenOverlay.memberCard .userInfo .userTitleBlurb
        {
            margin: 0 0 3px;
        }

            .xenOverlay.memberCard .userInfo h4
            {
                color: @mutedTextColor;
                font-size: 10pt;
            }
           
            .xenOverlay.memberCard .userInfo .userBlurb
            {
                font-size: 11px;
            }

        .xenOverlay.memberCard .userInfo .status
        {
            font-size: 11px;
            font-style: italic;
            margin: 3px 0;
        }
       
            .xenOverlay.memberCard .userInfo .status a
            {
                color: inherit;
            }
       
        .xenOverlay.memberCard .userInfo .userStats
        {
            width: 100%;
        }
       
            .xenOverlay.memberCard .userInfo .userStats dd
            {
                margin-right: 5px;
            }

    .xenOverlay.memberCard .userLinks
    {
        @property "memberCardUserLinks";
        font-weight: bold;
        color: @primaryLighter;
        padding: 2px 0;
        margin: 3px 0;
        border-bottom: 1px solid @dimmedTextColor;
        @property "/memberCardUserLinks";
    }
   
        .xenOverlay.memberCard .userLinks a
        {
            margin-right: 10px;
            color: inherit;
            white-space: nowrap;
        }
       
    .xenOverlay.memberCard .lastActivity
    {
        @property "memberCardLastActivity";
        padding-top: 3px;
        margin-top: 3px;
        border-top: 1px solid @dimmedTextColor;
        @property "/memberCardLastActivity";
    }

<xen:if is="@enableResponsive">
@media (max-width:@maxResponsiveNarrowWidth)
{
    .Responsive .xenOverlay.memberCard
    {
        max-width: 320px;
    }

    .Responsive .xenOverlay.memberCard .avatarCropper
    {
        float: none;
        margin-left: auto;
        margin-right: auto;
    }

    .Responsive .xenOverlay.memberCard .userInfo
    {
        margin-left: 0;
    }
   
    .Responsive .xenOverlay.memberCard .userInfo h3,
    .Responsive .xenOverlay.memberCard .userInfo .userTitleBlurb,
    .Responsive .xenOverlay.memberCard .userInfo .status
    {
        text-align: center;
    }
}
</xen:if>
 
Last edited:

Chris D

XenForo developer
Staff member
#8
Yeah everything appears to be ok.

As you already mentioned, the information will only display if that information has been entered.
 
#14
Nope... there's no addon that can do this... we had to pay someone to come in and customize - we couldn't find a plugin creator who was interested for a price we could afford so it's custom user fields combined with remove gender.

Trick is going to be getting the custom gender field to present in the box. I think it's all ok upon reflection, we simply have to change the code for the box to reflect the user of a custom field where gender should be.

We'll be glad to share our template changes with anybody who wants to broaden their gender spectrum... sort of our mission statement in fact.

Basically utilizing our custom field mod you can add as many gender alternatives as you care to.

Oh, and it's a searchable field in our installation - from the user side and from the Admin CP user search panel as well as send emails sorted by genders.

Which 2? I confused... don't confuse a noob...
 
Last edited: