nicholasmr / obblm

Automatically exported from code.google.com/p/obblm
26 stars 54 forks source link

Tournament Standings in Home Page for 0.80rc2 #360

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm currently testing release 0.80rc2 on my OBBLM portal, and I found a 
very disturbing change in respect to 0.75.

I'm no more able to show in Home Page all the open tournaments standings.

I'm forced to choose ONE tournament, and declare it into local settings for 
corresponding League.

Now, I see that this is forced by indicating Tournament ID for every 
League, but I guess we can implement this much more efficiently and backing 
previous function allowing the choice of the Tournament to Show using a 
drop down menu EXACLTY the same way you choose the League you want to show.

After the selection of the League Portal (Left Side) on the right side of 
the Home page a menu containing all the active tournament for THAT league 
should allow to choose what standins I want to look at.

Let me know if this is doable with little effort (i guess the answer is 
YES)

Monty

Original issue reported on code.google.com by Fabio.Mo...@gmail.com on 15 Feb 2010 at 3:03

GoogleCodeExporter commented 9 years ago
Hi Fabio.

The automatic population of front page standings tables for ALL tournaments is
removed because many people are requesting more customizability regarding the 
front page.
This has led to the new structure, where EACH league, using the LOCAL 
settings_*.php
files, can set their own front page.
You are wrong in that it is only possible to display the standings tables for 
ONE
tournament. You can in fact get the exact same front page as before (with 0.75) 
by
adding ALL the tournaments to the array, like so:

$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'
        ),
    ),

    # This would display a standings box of the top 6 teams in tournament with ID = 2.
    2 => 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'
        ),
    ),

    # This would display a standings box of the top 6 teams in tournament with ID = 3.
    3 => 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'
        ),
    ),
);

..and so on - just add more tournament entries in the out-most array as done 
above.

I would strongly suggest you NOT copy old code and merge it with v. 0.8.

Original comment by Nimda...@gmail.com on 15 Feb 2010 at 9:32

GoogleCodeExporter commented 9 years ago

Original comment by Nimda...@gmail.com on 19 Feb 2010 at 8:07