Viewing 1 replies (of 1 total)
  • Plugin Author J.D. Grimes

    (@jdgrimes)

    WordPoints only allows for points to be integers, it doesn’t allow decimals. I do not have plans to change that in the near future, because it would take a lot of work. But if it is a feature that users want, I will begin making the code changes necessary to support the feature one day.

    For now, there are two things that you can do.

    One option is just to change the way that you value your points. Instead of giving 0.1 points for a comment, give 1 points for a comment, but multiply all of your other points hooks by 10.

    In addition, it is also possible to change the way that points are formatted when they are displayed. It is possible to add the decimal when the points are being displayed, so that your users will see the comment points as 0.1 in the logs, even though the value that you will see in the points hook settings will be 1 point.

    This might be a solution for you if you have just started using WordPoints. However, if you have been using WordPoints for awhile already you will need to also change the points values for all the users in the database. You will need to multiply their points by 10, or else if they had 1234 points before, they will only have 123.4 when you begin formatting the points with a decimal.

    There are probably also other side-effects from formatting the points with a decimal that would be unexpected. I have not tested it, so I don’t know what might happen. 🙂

Viewing 1 replies (of 1 total)

The topic ‘Points with decimals’ is closed to new replies.