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.

[XF1] Display Sportsbook Cash in sidebar Visitors Panel

Discussion in 'Sportsbook Support' started by TitanJeff, Apr 2, 2018.

  1. TitanJeff

    TitanJeff Member Showcase Pickem Sportsbook Survivor

    I'm wanting to run everyone's money total right under the Points. I think this is the sidebar_visitors_panel. Any ideas of how I might make that happen? Thanks.

    Screen-Shot-2018-04-02-at-10.38.29-PM.png
     
  2. Bob

    Bob Developer Staff Member

    yes, that is the correct template.

    FIND:
    Code:
                <xen:hook name="sidebar_visitor_panel_stats">
                    <dl class="pairsJustified"><dt>{xen:phrase messages}:</dt> <dd>{xen:number $visitor.message_count}</dd></dl>
                    <dl class="pairsJustified"><dt>{xen:phrase likes}:</dt> <dd>{xen:number $visitor.like_count}</dd></dl>
                    <xen:if is="{$xenOptions.enableTrophies}">
                        <dl class="pairsJustified"><dt>{xen:phrase points}:</dt> <dd>{xen:number $visitor.trophy_points}</dd></dl>
                    </xen:if>
                </div>
    AFTER THIS:
    Code:
                    <xen:if is="{$xenOptions.enableTrophies}">
                        <dl class="pairsJustified"><dt>{xen:phrase points}:</dt> <dd>{xen:number $visitor.trophy_points}</dd></dl>
                    </xen:if>
    ADD THIS:
    Code:
                        <dl class="pairsJustified"><dt>{xen:phrase nflj_sportsbook_cash}:</dt> <dd>{xen:number $visitor.sportsbook_cash}</dd></dl>
     
  3. TitanJeff

    TitanJeff Member Showcase Pickem Sportsbook Survivor

    Perfect. Thanks!

    If you're ever in Nashvegas, I owe you a beer or five for all the help over the years.
     
    Bob likes this.
  4. colcar

    colcar Member AMS Premium Pickem Sportsbook

    Will this work if you're using DragonByte Credits instead of SportsBook cash?
     
  5. Bob

    Bob Developer Staff Member

    2 things. What you quoted is for XenForo 1.x, so that won't work in XenForo 2.x. 2nd, what you quoted is for Sportsbook, not DB Credits. DB credits would have its OWN displaying of its OWN credits (and I am fairly certain that the addon has options to display in the postbit).
     
  6. colcar

    colcar Member AMS Premium Pickem Sportsbook

    Ah thanks Bob, that's great.
     
  7. colcar

    colcar Member AMS Premium Pickem Sportsbook

    Yeah it has has options to display credit in the postbit but not for Visitor Panel unfotunately.
     
  8. HammerDown

    HammerDown New Member Pickem Sportsbook

    Added this code in xf 2.2 template account_visitor_menu in appropriate place:

    Code:
                        <!--[XF:stats_pairs:above_reactions]-->
                        <dl class="pairs pairs--justified fauxBlockLink">
           <dt>Bookie:</dt>
            <dd>{$xf.options.xaSbCurrencySymbol} {$user.xa_sb_cash|currency}</dd>
                        </dl>
    
     
    Last edited: Sep 2, 2020
  9. HammerDown

    HammerDown New Member Pickem Sportsbook

    @Bob Any idea why this displays correct cash amount in message_macros but shows $0 in account_visitor_menu?
     
  10. Bob

    Bob Developer Staff Member

    You need to use $xf.visitor instead of $user.

    Code:
    {$xf.visitor.xa_sb_cash|currency}
     
    HammerDown likes this.
  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.