• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to 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.

Resolved Showcase count on message info?

nrep

Member
Showcase
I'm trying to find a way to add the showcase count (and a link to their showcase(s)) on the message member info alongside each forum post, but I can't see how to do that.

Can anyone please advise on how to do this in XF 2.1?
 
You can accomplish this via a simple template edit.

Template: message_macros

FIND:
HTML:
                    <xf:if is="$extras.message_count">
                        <dl class="pairs pairs--justified">
                            <dt>{{ phrase('messages') }}</dt>
                            <dd>{$user.message_count|number}</dd>
                        </dl>
                    </xf:if>


ADD AFTER:
HTML:
                    <xf:if is="$user.xa_sc_item_count">                 
                        <dl class="pairs pairs--justified">
                            <dt>{{ phrase('xa_sc_items') }}</dt>
                            <dd><a href="{{ link('showcase/authors', $user) }} ">{$user.xa_sc_item_count|number}</a></dd>
                        </dl>
                    </xf:if>

As you can see, "Items" displays after "Messages" and the count is linked to the Showcase Author page.

Selection_999(402).png

Note: If you want to display something other than the term "Items", you can use a different phrase or just remove the call to a phrase and just display hard coded text.

REPLACE:
HTML:
<dt>{{ phrase('xa_sc_items') }}</dt>


WITH:
HTML:
<dt>{{ phrase('your_own_custom_phrase') }}</dt>


OR
HTML:
<dt>Hard Coded Text</dt>
 
also if you want to add an fa-icon along with native tooltip...

Code:
<dt><span class="#" data-xf-init="tooltip" title="hard coded text OR
{{ phrase('xa_sc_items') }}"><i class="fa-icon-name></i></span></dt>

Untitled.jpg
 
Last edited:
Back
Top