Page 1 of 1

OBBLM - How to get show Highest CAS Team.

Posted: Fri Aug 21, 2015 12:56 pm
by ZerosGiven
Hi guys, so i want to have a box on the front page of the league that shows the top 3 CAS causing teams in the League. So in theory it adds up all the CAS from each game and feed them into a box on the front page, i have this in the code.

),
# This will display a 'Top 3 Killer Teams' player leaders box for the node (league, division or tournament) with ID = 11
array(
'id' => 11, # Node ID
'box_ID' => 7,
// Please note: 'type' may be either one of: 'league', 'division' or 'tournament'
'type' => 'division', # This sets the node to be a tournament. I.e. this will make a leaders box for the tournament with ID = 11
'title' => 'Season One | Top 3 Killer Teams', # Table title
'field' => 'tcasf', # For the OBBLM fields available see http://nicholasmr.dk/obblmwiki/index.ph ... tomization
'length' => 3, # Number of entries in table
'show_team' => true, # Show player's team name?
),

The front page shows up just fine, but its just repeating players from the same team, and not the highest CAS influcting teams in the league.

Any ideas what i'm doing wrong? One thought, should it be a Standings Box?

Cheers
ZeroGiven

Re: OBBLM - How to get show Highest CAS Team.

Posted: Fri Aug 21, 2015 2:10 pm
by Vanguard
The leaders boxes are designed to show Players, not Teams.
You want to use the League table display, which are designed for teams, rank it on CAS, only show CAS and limit it to 3 teams.
Can't check the code at the moment, but can throw something together over the weekend if you have trouble.

Re: OBBLM - How to get show Highest CAS Team.

Posted: Sat Aug 22, 2015 10:22 pm
by ZerosGiven
I nailed it, now cant get most expensive player to work!

),
array(
'id' => 11, # Node ID
'box_ID' => 10,
// Please note: 'type' may be either one of: 'league', 'division' or 'tournament'
'type' => 'division', # This sets the node to be a tournament. I.e. this will make a standings box for the tournament with ID = 11
'infocus' => false, # If true a random team from the standings will be selected and its top players displayed.
/*
The house ranking system (HRS) NUMBER to sort the table against.
Note, this is ignored for "type = tournament", since tours have an assigned HRS.
Also note that using HRSs with fields such as points (pts) for leagues/divisions standings makes no sense as they are tournament specific fields (i.e. it makes no sense to sum the points for teams across different tours to get the teams' "league/division points", as the points definitions for tours may vary).
*/
'HRS' => 6, # Note: this must be a existing and valid HRS number from the main settings.php file.
'title' => 'SEASON ONE | MOST EXPENSIVE PLAYER', # Table title
'length' => 5, # Number of entries in table
# Format: "Displayed table column name" => "OBBLM field name". For the OBBLM fields available see http://nicholasmr.dk/obblmwiki/index.ph ... tomization
'fields' => array('Name' => 'name', 'Player Position' => 'f_pos_name', 'Status' => 'status', 'Value' => 'value'),
),
);

and

// Rule #6
$hrs[6]['rule'] = array('+value'); // Sort teams against: most points, then most TDs and then least sportsmanship points.
$hrs[6]['points'] = '';

Any ideas? The front page just shows this

Image

Cheers
Duncan

Re: OBBLM - How to get show Highest CAS Team.

Posted: Sun Aug 23, 2015 1:08 pm
by Vanguard
Same problem in reverse I'm afraid. That's a Tournament Standing box, which is for displaying teams. You need to use a Leader Box for player ranking. They're organised as two separate arrays in the file.

Code: Select all

array(
        'id'        => 11, # Node ID
        'box_ID'    => 3,
        // Please note: 'type' may be either one of: 'league', 'division' or 'tournament'
        'type'      => 'division', # This sets the node to be a tournament. I.e. this will make a leaders box for the tournament with ID = 1
        'title'     => 'Season ONE | MOST EXPENSIVE PLAYER', # Table title
        'field'     => 'value', # For the OBBLM fields available see http://nicholasmr.dk/obblmwiki/index.php?title=Customization
        'length'    => 5, # Number of entries in table
        'show_team' => true, # Show player's team name?
    ),
I haven't tested this code, but I think that should give you what you need, I've taken some of the settings from your existing code. I would point out that you've set it up to show the most expensive player in a Division, but titled it for a season. If you want to limit it to the most expensive player in a season, change the type to Tournament and the Node ID to the Tournament's ID value.

Re: OBBLM - How to get show Highest CAS Team.

Posted: Mon Aug 24, 2015 8:53 pm
by ZerosGiven
HI Vanguard, thanks for the help. I'm afraid that code does not work :( It's what I had tried before. I tried yours just to be sure, but nothing is displayed.

Re: OBBLM - How to get show Highest CAS Team.

Posted: Tue Aug 25, 2015 8:13 am
by Vanguard
PM'd

Re: OBBLM - How to get show Highest CAS Team.

Posted: Wed Aug 26, 2015 8:44 am
by Vanguard
On further digging, it looks like the fault lies with OBBLM. Despite the documentation suggesting that 'value' is an acceptable field for Leader Boxes it doesn't seem to like it.
I'm going to dig into the code when I can and see if it is fixable, but looks like it will be a more complicated fix than I originally thought.

Re: OBBLM - How to get show Highest CAS Team.

Posted: Wed Sep 16, 2015 4:16 pm
by ZerosGiven
Hey Vanguard, any news on this?

Cheers for all the help so far.