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] Tips & Tricks

Not open for further replies.
Setting a CLOSED Event to automatically OPEN.

You can set events to CLOSED and have them automatically open on a future date via CRON. To do this, must first set the OPEN date to a FUTURE date as well as make sure that the CLOSE date is set beyond the future open date..

Example.... if you want to open an event on June 1st, set the Event Opens to June 1st and a close date of june 2nd or greater. Make sure the event is set to CLOSED and when June 1st hits (and the correct time) CRON will automatically open the event for you and will close it again once it hits the close date. You can do this as many times as needed for ongoing long term events.
Sportsbook Cash Management

NOTE: These options are only if you are using the internal Sportsbook Cash system. If you are using a 3rd party Cash/Points system, you will need to use that Addon's cash management functions.

Give Sportsbook Cash to ONE person.

When using Sportsbook cash, you can edit a users Sportsbook Cash amount via the Profile Info tab on the Edit User functionality built into XF.

Give Sportsbook Cash to EVERYONE.

Click on Applications >> Sportsbook >> Cash Management >> Mass Award Cash

Reset Sportsbook Cash for EVERYONE.

Click on Applications >> Sportsbook >> Cash Management >> Mass Reset Cash

Give to the Poor.

Click on Options >> Sportsbook >> Cash to Poor Amount. Set this to the value that you want the system to automatically award your users if they run out of cash.

This is run via a CRON Entry. The default setting for this is once a day at Midnight. You can set this Cron Entry to run when every you wish.

Click on Tools >> Cron Entries >> Sportsbook: Give to the Poor Change the Day of the Month, Day fo the Week, Hours and Minutes to the way you want it to pay out.

Event Management Tips

Bookies. A word of advice. Do not let EVERYONE create events. Choose a SMALL team of Bookies that you can TRUST.

ODDS. Use REAL Odds when creating outcomes for events. I built this to be as realistic as possible. Creating 25-1 Odds for the Patriots to beat the Rams is just DUMB and totally unrealistic. If you want your Sportsbook to be successful, use it properly.

Abandoning an Event. In order to Abandon and event, ALL Wagers placed on the specific event need to be returned. To return wagers, you simply DELETE any outcomes for the event that have wagers placed on them. The Outcomes Area on the Event Edit page displays whether or not an outcomes has wagers (and how many).

Managing Outcomes. Outcome Management is handled within the lower part of the Event Edit Page. When you add new outcomes (or edit/delete) you DO NOT have to hit "save event". The "Save Event" is only for the upper portion of the Event Edit area.

Changing Outcome Odds. You can edit an outcome at any time and changes its payout odds (just like what happens in the real world). This will obviously not effect those that have already placed a wager however as once a wager is place, those Odds are locked in for that single wager.

Decimal Odds. Some people just flat out do not like decimal odds displayed. If you don't like it, simply go to Sportsbook Options and uncheck "Display Decimal Odds". That will remove Decimal Odds through Sportsbook.

Deleting Events (Admin Only). Bookies can only Abandon Events. Once an event is "Abandoned", it will display in the Events Management area of the Admin CP. Admins can then Delete abandon events.

Reassigning Events. A hidden trick... When an Event is in "Pending" status, it can be accessed via the Events Management area in the Admin CP. Once of the Edit Settings on the backend allows you to change the Bookie.
Templates and CSS

I've tried to make it so that this is flexable enough to highly customize each individual aspect of Sportsbook. That way you can make changes to the "My Wagers" area without effecting other parts of Sportsbook. I did use a lot of default XF style properties, but not everything, because again, I wanted to make it Flexable instead of being tied down. You should be able to figure things out by the naming conventions used for both regular templates and CSS templates. I will be continuously upgrading Both the Templates and CSS.

For those of you that are not into Sports, Sportsbook is not limited to Sporting Events. You can add as many different types of categories as you wish via the Sportsbook Category Management section in the Admin CP. ie, Movies, Entertainment, Music World Events etc...

Category Logos vs Bookies Avatars. Each Category can have its own "logo" which will replace the bookies Avatar in various locations throughout Sportsbook. You can use a combination of Cats with Logos and Cats without logos. Its really simple... if you specify a logo, then that will display, else the Bookies Avy will display.

Where are the Cat Logos located? styles/default/xenfluence/sportsbook/cat_logo

There are a TON of Phrases. I did this to allow for flexability in certain situations. For example, the Tab Links are their own separate Phrases, so you can rename the Sportsbook Tab without it effecting other places that also display the word Sportsbook... IIRC, there are at least 3 "Sportsbook" Phrases.

Note: be careful with phrases that have {} in them. Those are dynamic Phrases which means that data is being passed into them to be displayed. Things like Cash Amount for example.

How do I change "Sportsbook" to something else ie "Bookie" ?

There are currently 2 Phrases for the term "Sportsbook". They are nflj_sportsbook and nflj_sportsbook_sportsbook.
Last edited:
Event Titles and layout issues with custom styles

Titles throughout various places in Sportsbook are "trimmed" so that they fit the xf defualt style. Some styles are going to make the font size larger which will effect the width throwing other content off. If you have this issue, just change the value in the helper snippet on effected titles. Below is what to look for in templates. Change 70 to a smaller number until it no longer breaks the layout.

{xen:helper snippet, $event.title, 70}
Change the Order in which the Sportsbook Tab displays in the Navigation Menu.

To do this, you will need to put your site into DEBUG MODE as you need to access the Development Tab in the Admin CP. Once in the Development area, you want to click on the Code Event Listeners link to bring up the main listing of all Code Event Listeners that have been added by Addons. Since you are wanting to change TAB order, you should FILTER the list so that only the navigation_tabs listeners are displayed. As you can see here, there are several addons that are adding tabs to the navigation menu. Click on the link for the appropriate Tab to edit its execution order (see next image)


As mentioned, each Tab that is added via the navigation_tabs Code Event Listener has a Callback Execution Order. The default is set at 10, which most addon developers just leave it set at. However, you can adjust the Callback Execution Order to set the order of the tabs the way you want them (within the Position Group that they are in).

NOTE: There are 3 dynamic insert positions for Tabs. MOST (not all) hard code that position into the listener file (a php file associated with the listener). Some Addons (like XFMG, Showcase, AMS, Sportsbook) have an OPTION that lets you set which of the 3 positions you want the tab inserted into.

<!-- extra tabs: home -->
<!-- extra tabs: middle -->
<!-- extra tabs: end -->

home = inserted between the HOME Tab and FORUM Tab.
middle = inserted between the FORUM tab and MEMBERS tab
end = inserted after the MEMBERS Tab

If one tab is in the middle and the other in the end, you can't change the execution order to put the tab that is in the middle at the END. You'd have to either change the OPTION (if there is one) or edit the file and change the hard coded value.

NOTE: even tho the above image say's all my addons are set to the MIDDLE and would require and edit, I have recently added OPTIONS to most of them (Showcase, AMS and Sportsbook).

Not open for further replies.