WordPress.org

Ready to get started?Download WordPress

Forums

LeagueManager
0 Score added. (5 posts)

  1. cezza01
    Member
    Posted 10 months ago #

    Sorry If I've missed something but this update has added a '0' to all my incomplete matches and the table now shows that they have been played.

    Any ideas?

    Thanks!

    https://wordpress.org/plugins/leaguemanager/

  2. LaMonte Forthun
    Member
    Plugin Author

    Posted 10 months ago #

    Yeah, one idea, what I thought was a good idea turns out wasn't such a good idea... I'll push an update tonight to fix it, but in the mean time, do this if you want:

    Go to the matches.php file in the admin folder of the LeagueManager plugin and replace this line (line 71):

    <input class="points" type="text" size="2" style="text-align: center;" id="home_points_<?php echo $match->id ?>_regular" name="home_points[<?php echo $match->id ?>]" value="<?php echo (isset($match->home_points) ? $match->home_points : 0) ?>" /> : <input class="points" type="text" size="2" style="text-align: center;" id="away_points[<?php echo $match->id ?>]" name="away_points[<?php echo $match->id ?>]" value="<?php echo (isset($match->away_points) ? $match->away_points : 0) ?>" />

    with this:

    <input class="points" type="text" size="2" style="text-align: center;" id="home_points_<?php echo $match->id ?>_regular" name="home_points[<?php echo $match->id ?>]" value="<?php echo (isset($match->home_points) ? $match->home_points : '') ?>" /> : <input class="points" type="text" size="2" style="text-align: center;" id="away_points[<?php echo $match->id ?>]" name="away_points[<?php echo $match->id ?>]" value="<?php echo (isset($match->away_points) ? $match->away_points : '') ?>" />

    You are basically removing a 0 in two places and replacing it with '', one at the very end and one in the middle.

    If you updated scores and have unplayed matches that have zeros in the score, you'll need to delete the zeros (just in the score) and update matches again. That will reset the played column in your standings.

    I apologize, as I worked through the large number of updates I just finished, I thought adding the zeros to the unplayed matches looked good, what I didn't notice as I tested it was that it triggered the 'played' flag. I would consider making 0-0 scores to be considered not played, that's a possible score in a number of sports, so it just won't work. I've fixed it in the code and will update the release version shortly.

    I apologize for the inconvenience.

  3. cezza01
    Member
    Posted 10 months ago #

    Thanks for the quick response LaMonte.

    I'll have a go shortly.

  4. BKickers
    Member
    Posted 10 months ago #

    Just noticed the problem had been already reported and is being discussed here.
    Since I am still facing the same problem, I wonder whether the update had been done already and I still have another issue or do we still have to wait? Would like to have it fixed by myself as described above but as a "once in a while user" who is just managing content on his own webpage I couldn't find the right location to do the copy&paste stuff. Anyway,thanks for helping and working on the problem.

  5. LaMonte Forthun
    Member
    Plugin Author

    Posted 10 months ago #

    I'll get it released later today, I've been away from LeagueManager for a couple of days on a pressing issue with another project, but will be able to get back to it now.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.