1. REGISTRATION REQUIREMENTS:

    Register with your xenforo.com Username then start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Showcase count on post bit Help?

Discussion in 'Showcase Support' started by Joeychgo, Apr 12, 2016.

  1. Joeychgo

    Joeychgo Member AMS Premium SC Premium UBS Premium

    Grrr --- its not working for me. Ive tried to insert at several points and nothing will come up.

    Here is my template. Ideally, I would like it centered and above "Messages"

    Code:
    <xen:require css="message_user_info.css" />
    
    <div class="messageUserInfo" itemscope="itemscope" itemtype="http://data-vocabulary.org/Person">   
    <div class="messageUserBlock {xen:if $user.isOnline, online}">
        <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" img="true" />
                <xen:if is="{$user.isOnline}"><span class="Tooltip onlineMarker" title="{xen:phrase online_now}" data-offsetX="-22" data-offsetY="-8"></span></xen:if>
                <!-- 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, 1, 1}</xen:contentcheck></em></xen:if>
                {xen:helper userBanner, $user, 'wrapped'}
                <!-- 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 AND {$user.user_id}">
                        <dl class="pairsJustified">
                            <dt>{xen:phrase joined}:</dt>
                            <dd>{xen:date $user.register_date}</dd>
                        </dl>
                    </xen:if>
    
                   
                    <xen:if is="@messageShowMessageCount AND {$user.user_id}">
                        <dl class="pairsJustified">
                            <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>
                        </dl>
                    </xen:if>
                   
                    <xen:if is="@messageShowTotalLikes AND {$user.user_id}">
                        <dl class="pairsJustified">
                            <dt>{xen:phrase likes_received}:</dt>
                            <dd>{xen:number $user.like_count}</dd>
                        </dl>
                    </xen:if>
                   
                    <xen:if is="@messageShowTrophyPoints AND {$user.user_id} AND {$xenOptions.enableTrophies}">
                        <dl class="pairsJustified">
                            <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="pairsJustified">
                            <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="pairsJustified">
                            <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="pairsJustified">
                            <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="pairsJustified">
                            <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} AND ({$fieldInfo.display_group} != 'contact' OR {$user.allow_view_identities} == 'everyone' OR ({$user.allow_view_identities} == 'members' AND {$visitor.user_id}))">
                            <xen:if hascontent="true">
                                <dl class="pairsJustified 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>
     
  2. Bob

    Bob Developer Staff Member

    Make sure you are editing the CORRECT STYLE. I've see so many people edit the default style and then view their custom style and wonder why the edit doesn't work.

    Selection_241.png

    code included below..

    HTML:
    <xen:require css="message_user_info.css" />
    
    <div class="messageUserInfo" itemscope="itemscope" itemtype="http://data-vocabulary.org/Person">   
    <div class="messageUserBlock {xen:if $user.isOnline, online}">
        <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" img="true" />
                <xen:if is="{$user.isOnline}"><span class="Tooltip onlineMarker" title="{xen:phrase online_now}" data-offsetX="-22" data-offsetY="-8"></span></xen:if>
                <!-- 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, 1, 1}</xen:contentcheck></em></xen:if>
                {xen:helper userBanner, $user, 'wrapped'}
                <!-- 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 AND {$user.user_id}">
                        <dl class="pairsJustified">
                            <dt>{xen:phrase joined}:</dt>
                            <dd>{xen:date $user.register_date}</dd>
                        </dl>
                    </xen:if>
    
                    <xen:if is="{$user.showcase_count}">
                        <dl class="pairsJustified">
                            <dt><a href="{xen:link 'showcase/member', $user}">View My Showcase</a></dt>
                            <dd></dd>
                        </dl>
                    </xen:if>
                   
                    <xen:if is="@messageShowMessageCount AND {$user.user_id}">
                        <dl class="pairsJustified">
                            <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>
                        </dl>
                    </xen:if>
                   
                    <xen:if is="@messageShowTotalLikes AND {$user.user_id}">
                        <dl class="pairsJustified">
                            <dt>{xen:phrase likes_received}:</dt>
                            <dd>{xen:number $user.like_count}</dd>
                        </dl>
                    </xen:if>
                   
                    <xen:if is="@messageShowTrophyPoints AND {$user.user_id} AND {$xenOptions.enableTrophies}">
                        <dl class="pairsJustified">
                            <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="pairsJustified">
                            <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="pairsJustified">
                            <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="pairsJustified">
                            <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="pairsJustified">
                            <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} AND ({$fieldInfo.display_group} != 'contact' OR {$user.allow_view_identities} == 'everyone' OR ({$user.allow_view_identities} == 'members' AND {$visitor.user_id}))">
                            <xen:if hascontent="true">
                                <dl class="pairsJustified 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>
     
  3. Joeychgo

    Joeychgo Member AMS Premium SC Premium UBS Premium

    ok, I'm an idiot. :)
     
  4. Bob

    Bob Developer Staff Member

    lol... no worries... is it all working (and the way you want it) now?
     
  5. Joeychgo

    Joeychgo Member AMS Premium SC Premium UBS Premium

    Nope.... Did I do it right?


    Code:
    <xen:require css="message_user_info.css" />
    
    <div class="messageUserInfo" itemscope="itemscope" itemtype="http://data-vocabulary.org/Person">   
    <div class="messageUserBlock {xen:if $user.isOnline, online} {xen:if @xb_animated_online, 'xbOnlineAnimated', 'xbOnlineRegular'}">
        <xen:hook name="message_user_info_avatar" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
            <div class="avatarHolder">
                <span class="helper"><span></span></span>
                <xen:if is="in_array(@xb_message_layout, array(2, 3))">
                <xen:avatar user="$user" size="m" img="true" />
                <xen:else />
                <xen:avatar user="$user" size="@xb_avatarSize" img="true" />
                </xen:if>
                <xen:if is="{$user.isOnline}"><span class="Tooltip onlineMarker" title="{xen:phrase online_now}" data-offsetX="-10" data-offsetY="-8"></span></xen:if>
                <!-- 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, 1, 1}</xen:contentcheck></em></xen:if>
                {xen:helper userBanner, $user, 'wrapped'}
                <!-- slot: message_user_info_text -->
            </h3>
        </xen:hook>
           
        <xen:if hascontent="true">
            <div class="extraUserInfo{xen:if @xb_famessageuser_boxed, ' xbBoxedFA'}">
                <xen:contentcheck>
                <xen:hook name="message_user_info_extra" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">   
                <xen:if hascontent="true">
                    <div class="xbMainUserInfo">   
                    <xen:contentcheck>
                   
                    <xen:if is="@messageShowMessageCount AND {$user.user_id}">
                        <dl class="pairsJustified xbMessages">
                            <dt><xen:if is="@xb_fa_messageUserInfo"><i class="fa fa-comments fa-fw Tooltip" title="{xen:phrase messages}" data-offsetX="-6" data-offsetY="0"></i><xen:else />{xen:phrase messages}:</xen:if></dt>
                            <dd><a href="{xen:link search/member, '', 'user_id={$user.user_id}'}" class="concealed" rel="nofollow">{xen:number $user.message_count}</a></dd>
                        </dl>
                    </xen:if>
                    <xen:if is="@messageShowTotalLikes AND {$user.user_id}">
                        <dl class="pairsJustified xbLikes">
                            <dt><xen:if is="@xb_fa_messageUserInfo"><i class="fa fa-thumbs-up fa-fw Tooltip" title="{xen:phrase likes_received}" data-offsetX="-6" data-offsetY="0"></i><xen:else />{xen:phrase likes_received}:</xen:if></dt>
                            <dd>{xen:number $user.like_count}</dd>
                        </dl>
                    </xen:if>
                   
                    <xen:if is="@messageShowTrophyPoints AND {$user.user_id} AND {$xenOptions.enableTrophies}">
                        <dl class="pairsJustified xbTrophyPoints">
                            <dt><xen:if is="@xb_fa_messageUserInfo"><i class="fa fa-trophy fa-fw Tooltip" title="{xen:phrase trophy_points}" data-offsetX="-6" data-offsetY="0"></i><xen:else />{xen:phrase trophy_points}:</xen:if></dt>
                            <dd><a href="{xen:link 'members/trophies', $user}" class="OverlayTrigger concealed">{xen:number $user.trophy_points}</a></dd>
                        </dl>
                    </xen:if>
                    </xen:contentcheck>
                   
                    </div>
                    </xen:if>
               
                    <xen:if is="@messageShowRegisterDate AND {$user.user_id}">
                        <dl class="pairsJustified xbJoinDate">
                            <dt><xen:if is="@xb_fa_messageUserInfo"><i class="fa fa-calendar fa-fw Tooltip" title="{xen:phrase joined}" data-offsetX="-6" data-offsetY="0"></i><xen:else />{xen:phrase joined}:</xen:if></dt>
                            <dd>{xen:date $user.register_date}</dd>
                        </dl>
                    </xen:if>
               
                    <xen:if is="{$user.showcase_count}">
                        <dl class="pairsJustified">
                            <dt><a href="{xen:link 'showcase/member', $user}">View My Showcase</a></dt>
                            <dd></dd>
                        </dl>
                    </xen:if>
               
               
                    <xen:if is="@messageShowGender AND {$user.gender}">
                        <dl class="pairsJustified xbGender">
                            <dt><xen:if is="@xb_fa_messageUserInfo"><i class="fa fa-user fa-fw Tooltip" title="{xen:phrase gender}" data-offsetX="-6" data-offsetY="0"></i><xen:else />{xen:phrase gender}:</xen:if></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="pairsJustified xbOccupation">
                            <dt><xen:if is="@xb_fa_messageUserInfo"><i class="fa fa-university fa-fw Tooltip" title="{xen:phrase occupation}" data-offsetX="-6" data-offsetY="0"></i><xen:else />{xen:phrase occupation}:</xen:if></dt>
                            <dd itemprop="role">{xen:string censor, $user.occupation}</dd>
                        </dl>
                    </xen:if>
                   
                    <xen:if is="@messageShowLocation AND {$user.location}">
                        <dl class="pairsJustified xbLocation">
                            <dt><xen:if is="@xb_fa_messageUserInfo"><i class="fa fa-map-marker fa-fw Tooltip" title="{xen:phrase location}" data-offsetX="-6" data-offsetY="0"></i><xen:else />{xen:phrase location}:</xen:if></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="pairsJustified xbHomepage">
                            <dt><xen:if is="@xb_fa_messageUserInfo"><i class="fa fa-globe fa-fw Tooltip" title="{xen:phrase home_page}" data-offsetX="-6" data-offsetY="0"></i><xen:else />{xen:phrase home_page}:</xen:if></dt>
                            <dd><a href="{xen:string censor, $user.homepage, '-'}" rel="nofollow" target="_blank" itemprop="url">{xen:phrase visit_site}</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} AND ({$fieldInfo.display_group} != 'contact' OR {$user.allow_view_identities} == 'everyone' OR ({$user.allow_view_identities} == 'members' AND {$visitor.user_id}))">
                            <xen:if hascontent="true">
                                <dl class="pairsJustified userField_{$fieldId} xbCustomField">
                                    <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>
     
  6. Bob

    Bob Developer Staff Member

    Looks fine to me... I've added it HERE (look at my post bit).
     
  7. Joeychgo

    Joeychgo Member AMS Premium SC Premium UBS Premium

    Ok, here is what I did.

    I added the word TEST to the template and got this

    Untitled.jpg

    When I replace the word test with the code --- nothing shows.

    This is on a user who I know has a showcase.
     
  8. Bob

    Bob Developer Staff Member

    It will only display for Users that have at least 1 showcase item, so keep that in mind. As you can see right here, I have the link on MY Postbit, but you do not because you don't have any showcase items created here.
     
  9. Bob

    Bob Developer Staff Member

    might need to run the Showcase Rebuilds >> Rebuild User Showcase Counts
     
  10. Joeychgo

    Joeychgo Member AMS Premium SC Premium UBS Premium

  11. Joeychgo

    Joeychgo Member AMS Premium SC Premium UBS Premium

    That fixed it. Thank you...

    Only thing is -- what do I change to center it?
     
  12. Bob

    Bob Developer Staff Member

    You'd need to create your OWN custom html/CSS template code. My example is based on Core XenForo standard code for the Post Bit. You'd need to keep the Conditional, but replace use of the dl, dt and dd (probably with a div and its own class like below). Then you'd have to create classes in Extra.css to control the output behavior of the div and its content.

    HTML:
                    <xen:if is="{$user.showcase_count}">
                        <div class="myCustomClass">
                            <a href="{xen:link 'showcase/member', $user}">View My Showcase</a>
                        </div>
                    </xen:if>
     
  13. Joeychgo

    Joeychgo Member AMS Premium SC Premium UBS Premium

    Bob, your great but you keep forgetting -- I'm not a coder and know zero about it. Most of what you just said is Chinese to me
     
  14. Joeychgo

    Joeychgo Member AMS Premium SC Premium UBS Premium

    What I have now...

    Untitled.jpg
     
  15. Bob

    Bob Developer Staff Member

    If you just cut and pasted my un tested example above without adding any CSS to Extra.css for that example class, then that is standard behavior for a DIV with no CSS associated with it. You need to at least add a text-align property to the class. Hell, you could probably just add the CSS right to the div via style="text-align:center;"

    HTML:
                    <xen:if is="{$user.showcase_count}">
                        <div style="text-align:center;">
                            <a href="{xen:link 'showcase/member', $user}">View My Showcase</a>
                         </div>
                    </xen:if> 
    I've added the above HERE on XenAddons so you can see that it does what the CSS tells it to do.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.