News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Reputation points (change the points added or substracted)

Started by noaccess, March 13, 2011, 10:00:24 AM

Previous topic - Next topic

noaccess

Currently in SMF 2RC5 when you rep someone, it adds only +1 or -1. I want to change this amount, where do I do that?

Justyne

How do you mean?

Do you want to change it so that every time somebody is given reputation they receive say, five points?

Or do you want to just this once give somebody more than one point on some occasions but not on others?
Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.

noaccess

The first thing you said. However, I also want to see if it's possible to add an if statement to make the amount of points the user can give, depend on the usergroup of the giver.

kat

If you look at karma.php, in your Sources directory, you'll see these lines:

// Applauding or smiting?
$dir = $_REQUEST['sa'] != 'applaud' ? -1 : 1;


Logic says that changing the "-1" and the "1" would change the increments.

Not idea how to make that user-definable, though, I'm afraid.

noaccess

I changed those numbers to -10 and 10. However, its effect was that both buttons on the forum subtracted -1 from the reputation. So I changed it back.

Advertisement: