You’re stepping into a hornets nest with this line of questions!
The last two weeks I’ve been working on the tie function, have a look at this:
http://wordpress.org/support/topic/team-ranking?replies=28
and you’ll see what we’ve been talking about.
I’m looking to change the isTie() function and pulling it out of core.php, so that what you’re seeing goes away. The plan is to create a series of tie break options that each user would be able to select on an as-needed basis.
That’s all fine and well, I just need to get over one technical hurdle and then I’ll be working on starting the library of tie-breaker options. The two team ties will be fairly simple, it’s when we get into multiple teams things get a bit dicey.
What sport are you working with? Do you have any code that you feel could be considered for inclusion in the core product?
Glad you like LeagueManger and hope to make things work even better (keep in mind, I didn’t write the core product, but have been added on over the last month for support and enhancements).
LaMonte
That sounds like a better solution as it probably needs that extra layers of granularity when ranking the teams.
The sport I am working with is Crown Green Bowls and I am happy to contribute back if you feel that my templates are suitable. This is the first time I have posted on wordpress forums, is there a way I can send private message explaining the templates so that it doesn’t clog up your support board?
One final question I have is regarding the templates. I have created a template to display fixtures in a slightly different way and I wanted to override the “match.php” so that instead of just seeing the score “6-4” I also can see the chalks which I am storing in the custom field?
Is there a way to implement my own “Match.php” display in a template fashion like the main “matches-xxx.php”
Thanks again
If you’ve got some code you’d like to send me, send it to lamontef (at) yahoo (.) com
If you have a template you want to replace, you have two options (from the documentation):
If you want to modify existing templates copy it to
your_theme_dir/leaguemanager/
The plugin will then first look in your theme directory. Further it is possible to design own templates, e.g. multiple standings templates. Assume you create a template called standings-sample1.php. To load this template use the following code.
[standings league_id=ID template=sample1]
I’ve actually never put a template in the theme directory, I always rename so things are all in the same location and it’s easier to keep track.
The nice thing about LeagueManger is that Kolja (the developer) made it very modular, so you can add items based on your sport file and add templates that suite your needs. I think a lot of users (myself included) think that modifying core code is necessary when making changes. I can’t tell you how much I’m backtracking now that I’ve been working on the core and have a very worn out installation that I’ve tweaked to work for me. Now I’ve had to go back in and pull things out that I added to the database when I didn’t need to, modified core code I didn’t need to, etc., etc.
What code can I add to core.php so that a tie would rank the tieing teams according to PCT rather than their Team#?