Support » Plugin: LeagueManager » [Plugin: LeagueManager] Table by Group

  • Resolved uili


    I running it on a soccer championship mode and I have 4 groups (A, B, C , D) with 5 teams each (20 teams total)… but the standings table show all the teams together… i would like to have 4 standings table(one for each Group) with those 5 teams on each!

    Then when i get to the final, it can be all together, just like it is now!
    Any idea how i can make this work on widget and standings template?

Viewing 7 replies - 1 through 7 (of 7 total)
  • uili


    ok.. that was easy…
    i made one template called championship-compact.php

    with this code:

    <?php foreach ( $championship->getGroups() AS $key => $group ) : ?>
    <?php $teams = $leaguemanager->getTeams( "<code>league_id</code> = '".$league->id."' AND <code>season</code> = '".$league->season."' AND <code>group</code> = '".$group."'" ); ?>
    <?php $matches = $leaguemanager->getMatches( "<code>league_id</code>= '".$league->id."' AND <code>season</code> = '".$league->season."' AND <code>final</code> = '' AND <code>group</code> = '".$group."'" ); ?>
    <h4><?php printf(__('Group %s', 'leaguemanager'), $group) ?></h4>
    <?php leaguemanager_standings( $league->id, array('season' => $league->season, 'group' => $group, 'template' => 'compact', 'logo' => false) ); ?>
    <?php endforeach; ?>

    and on my widgets i added a text block with this shortcode:

    [championship league_id=1 template=compact]

    So I tried this but I get MYSql errors. Any idea?

    Plugin Author LaMonte Forthun


    I’m not sure what the ‘' and '‘ tags are for, but those are causing your problem from what it looks like.

    Just curious, have you tried this:

    [standings league_id=1 group=A]

    The standings will list all teams unless you request a certain group. If I have a league with the same four groups, I have

    [standings league_id=1 group=A]
    [standings league_id=1 group=B]
    [standings league_id=1 group=C]
    [standings league_id=1 group=D]

    and get four tables, one for each group. Is that what you’re looking for?

    I cant seem to find my group IDs anywhere. I’ve tried that not getting anything to show up.

    Plugin Author LaMonte Forthun


    The Groups are set up in the league preferences and then the teams have to be set up within the groups for it to work properly.

    Right I have the groups setup for instance. I’m using this for a Madden Football league and I have the groups setup as divisions. AFC East, AFC West, etc etc. I also have the teams established in the groups. When I use your code

    [standings league_id=3 group=AFC East]
    [standings league_id=1 group=A]
    [standings league_id=1 group=1]

    None of those show anything when I save it on a page.

    Plugin Author LaMonte Forthun


    If you want I can take a look at it from the inside and see what I can come up with.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: LeagueManager] Table by Group’ is closed to new replies.