Register    Login    Forum    FAQ

Board index » Community Discussion » Digital Resources




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Front page: event boxes
 Post Posted: Tue Jun 06, 2017 4:41 am 
Rookie
Rookie

Joined: Sat Mar 11, 2017 10:08 pm
Posts: 12
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:
/*********************
 *   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
    ),
);


Top 
 Profile  
 
 Post subject: Re: Front page: event boxes
 Post Posted: Tue Jun 06, 2017 10:27 am 
Super Star
Super Star
User avatar

Joined: Sun Jun 08, 2008 9:27 am
Posts: 820
Location: Glasgow
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.


Top 
 Profile  
 
 Post subject: Re: Front page: event boxes
 Post Posted: Wed Jun 07, 2017 4:13 pm 
Rookie
Rookie

Joined: Sat Mar 11, 2017 10:08 pm
Posts: 12
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...


Top 
 Profile  
 
 Post subject: Re: Front page: event boxes
 Post Posted: Wed Jun 07, 2017 8:53 pm 
Experienced
Experienced

Joined: Sun Dec 25, 2016 3:23 pm
Posts: 63
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.


Top 
 Profile  
 
 Post subject: Re: Front page: event boxes
 Post Posted: Thu Jun 08, 2017 11:30 pm 
Rookie
Rookie

Joined: Sat Mar 11, 2017 10:08 pm
Posts: 12
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?


Top 
 Profile  
 
 Post subject: Re: Front page: event boxes
 Post Posted: Fri Jun 09, 2017 11:31 am 
Super Star
Super Star
User avatar

Joined: Sun Jun 08, 2008 9:27 am
Posts: 820
Location: Glasgow
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:
/*********************
 *   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
    ),
);


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 6 posts ] 

Board index » Community Discussion » Digital Resources


Who is online

Users browsing this forum: No registered users

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to: