- Thanks received
- 6,086
calculate_reputation_points(system, user, is_giving_negative_reputation) {
if (user.postcount < system.minimum_postcount OR user.reputation < system.minimum_reputation) {
return 0;
}
points = 1;
points = points + integer_value(user.postcount / system.postcount_power);
points = points + integer_value(user.reputation / system.reputation_power);
points = points + integer_value(user.days_since_joining / system.length_of_service_power);
if (is_giving_negative_reputation) {
points = integer_value(points / 2);
if (points < 1) {
points = 1;
}
points = -points;
}
return points;
}
Here's a pseudocode representation of the function that calculates points when a user gives reputation:
Code:calculate_reputation_points(system, user, is_giving_negative_reputation) { if (user.postcount < system.minimum_postcount OR user.reputation < system.minimum_reputation) { return 0; } points = 1; points = points + integer_value(user.postcount / system.postcount_power); points = points + integer_value(user.reputation / system.reputation_power); points = points + integer_value(user.days_since_joining / system.length_of_service_power); if (is_giving_negative_reputation) { points = integer_value(points / 2); if (points < 1) { points = 1; } points = -points; } return points; }

Here's a pseudocode representation of the function that calculates points when a user gives reputation:
Code:calculate_reputation_points(system, user, is_giving_negative_reputation) { if (user.postcount < system.minimum_postcount OR user.reputation < system.minimum_reputation) { return 0; } points = 1; points = points + integer_value(user.postcount / system.postcount_power); points = points + integer_value(user.reputation / system.reputation_power); points = points + integer_value(user.days_since_joining / system.length_of_service_power); if (is_giving_negative_reputation) { points = integer_value(points / 2); if (points < 1) { points = 1; } points = -points; } return points; }
Cool. What are the values of system.postcount_power, system.reputation_power and system.length_of_service_power?
The defaults are 100 days = 1 point, 500 posts = 1 point, and 100 rep = 1 point, but they're configurable so admin could have changed them.
The defaults are 100 days = 1 point, 500 posts = 1 point, and 100 rep = 1 point, but they're configurable so admin could have changed them.
Does that mean I'm worthless until 500 posts!?!