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.

Resolved Display Sportsbook Cash In Message User Block

Discussion in 'Sportsbook Support' started by stilly, Aug 15, 2014.

  1. stilly

    stilly New Member Sportsbook Pickem

    Hey Bob, probably missing something real obvious but how would I go about adding a users sportsbook cash amount to the message user block?

    Running sportsbook 1.5.1 and xf 1.3.5

    Capture.PNG
     
    Last edited by a moderator: May 9, 2018
  2. Bob

    Bob Developer Staff Member

    I thought I posted a "How to" for it, but can't find it, so I'll need to write something up. Its a simple template edit tho :)
     
    stilly likes this.
  3. Bob

    Bob Developer Staff Member

    ok, this should do the trick for ya...

    WARNING... THIS IS AN XF1 SOLUTION... THIS WILL NOT WORK FOR XF2!

    Edit Template: message_user_info

    Add the following block of code to where you would like it to display

    HTML:
    <xen:if is="{$user.sportsbook_cash}">
        <dl class="pairsJustified">
            <dt>Sportsbook Cash:</dt>
            <dd>{$xenOptions.sbCurrencySymbol} {xen:number $user.sportsbook_cash}</dd>
        </dl>
    </xen:if>
     
    Last edited: Aug 26, 2020
    stilly likes this.
  4. stilly

    stilly New Member Sportsbook Pickem

    Awesome bro, thank you, got it set, woohoo, college football is 2 weeks away!

    upload_2014-8-15_19-58-24.png

    This is better, should be core, hint, hint, lol, awesome support bro,

    upload_2014-8-15_20-4-53.png
     
    Last edited by a moderator: May 9, 2018
    Bob likes this.
  5. HammerDown

    HammerDown New Member Sportsbook Pickem

    Will this still work on 2.2 beta, Bob?
     
  6. Bob

    Bob Developer Staff Member

    I don't use it, so I have no idea. Its a super simple template edit, so just try and see if it works :)
     
  7. HammerDown

    HammerDown New Member Sportsbook Pickem

    I'm completely exhausted right now, running on three brain cells but there's no longer a message_user_info template.
     
  8. Bob

    Bob Developer Staff Member

    Looks like they moved the 'message_user_info' template into a macro template 'message_macros'

    btw, this THREAD is for XenForo 1.x. XF2 uses different template syntax, so trying to use a XF1 solution in XF2 won't work. Its SIMILAR, but not the same. Pretty sure I've posted an XF2 version of this somewhere around here.
     
  9. Bob

    Bob Developer Staff Member

    This should work... this is on XF 2.2.0 Beta 4 and using Sportsbook 2.2.0 Beta 1.

    HTML:
    <xf:if is="{$user.xa_sb_cash}">
        <dl class="pairsJustified">
            <dt>SB Cash:</dt>
            <dd>{$xf.options.xaSbCurrencySymbol} {$user.xa_sb_cash|currency}</dd>
        </dl>
    </xf:if>
    Selection_285.png
     
    HammerDown likes this.
  10. HammerDown

    HammerDown New Member Sportsbook Pickem

    Thanks @Bob can you tell me what template that goes in. For some reason I'm brain-dead when it comes to finding that template!
     
  11. Bob

    Bob Developer Staff Member

    I DID!

    Edit the template: 'message_macros'

    Add this block of code in the tempalte where you want it to display.

    HTML:
    <xf:if is="{$user.xa_sb_cash}">
        <dl class="pairsJustified">
            <dt>SB Cash:</dt>
            <dd>{$xf.options.xaSbCurrencySymbol} {$user.xa_sb_cash|currency}</dd>
        </dl>
    </xf:if>
    You will be putting that block of code in the SAME EXACT SPOT you did in the XF1 version explained above. It should not be that hard to figure out if you LOOK at the macro..... all the other blocks of code that display things like MESSAGE COUNT are easy to spot, you just insert the above block between one of the existing ones.
     
    McAtze and HammerDown like this.
  12. HammerDown

    HammerDown New Member Sportsbook Pickem

    Bob, it seems that if a member reaches $0 this disappears in the Message User Block.

    How can I have it display even if the member is at $0.
     
  13. Bob

    Bob Developer Staff Member

    Remove the if statement wrapping the block. The entire purpose of the if statement is to NOT display the block IF the user does not have any sportsbook cash.
     
    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.