• Resolved cmejia1978

    (@cmejia1978)


    Hi there. I was wondering about the following scenario: the WC2018 already started and many users still would like to make a late-entry to the pool; their chances to win are really low as many users have enter since the start or pre- the WC2018, so I would like to do something like this:

    first stage: 96 points total (2 points each match-48 matches)
    2nd: 192 points total (24 points each match-8 matches)
    Quarter’s: 288 points total (72 points each-4 matches)
    semi finals: 576 points total (288 points each-2 matches)
    3rd place: 1152 points total (1152 points for the match)
    final: 17 points total (17 points for the match)

    So, my question is: how could I block past scores so that when I change the score points for each match it will not affect past scores? Or is it by default so? Thanks and really, if you are in the US (CA) I really would love to grab a beer with you to show you much appreciation for this great plugin! Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author AntoineH

    (@antoineh)

    So, my question is: how could I block past scores so that when I change the score points for each match it will not affect past scores? Or is it by default so?

    Sorry, plugin does not have the option to change points for individual matches. The settings are global. So, if you change the points, the scores for previous matches will also be affected on the next ranking calculation.

    Maybe you can make things more interesting by adding extra bonus questions in the event that a lot of people enter during the tournament?

    Other option is to develop an extension that changes the points based on match type or collection of match ID’s. It is possible to hook into the score calculation.

    Thanks and really, if you are in the US (CA) I really would love to grab a beer with you to show you much appreciation for this great plugin!

    Thanks for the offer, but the US is a bit of a long drive for me from The Netherlands. Don’t think an Uber will cover that distance 😉

    Plugin Author AntoineH

    (@antoineh)

    OK, thought I’d give it a go and created an extension that allows for the definition of different points per match type. This was asked before by other users as well. Gonna try to find the related posts and direct them to this post.

    https://www.dropbox.com/s/vmmml5ektzy4mtd/football-pool-different-points-per-match-type.php?dl=0

    Have to warn that I didn’t test extensively. Just a few matches and didn’t go through all kinds of scenarios.

    The plugin needs a JSON formatted string to define the different points. Per match type you define one line in the JSON string. One line looks like this:

    "1":[2,5,2,0,0]

    First value (in quotes) is the numerical ID of the match type. After the “:” you get an array of 5 values: joker multiplier, full points, toto points, goal bonus and goal difference bonus.

    If a match type is not defined in the JSON string, then the extension will default to the values in the plugin options screen.

    The complete JSON constant should be placed in the wp-config.php.
    Example:

    
    	define( 
    		'FPX_POINTS_PER_MATCHTYPE',
    		'{
    			"1":[2,5,2,0,0],
    			"2":[4,10,4,0,0],
    			"3":[4,15,6,0,0],
    			"4":[4,20,8,0,0],
    			"5":[4,25,10,0,0],
    			"6":[4,30,12,0,0]
    		}' 
    	);
    

    Hope the above makes sense 🙂

    p.s. The ‘percentage of total score’ pie chart is not updated to this change in points that you can get. So this chart does not make sense anymore after activating this plugin. Best to hide it with CSS.

    • This reply was modified 5 years, 11 months ago by AntoineH. Reason: comment about pie chart added
    Thread Starter cmejia1978

    (@cmejia1978)

    ¡OMG, thank you so much! Well I will have to take a plane to grab that beer then! lololol thank you very much for the whole effort, much appreciated!

    I’ve downloaded the plugin and activated it. Added this to the wp-config file so let’s hope for the best 🙂
    (I hope this doesn’t introduce any calculating bugs)

    define(
    ‘FPX_POINTS_PER_MATCHTYPE’,
    ‘{
    “1”:[2,5,2,0,0],
    “2”:[4,8,3,0,0],
    “3”:[4,10,4,0,0],
    “4”:[4,12,5,0,0],
    “5”:[4,14,6,0,0],
    “6”:[4,16,7,0,0]
    }’
    );

    I think this is a good balance between golden ball multiplier and points.

    Hello,

    In plugin there are a defin at the beginning :
    <<
    if ( ! defined( ‘FPX_POINTS_PER_MATCHTYPE’ ) ) {
    define(
    ‘FPX_POINTS_PER_MATCHTYPE’,
    ‘{
    “49”:[2,4,2,0,0],
    “50”:[2,4,2,0,0],
    >>

    Could i declare the FPX_POINTS_PE_MATCHTYPE here or the only solution was to put in wp-conf.php ?

    Thank’s.

    Plugin Author AntoineH

    (@antoineh)

    You can do both. But I prefer the wp-config because you won’t overwrite your values in case you ever need to update this plugin file.

    Thank’s for the answer.

    But that don’t work for me.

    I put information in plugin directly.
    The plugin is activated.
    I make a a new ranking calculation.

    Did i forget something ?

    I have changed préfix for database and i have this pluging activated :
    -Add save button after every match
    -Extra save button at the top of the prediction form
    -Extension to only show open matches on the prediction page
    -Adds an admin page that shows a log per user of matches with predictions (without the actual prediction).
    -Change the display of the user name in the Football Pool plugin.
    -Add a user prediction import to the Football Pool plugin. Imports csv files with format: matchID;home;away (first row is ignored).
    -Adds an admin page that shows a report of users with amount of predictions.

    Plugin Author AntoineH

    (@antoineh)

    I put information in plugin directly.
    The plugin is activated.
    I make a a new ranking calculation.

    Did i forget something ?

    No, that’s basically it.
    Only thing that comes to mind, is that you can double check the match type IDs with the ones in your install.

    i make a mistake …

    I put match ID not the match type id.

    It’s ok now.

    Many thank’s.

    Make it two beers, Antoine. Thanks for this!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Change point score for every phase: ¿what will happen?’ is closed to new replies.