OBBLM help needed - Front Page Tournament Standings

However you play online - Java, Vassal, Email, Cyanide etc - talk about it here.
This is also the place for discussing the various tools for managing leagues, teams and so on.

Moderator: TFF Mods

Post Reply
BigSexy
Rookie
Rookie
Posts: 47
Joined: Fri Jul 10, 2009 4:56 am
Location: SE Michigan, U.S.

OBBLM help needed - Front Page Tournament Standings

Post by BigSexy »

How do I get the front page to display the standing for the current tournament? It does not show up. I was able to figure out Most Casualties and Most Touchdowns and add one for SPPs but can't figure out Standings. FYI, don't know PHP so just stumbling around.

Reason: ''
User avatar
Vanguard
Super Star
Super Star
Posts: 922
Joined: Sun Jun 08, 2008 8:27 am
Location: Glasgow
Contact:

Re: OBBLM help needed - Front Page Tournament Standings

Post by Vanguard »

The front page setup is specified in the localsettings/settings_?.php file, where ? is the numerical ID of your League.
It's worth explaining that OBBLM uses a hierarchical structure of Leagues, Divisions and Tournaments which it refers to as nodes. For example, my current league has the following setup:

Code: Select all

WBBL (League ID=2)
    - WBBL (Division ID=1)
        - WBBL Season 1 (Tournament ID=3)
        - WBBL Season 2 (Tournament ID=4)
        - WBBL Season 3 (Tournament ID=5)
The IDs are automatically generated when you create a node, starting at one and incrementing. They are also specific to each level, so your first league, division and tournament will all have ID=1.
There is no easy way to discover the ID of a node that I am aware of, I've done it previously with a little trial and error. If you are comfy with MySQL you can look at the tables and get the info there. (Table leagues[i/] Field lid, Table divisons[i/] Field did, Table tours[i/] Field tid

In the settings_?php file there should be a section titled Front page: tournament standings boxes starting around line 75. You need to edit this section to show your tournament standings. Set id equal to the ID of your tournament and set type equal to 'tournament'. You can have standings for Leagues and Divisions too, so you have to specify that it is a tournament table you want. Next you need to set the box_ID, this specifies which position the table will appear in on the right hand side of your page. I have mine set to 1 so it appears first, but it's entirely up to you. Just ensure that each box you have set up (League, Most CAS, Most TDs etc) all have a unique ID.

Here's a copy of my setup for your reference:

Code: Select all

/*********************
 *   Front page: tournament standings boxes
 *********************/

$settings['fp_standings'] = array(
    array(
        'id'     => 5, # Node ID
        'box_ID' => 1,
        // Please note: 'type' may be either one of: 'league', 'division' or 'tournament'
        'type'   => 'tournament', 
        'infocus' => false, 
        'HRS'    => 1, # Note: this must be a existing and valid HRS number from the main settings.php file.
        'title'  => 'WBBL Season 3', # Table title
        'length' => 12, # Number of entries in table
        # Format: "Displayed table column name" => "OBBLM field name". For the OBBLM fields available see http://nicholasmr.dk/obblmwiki/index.php?title=Customization
        'fields' => array('Name' => 'name', 'TV' => 'tv', 'P' => 'played', 'W' => 'won', 'D' => 'draw', 'L' => 'lost', 'TDF' => 'gf', 'TDA' => 'ga', 'CAS' => 'cas', 'PTS' => 'pts',),
    ),
);

Reason: ''
Image
Image
BigSexy
Rookie
Rookie
Posts: 47
Joined: Fri Jul 10, 2009 4:56 am
Location: SE Michigan, U.S.

Re: OBBLM help needed - Front Page Tournament Standings

Post by BigSexy »

Thanks for the help. With the default ID=>1, nothing shows up. When I changed it to 2, standings appeared but from a previous tournament. When I set it to 3 nothing appeared again. Does OBBLM count tournaments you may have created and then deleated, such as test setups? I guess I may have do some trial and error.

Okay, that might be the case. We've had 3 tournaments and I got up to ID=> 7 until I got the proper standings. Also had a moment of panic when I titled the standings,"Spring '14 Season Standings" and the whole page disappeared. Apparently you can't put them extra apostrophes in there. :lol:

Reason: ''
User avatar
Shteve0
Legend
Legend
Posts: 2479
Joined: Thu May 07, 2009 10:15 am
Location: Wellington, New Zealand

Post by Shteve0 »

Welcome to the world of experimenting with php :)

Yes, deleted tournaments count. I think there's a shortcut to looking at the numbering of leagues accessible from the public site... Can anyone recall where it is?

Reason: ''
League and tournament hosting, blogging and individual forums - all totally free. For the most immersive tabletop sports community experience around, check out theendzone.co
User avatar
Shteve0
Legend
Legend
Posts: 2479
Joined: Thu May 07, 2009 10:15 am
Location: Wellington, New Zealand

Re: OBBLM help needed - Front Page Tournament Standings

Post by Shteve0 »

Aha, here you go. You need to get to the Tournament Standings page - here's ours: http://wbbl.nzbbn.com/index.php?section ... type=tours

If you click on one of the tournaments, the new page that opens up has a url that looks something like this:

Code: Select all

http://wbbl.nzbbn.com/index.php?section=matches&type=tourmatches&trid=4
...which tells me that I need to reconfigure the tables on the front to tournament with id=4.

Note that the standings boxes are not all configured to look for a tournament by default; some will look for the league or division! It's an important distinction, so have a think about what it is you want to show on that front page before it catches you by surprise.

Reason: ''
League and tournament hosting, blogging and individual forums - all totally free. For the most immersive tabletop sports community experience around, check out theendzone.co
BigSexy
Rookie
Rookie
Posts: 47
Joined: Fri Jul 10, 2009 4:56 am
Location: SE Michigan, U.S.

Re: OBBLM help needed - Front Page Tournament Standings

Post by BigSexy »

That's a great tip. Thanks Shteve0. Got the part about "league, division, tournament". Got my other boxes set up the way I want, just couldn't get the standings to work for me, but now it's all good. Thanks guys.

Reason: ''
Post Reply