• 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.

How to remove Sportsbook

You can hide a tab using CSS.

Admin CP -> Appearance -> Templates -> EXTRA.css

Rich (BB code):
.navTabs .navTab.sportsbook
{
display: none;
}

You must specify the tabid which can be seen in the HTML source.
 
You can hide a tab using CSS.

Admin CP -> Appearance -> Templates -> EXTRA.css

Rich (BB code):
.navTabs .navTab.sportsbook
{
display: none;
}

You must specify the tabid which can be seen in the HTML source.
Thanks.. I just copy and pasted the code and it's done the job… I didn't have to specify any tabid.
 
sportsbook (in red) IS the tabid ;) Just saying that you can look at the source and use the tab id's of ANY tab to hide a specific tab :)
 
disable the listener then. You need to be in DEBUG mode to do this tho as you need to access the Development Tab

Then click on code event listeners
scroll down to Sportsbook
then Uncheck navigation_tabs to disable it.

Be sure you are unchecking the one for sportsbook and not another addon (each addon that has a navigation tab will have a navigation_tabs listener
 
Suggestion: In your next update, can you add an option to remove Sportsbook from the navbar in ACP Options?

Because, if the navbar has too many items, it doesn't display well especially on mobile devices, username, aterts and logout options get messed up.
 
Unable to access Sportsbook submenu after removing Sporksbook from navbar via Debug mode.

Is there anyway, I can display just the submenu within sportsbook pages?

Or if I create a new Navbar menu called Extras can I include Sportsbook in there so when clicked it'll display the submenus correctly?

The "Extras" tab will also hopefully include other add ons - so that the navbar isn't overloaded with links.
 
A Submenu belongs to a Tab. If you disable a Tab, you also are disabling that tabs sub menu (if it has one). That is just how XenForo works. There is no "work around" for that.

Trying to remember now who did custom sub menus. Think it was 8thos. You might want to drop him an inbox asking him how he did it.

you can always copy the link syntax from the xi_sportsbook_tab_links template for use in the extras tab. That is what other people have done with other addons.
 
The Recent Events side block always displays the same events, regardless of new events being added. Any reason for this?

Are these new events OPEN? If they are "Pending", only YOU will see them in your Bookie CP. Only OPEN events will display. Events that are Pending, Closed, Awaiting Settlement, Settled or Abandon won't be displayed.

Mine works just fine. I had people that created events just a few hours ago and those are listed at the top of the list.

I'd have to see your site to see both the Status of these events and the DATES that you have for them as the OPEN data plays a key part in the sort order.
 
Are these new events OPEN? If they are "Pending", only YOU will see them in your Bookie CP. Only OPEN events will display. Events that are Pending, Closed, Awaiting Settlement, Settled or Abandon won't be displayed.

Mine works just fine. I had people that created events just a few hours ago and those are listed at the top of the list.

I'd have to see your site to see both the Status of these events and the DATES that you have for them as the OPEN data plays a key part in the sort order.
All events are set to Open, I've just created a test event right now. It's displaying in Recent Events block but it's not at the top. It should be above the Pak vs SA event, as it was created last Friday.

Screen Shot 2013-02-18 at 13.08.21.png
 
They are not ordered by CREATE date, they are ordered by OPEN date (for a very specific functionality reason). If you want them sorted by CREATE date, then you can modify the method. This will effect everything that uses the method.

The reason for ordering by OPEN date is so that you can create items now and have them OPEN in the future. That way those Future Events will display on the recent events list as "new" (top of the list) instead of way down on the list because of a create date 2 months ago.

I am willing to bet that you have a FUTURE date set for your pakistan event and manually set the event to OPEN instead of having it set to CLOSED status and having CRON open it on the Future OPEN date (which is how the functionality works). Edit your Pakistan event and either CLOSE it to have CRON auto open it on the OPEN Date or change the OPEN date to friday (or the date that it opened)

If you want to modify, do the below.

/library/NFLJ/Sportsbook/Model/Event.php

replace the getRecentEvents method with this one (or modify it to however you want).

PHP:
    public function getRecentEvents($numEvents = 0)
    {   
        return $this->_getDb()->fetchAll('
            SELECT event.*,
                cat.*,
                status.*,
                user.username, user.avatar_date, user.avatar_width, user.avatar_height, user.gravatar
            FROM xf_nflj_sportsbook_event AS event
                LEFT JOIN xf_user AS user
                    ON (user.user_id = event.user_id)           
                LEFT JOIN xf_nflj_sportsbook_category AS cat
                    ON (cat.category_id = event.category_id)
                LEFT JOIN xf_nflj_sportsbook_status AS status
                    ON (status.status_id = event.status_id)                   
            WHERE event.status_id = 2
            ORDER BY  event.date_create DESC, event.date_close DESC, event.event_id ASC
            LIMIT ?
        ', $numEvents);
    }
 
Yes, all Events are manually set Open and the Pakistan match isn't till 1st March. So if I set the status to Pending, will CRON auto open it according to the Event Open date?

And if it's set to Closed, nothing will happen, because it's closed?
 
no, not Pending, set it to CLOSED. The way the CRON works is it checks all CLOSED events, then looks at the OPEN dates and automatically changes the status from CLOSED to OPEN once it hits that date.

Pending = Hidden from everyone and can only be accessed by the Owner of the event via the Bookie CP
Closed = Can be viewed public, but no wagers can be placed. People can post comments as its just closed for placing wagers.
Open = Can be viewed public and wagers can be placed

To create events that will auto open, do the following.

Create the Event (status is pending)
Create some outcomes
Set the OPEN Date to the date that you want the event to open
Set the Event to CLOSED and hit save.

The event will display in the Events Pages as a "CLOSED" event. People can post comments to closed events.
 
Just so you know, default CRON is set to check ever 5 minutes. You can bump this up if needed. 5 minutes works fairly well on a high traffic site.

Just edit the CRON: Sportsbook: Change Event Status from Closed to Open and modify the Run at minutes values.
 
Back
Top