Migrate from GitHub to SourceForge with this tool. Check out all of SourceForge's recent improvements.
Close

Leaguesite 0.7.0 Released

Points based tables are finally here!
----------------------------------------------------
I've finally done what I really should have done a long while ago - adding points based standings table capabilities to leaguesite. I also wanted to take into account other comments that I have received about different users/sports requiring slightly different methods of ordering the teams.

To try and support all this I have decided to use a simple plugin architecture that allows individual files to deal independantly with different methods of generating standings tables.

This hopefully means that if none of the existing ways of generating a standings table is ideal for your sport you can simply write a very basic plugin, add it to the correct directory, and it will automatically be available for use in leaguesite.

Initial plugins
----------------------------------------------------
The standings plugins that I have created so far are:

* Generic "Games Back" - Implements the standings table leaguesite used previously
* Generic Points (3 Points version) - Generic points table, with 3 points for a win
* Generic Points (2 Points version) - Generic points table, with 2 points for a win
* Generic Points (3 Points) with Bonus Points - Generic points table, with 3 points for a win, plus per-game bonus points (manually entered).
* Generic Points (2 Points) with Bonus Points - Generic points table, with 2 points for a win, plus per-game bonus points (manually entered).
* ISF Softball - Standings table to match International Softball Federation (ISF) rules

and finally (especially for gnrtoucan (Roy Collins)):
* Australian Rules Football (AFL) - Standings for the AFL version of Australian Rules
* Australian Rules Football (SANFL) - Standings for the SANFL version of Australian Rules

Choose the corect plugin
----------------------------------------------------
You can select the standings table format you require from the Season Edit page, as well as see a longer description of what the current standings format is.

This is available per-season, so if you are running a site for multiple sports you can have different standings table formats for different seasons.

Note for Users of Custom templates
----------------------------------------------------
This change has required some changes to the templates, so if you have custom templates for edit_game.tpl, edit_season.tpl, standings_item.tpl, standings.tpl, or view_game.tpl then you will need to make some changes (detailed in the readme)

Making your own plugins
----------------------------------------------------
The plugins are stored in mod/leaguesite/class/standings/standings_*.tpl

All plugins must:
* be named standings_*.tpl
* implement a class called LEAGUESITE_standings_* (where the *'ed part of the filename and the class name are identical.
* the class must extend LEAGUESITE_standings_base (standings_base.php) (or a descendant thereof)
* the class must implement:
- getDescription()
- getShortDescription()
* the class may implement:
- getHeadings()
- getFieldClasses()
- getUseBonusPoints()
- getStandingsArray()

I think the comments for these functions give a pretty good description of what they are required to do. Additionally, the existing plugins should provide a good base to 'borrow' from!

And of course, once your plugin is working well, please contribute it back to the project as a patch or even just email it to me (see my profile for the address).

If you have any further questions about how to develop plugins I will try to keep on top of the forums so feel free to ask questions there.

If I can't make my own plugin
----------------------------------------------------
If you want a sport added to the list of plugins, but won't be able to do it yourself, then please feel free to add an RFE for it. Before I will be able to do anything I will need:
* What columns are in the table
* How they are calculated
* How the ordering is done (e.g. points, then goal difference, then goals for, then 'coin toss' etc.).

That's it
----------------------------------------------------
That's it for this overly long news item. Hope you liked it ;)

Posted by Richard Taylor 2005-04-11

Log in to post a comment.