Talk Fantasy Football
http://talkfantasyfootball.org/

Easy way to post upcoming schedule on league homepage?
http://talkfantasyfootball.org/viewtopic.php?f=29&t=43845
Page 1 of 1

Author:  jcopersito [ Fri Mar 17, 2017 3:57 pm ]
Post subject:  Easy way to post upcoming schedule on league homepage?

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!

Author:  Tim [ Mon Mar 20, 2017 4:21 pm ]
Post subject:  Re: Easy way to post upcoming schedule on league homepage?

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:
/*********************
 *   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
);

Author:  Tim [ Mon Mar 20, 2017 10:34 pm ]
Post subject:  Re: Easy way to post upcoming schedule on league homepage?

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.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/