LeagueManager
LeagueManager has become a very powerful tool to manage numerous different kinds of sport leagues. Below is a brief list of features.
- Easy adding of teams and matches
- special rules for numerous sports, e.g. Gymnastics, ball game, hockey, basketball
- implemented point rules with possibliy to manually set point rule
- automatic or manual ranking of teams
- fancy events widget to show upcoming and done matches and standings table
- template system to easily customize frontend output
- import and export method to save teams and matches as CSV file
- own capabilities to control access and compatibility with RoleManager
Installation
This is easy. Simply extract the files to your plugins directory or, if you use Wordpress 2.7 you can use the integrated installation method. The management pages are found under League.
Shortcode Usage
To display the standings table use the shortcode
[standings league_id=ID mode=extend|compact template=X group=GROUP]
| Parameter | Description | Possible values | Default | Optional |
|---|---|---|---|---|
| league_id | ID of league to display | integer | - | no |
| league_name | get league by name instead of ID (cannot be used together with attribute league_id) | string | yes | |
| season | display standings of specific season (default is last season) | string |
yes | |
| logo | toggle dislay of Team Logos | string ‘true’ or ‘false’ | true | yes |
| template | specifies template to use | name of template file without extension, whereas the name has to be standings -X | yes | |
| group | specific group | string | yes |
The crosstable of a league can be displayed with the following code
[crosstable league_id=ID mode=embed|popup template=X ]
| Parameter | Description | Possible values | Default | Optional |
|---|---|---|---|---|
| league_id | ID of league to display | integer | - | no |
| league_name | get league by name instead of ID (cannot be used together with attribute league_id) | string | yes | |
| season | display standings of specific season (default is last season) | string | yes | |
| mode | embed table in page or display a link to open it in a thickbox popup window | embed
popup |
yes | |
| template | specifies template to use | name of template file without extension, whereas the name has to be crosstable-X | yes |
To display an overview of all matches of a league, put the following code in a post or page
[ matches league_id=ID mode=|all|home|racing template=X ]
| Parameter | Description | Possible values | Default | Optional |
|---|---|---|---|---|
| league_id | ID of league to display | integer | - | no |
| league_name | get league by name instead of ID (cannot be used together with attribute league_id) | string | yes | |
| team | display only matche of given Team ID | integer | yes | |
| mode | controls display type of matches. Leave empty to display them ordered by match days, all causes all matches to be displayed in a single table. Set mode to home to only display matches of own team. To display racing results you must use mode ‘racing’ | empty
all racing |
yes | |
| template | specifies template to use | name of template file without extension, whereas the name has to be matches -X | yes | |
| season | display standings of specific season (default is last season) | string | yes | |
| archive | If true match day will always start at 1 otherwise at current match day | boolean | false | yes |
| roster | Only works with Racing. Display race results for given racer. Can be either ID or name, but ID is recommended | integer | false | yes |
| order | MySQL order string. Change ordering of matches, e.g. order=’date DESC’ sorts matches descending by date | string | false | yes |
| match_day | display matches of given match day | integer | yes | |
| group | get matches of specific group | string | yes | |
| time | use this to get either upcoming (next) or previous (prev) matches | next or prev | yes |
In version 2.9 there is another shortcode to display a single match
[ match id=ID template=X ]
| Parameter | Description | Possible values | Default | Optional |
|---|---|---|---|---|
| id | ID of match to display | integer | - | no |
| template | specifies template to use | name of template file without extension, whereas the name has to be match -X | yes |
It is also possible to display a list of all teams
[teams league_id=ID season=X template=X]
| Parameter | Description | Possible values | Default | Optional |
|---|---|---|---|---|
| league_id | ID of league to display | integer | - | no |
| season | display standings of specific season (default is last season) | string |
yes | |
| template | specifies template to use | name of template file without extension, whereas the name has to be standings -X | yes |
To show an info page of individual teams use the following code
[team id=ID template=X ]
| Parameter | Description | Possible values | Default | Optional |
|---|---|---|---|---|
| id | ID of Team to display | integer | - | no |
| template | specifies template to use | name of template file without extension, whereas the name has to be crosstable-X | yes |
Templates
Templates are special files that are used to display the plugin data in the website frontend. The plugin comes with a set of default templates that are located int
WP_PLUGIN_DIR/leaguemanager/view/
I believe their naming is clear. To customize a certain template copy the file to
your_theme_dir/leaguemanager/
There you can edit it to your needs. The default templates, be they in the plugins view directory or your theme directory are loaded if the template attribute is empty or missing. It is also possible to design more than one template for one shortcode. Assume you create a template called standings-sample1.php. To load this template use the following code:
[ leaguestandings league_id=ID mode=extend|compact template=sample1 ]
Customization
The plugin is built in a modular way with several Wordpress Hooks to make customization as easy as possible. The page Customization. There is also a reference of Filters and Actions which are used in the plugin available.
Download
The plugin can be downloaded at Wordpress.org.
Donations
Developing and maintaining the plugin consumes a lot of my spare time. If you like my work and want to support me, I’m grateful for any donation.



