williamleonard / obblm

Automatically exported from code.google.com/p/obblm
1 stars 0 forks source link

Front page fp_leaders boxes per tournament. #365

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Is it possible to have the front page fp_leaders boxes display the stats
per tournament instead of per league?

If so, an example of code should be included in the settings file.

If it is not possible at the moment, I think it is a needed feature,
because scheduled leagues might be more interested in current season's
leader stats instead of all-time ones.

Original issue reported on code.google.com by hackerbunny@gmail.com on 21 Feb 2010 at 4:59

GoogleCodeExporter commented 9 years ago
I just sent a mail to Nicholas with a similar question, but as I understand it 
the
standings is per tournament? The comment in localsettings/settings_1.php 
indicates
this (it says that the sample code will display standings for the *tournament* 
with id X)

Original comment by setomi...@gmail.com on 21 Feb 2010 at 6:49

GoogleCodeExporter commented 9 years ago
Actually, now, in 0.8, only tournaments standings boxes are allowed on the FP.
Here is the syntax in the local leagues' settings files:

// Front Page (FP) tournament standings boxes
$settings['fp_standings'] = array(
    # This would display a standings box of the top 6 teams in tournament with ID = 1.
    1 => array(
        'length' => 6,
        'fields' => array(
            # Displayed table column name => OBBLM field name.
            'Name' => 'name', 'PTS' => 'mv_pts', 'CAS' => 'mv_cas', 
            'W' => 'mv_won', 'L' => 'mv_lost', 'D' => 'mv_draw', 'GF' => 'mv_gf',
'GA' => 'mv_ga'
        ),
    ),
);

Original comment by Nimda...@gmail.com on 21 Feb 2010 at 7:05

GoogleCodeExporter commented 9 years ago
My request is for the fp_leaders boxes, not the standing box.

The code in the local settings file does not allow to select a tournament for 
the
leader boxes:

// Front Page (FP) leaders boxes
$settings['fp_leaders'] = array(
    /* 
        Note, you can NOT make expressions out of leader fields e.g.:
            'mv_cas+mv_td' => array('title' => 'Most CAS+TD', 'length' => 5)
    */

    'mv_cas' => array('title' => 'Most casualties',  'length' => 5),
#    'mv_td'  => array('title' => 'Most touchdowns',  'length' => 5),
#    'mv_cp'  => array('title' => 'Most completions', 'length' => 5),
#    'mv_ki'  => array('title' => 'Most killed',      'length' => 5),
);

Original comment by hackerbunny@gmail.com on 21 Feb 2010 at 9:58

GoogleCodeExporter commented 9 years ago
OK. Makes sense!

Original comment by Nimda...@gmail.com on 22 Feb 2010 at 6:45

GoogleCodeExporter commented 9 years ago
r633.

Original comment by Nimda...@gmail.com on 23 Feb 2010 at 10:24