Front page: event boxes

However you play online - Java, Vassal, Email, Cyanide etc - talk about it here.
This is also the place for discussing the various tools for managing leagues, teams and so on.

Moderator: TFF Mods

Post Reply
jcopersito
Rookie
Rookie
Posts: 12
Joined: Sat Mar 11, 2017 9:08 pm

Front page: event boxes

Post by jcopersito »

For some reason my event boxes are either blank - or only show the entire league.....

Very frustrating....

Here is the code example:
I am trying to get these to work within a division or tournament, not an entire league.

Code: Select all

/*********************
 *   Front page: event boxes
 *********************/

$settings['fp_events'] = array(
    /*
        Event boxes can show for any league, division or tournament the following:
            dead        - recent dead players
            sold        - recent sold players
            hired       - recent hired players
            skills      - recent player skill picks
    */
    array(
        'id'        => $get_lid, # Node ID
        'box_ID'    => 5,
        // Please note: 'type' may be either one of: 'league', 'division' or 'tournament'
        'type'      => 'tournament', # This sets the node to be a tournament. I.e. this will make an event box for the tournament with ID = 1
        'title'     => 'Latest Dead Players (Tournament)', # Table title
        'content'   => 'dead', # Event type
        'length'    => 5, # Number of entries in table
    ),

array(
        'id'        => $get_lid, # Node ID
        'box_ID'    => 6,
        // Please note: 'type' may be either one of: 'league', 'division' or 'tournament'
        'type'      => 'tournament', # This sets the node to be a tournament. I.e. this will make an event box for the tournament with ID = 1
        'title'     => 'Latest Skills (Tournament)', # Table title
        'content'   => 'skills', # Event type
        'length'    => 10, # Number of entries in table
    ),
);

Reason: ''
User avatar
Vanguard
Super Star
Super Star
Posts: 922
Joined: Sun Jun 08, 2008 8:27 am
Location: Glasgow
Contact:

Re: Front page: event boxes

Post by Vanguard »

You need to make sure the ID and TYPE match. The code you've given is using your League ID but is set to Tournament for type. This means that it's looking for a tournament with the same ID as your League, which may not exist.
If you go to www.yourdomain.com/troubleshoot.php, you'll get an info page with all of your league, division and tournament IDs. You can then replace $get_lid with the correct value.

Reason: ''
jcopersito
Rookie
Rookie
Posts: 12
Joined: Sat Mar 11, 2017 9:08 pm

Re: Front page: event boxes

Post by jcopersito »

Now the problem is - the team I have created is not tied to that division or tournament - and I cannot figure out why....

Does not even show up in the standings...

Reason: ''
E99
Experienced
Experienced
Posts: 84
Joined: Sun Dec 25, 2016 2:23 pm

Re: Front page: event boxes

Post by E99 »

If it is a free for all league, it will be in the standings once you have scheduled (and may be reported) a match for that team.

Reason: ''
jcopersito
Rookie
Rookie
Posts: 12
Joined: Sat Mar 11, 2017 9:08 pm

Re: Front page: event boxes

Post by jcopersito »

Instead of hard coding it, is there a variable I can use instead that is pulling the Tournament ID? Could I just comment out the code and paste it into the custom CSS box of the admin page?

Reason: ''
User avatar
Vanguard
Super Star
Super Star
Posts: 922
Joined: Sun Jun 08, 2008 8:27 am
Location: Glasgow
Contact:

Re: Front page: event boxes

Post by Vanguard »

jcopersito wrote:Instead of hard coding it, is there a variable I can use instead that is pulling the Tournament ID? Could I just comment out the code and paste it into the custom CSS box of the admin page?
No, the custom CSS is only for formatting, it can't affect the page content.
$get_prime should work to pull in the Primary Tournament ID. You can then set that from the League Admin page.

Code: Select all

/*********************
 *   Front page: event boxes
 *********************/

$settings['fp_events'] = array(
    /*
        Event boxes can show for any league, division or tournament the following:
            dead        - recent dead players
            sold        - recent sold players
            hired       - recent hired players
            skills      - recent player skill picks
    */
    array(
        'id'        => $get_prime, # Node ID
        'box_ID'    => 5,
        // Please note: 'type' may be either one of: 'league', 'division' or 'tournament'
        'type'      => 'tournament', # This sets the node to be a tournament. I.e. this will make an event box for the tournament with ID = 1
        'title'     => 'Latest Dead Players (Tournament)', # Table title
        'content'   => 'dead', # Event type
        'length'    => 5, # Number of entries in table
    ),

array(
        'id'        => $get_prime, # Node ID
        'box_ID'    => 6,
        // Please note: 'type' may be either one of: 'league', 'division' or 'tournament'
        'type'      => 'tournament', # This sets the node to be a tournament. I.e. this will make an event box for the tournament with ID = 1
        'title'     => 'Latest Skills (Tournament)', # Table title
        'content'   => 'skills', # Event type
        'length'    => 10, # Number of entries in table
    ),
);

Reason: ''
Post Reply