• 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 Display Sportsbook Cash In Message User Block

stilly

New Member
Pick'em
Sportsbook
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:
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:
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:
  • Like
Reactions: Bob
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.
 
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
 
can you tell me what template that goes in.
I DID!

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

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.
 
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.
 
Back
Top