1. 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?

Discussion in 'Showcase Support' started by nrep, Jul 8, 2020.

  1. nrep

    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?
     
  2. Bob

    Bob Developer Staff Member

    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>
     
    Yodrak and nrep like this.
  3. nrep

    nrep Member Showcase

    That's fantastic, thank you. It works great :).
     
    Bob likes this.
  4. OUTL4W

    OUTL4W New Member AMS Showcase

    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: Aug 18, 2020
  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.