Home > Plugins > Supercool dynamic Match Statistics

Supercool dynamic Match Statistics

I have decided to add another feature, which I think is really cool. It is now possible to add dynamically statistics, similar to FormFields in ProjectManager. Available fields are “text” and “roster”, which adds a popup box if there is a Team Roster active.  The statistics are automatically displayed in the single match view and also added to ProjectManager FormFields. However the hook into ProjectManager only counts occurences of a value for given user, so this will work for goals, but not if you want to insert points and display the summary of these. This could be achieved by setting up a customized function.

Here’s a short description of the structure. This is only important if you want to programme custom templates or functions for ProjectManager FormFields. The statistics are merge with the $match object whereas the key is the sanitized name of the stat. Suppose you add statistics called Goals, they can be access by

$match->goals

This is an assoziative array which stores the name and fields of this statistic. You can see the contents of the variable by doing

var_dump($match->goals);

Anybody interested can also have a look at view/match.php

Kolja Schleich Plugins ,

  1. adam
    June 9th, 2009 at 16:39 | #1

    begin time for games. would be nice to be able to choose other minute times. We have games that start 20 after hour. I really enjoy leaguemanager. Still getting acquinted with it. Thank you!

  2. June 10th, 2009 at 00:33 | #2

    For some reason i can´t upload team-logos anymore. Is there something wrong with the new version that is causeing this?

    I was able to upload logos earlier today.

    Great plugin btw!

  3. Kolja Schleich
    June 10th, 2009 at 20:23 | #3

    Sorry for the inconvenience. It should work again with the newest version.

  4. June 12th, 2009 at 22:44 | #4

    Hello Kolja,

    with the League Manager you have built an awesome plugin. I was searching for a plugin that manages team statistics then found yours. Now I want to use it on my blog giants.gu-fans.de, but I wonder if there is an easier method to insert game parings than the web formular in the administration. (I have to add 18 game days in a league with 10 teams)

    Greetings,
    Chris

  5. Kolja Schleich
    June 13th, 2009 at 04:49 | #5

    First set up the league settings, season and teams. Then you could use the import function to import matches from a csv file. The file has to have the following structure:

    Date \t Season \t Match day \t Home Team \t Away Team \t Location \t Begin

    The date has the format YYYY-MM-DD, e.g. 2009-01-04 and Begin H:i, e.g. 15:30. You can create this file with Excel and then save it as csv file with TAB as separator.

    Hope that works ;)

  6. Nils
    June 14th, 2009 at 17:35 | #6

    Hi Kolja,
    ich nutze das irresistable Theme von WooThemes und folgendes Prob tritt nun auf: wenn Dein Plugin installiert ist, dann funktionieren im Theme die Sidebar Tabs nicht mehr. Man sieht nur noch die kleinen Icons, aber nicht mehr den dazugehörigen Inhalt.
    Kannst Du mir da weiterhelfen?
    Es liegt definitiv an Deinem LM, da mehr noch nicht installiert ist, quasi noch ganz jungfräulich. WP hab ich neueste 2.8 – vielleicht liegt es auch daran? In einer älteren Version jedenfalls tat es noch.
    Liebe Grüße, Nils

  7. June 15th, 2009 at 08:41 | #7

    @Kolja Schleich
    Hi Kolja,
    ich werde es bei Gelegenheit ausprobieren. Danke schon einmal für den Tipp. :-)

  8. July 27th, 2009 at 19:09 | #8

    Hi Kolja!

    Love the league manager plug in, but i cant figure out the statistic thing, i am not able to write any thing when i press stat behind the game score in the admin panel, i would really do that to update with goal scorers etc..

    Do you have any tips? Please reply by mail if you can ! :)

  9. August 13th, 2009 at 22:23 | #9

    Hi Kolja,

    tolles Plugin, allerdings habe ich ein Problem mit den Stats. Es lassen sich keine Felder anlegen…

    Warning: array_values() [function.array-values]: The argument should be an array in /www/htdocs/w008caff/wp-content/plugins/leaguemanager/lib/stats.php on line 264

    WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'fields, league_id) VALUES ('Test', '', '2')' at line 1]
    INSERT INTO links_leaguemanager_stats (name, fields, league_id) VALUES (‘Test’, ”, ‘2′)

  10. December 30th, 2009 at 10:29 | #10

    Hi Kolja,

    thanks you for a really great plugin. how would this feature above work if i had 2 teams.
    im trying to design a website for my local team and there is a 1st and 2nd team. some players play for the 1st team and the others play for the second team. but there are times when players get asked to play for the first and second team.

    do you have any advise for this

    Thank you

    • Kolja Schleich
      January 4th, 2010 at 14:17 | #11

      Hey,

      you could add those players to both team rosters.

  11. January 18th, 2010 at 23:29 | #12

    @jens [catenaccio] 

    May be you should try this:

    INSERT INTO `name_of_the_database`.`wp_leaguemanager_stats` (name, fields, league_id) VALUES (‘Test’, ”, ‘2′);

    Tell me if it solve the problem.

    All best,

    J.

    p.s. btw – the module is fantastic! Thanks Kolja!

  12. May 26th, 2010 at 23:09 | #13

    Hey,

    Great to see this stats functionality, thanks!

    I am, however, having some problems with it. Firstly, once i’ve added a stat I don’t seem to be able to delete it. When I do I get the error…

    Warning: Invalid argument supplied for foreach() in /public_html/wp-content/plugins/leaguemanager/lib/stats.php on line 317

    …any ideas? Secondly, how can I display these stats within the results? I can’t seem to find any documentation for this.

    thanks, Greg.

  13. June 11th, 2010 at 08:49 | #14

    Велоспортивный сайт КыргызстанаНа этом ресурсе вы сможете обнаружить всю информацию по велосипедам!

  14. June 12th, 2010 at 02:31 | #15

    Велосипедный ресурс КыргызстанаНа этом сайте вы можете отыскать всю информацию по велосипедам!

  15. June 13th, 2010 at 10:40 | #16

    Велосипедный портал КиргизииНа этом сайте вы смогете разыскать всеобъемлящую инфу по велоспорту!

  16. June 13th, 2010 at 23:58 | #17

    Вело сайт КиргизииНа этом интернет-ресурсе вы смогете обнаружить объективную инфу по вело-гонкам!

  1. No trackbacks yet.