Page 1 of 1

Easy way to post upcoming schedule on league homepage?

Posted: Fri Mar 17, 2017 2:57 pm
by jcopersito
I am maintaining a site for our local leagues. www.trubbl.com

I am trying to determine if there is an easy way to create a box on the right column containing upcoming games. Is it possible to control which round is displayed? Or maybe display a certain number of games upcoming sorted by round?

I would want this to display just above the recent games box I currently have (sliding all boxes down).

any advice would be greatly appreciated!

Re: Easy way to post upcoming schedule on league homepage?

Posted: Mon Mar 20, 2017 3:21 pm
by Tim
Looking at the code in sections.php it looks like the output is prepared already and can be adjusted by changing the settings file. Theoretically it should work by adding the marked part below (without the // lines) to the local settings file, i'll have to test to confirm it though.

(also see http://www.nicholasmr.dk/obblmwiki/inde ... l_settings)

Code: Select all

/*********************
 *   Front page: latest games boxes
 *********************/
$settings['fp_latestgames'] = array(
    # This will display a latest games box for the node (league, division or tournament) with ID = 1
    array(
        'id'     => $get_lid, # Node ID
        'box_ID' => 7,
        // Please note: 'type' may be either one of: 'league', 'division' or 'tournament'
        'type'   => 'league', # This sets the node to be a league. I.e. this will make a latest games box for the league with ID = 1
        'title'  => 'Recent Games (League)', # Table title
        'length' => 5, # Number of entries in table
    ),
//start added section
    array(
        'id'     => $get_lid, # Node ID
        'box_ID' => 8,
        // Please note: 'type' may be either one of: 'league', 'division' or 'tournament'
        'type'   => 'league', # This sets the node to be a league. I.e. this will make a latest games box for the league with ID = 1
        'title'  => 'Upcoming Games (League)', # Table title
        'length' => 5, # Number of entries in table
        'upcoming' => true,
    ),
//end added section
);

Re: Easy way to post upcoming schedule on league homepage?

Posted: Mon Mar 20, 2017 9:34 pm
by Tim
Tested the above, it works :D

You'll have to edit localsettings\settings_1.php

With the box_ID value you can control the sequence of the boxes. Change 'length' value for more entires.