Log in

View Full Version : Default Rep Power 10 at Registration


CoffeeLovesYou
12-21-2011, 08:52 PM
How can I make the default rep power 10 for every user when they register? And how can I make it 10 for the people who already registered on my board??
I know a site that did this, so don't tell me it's impossible. When someone registers, they start with 10 rep power. How is this possible?

kh99
12-21-2011, 09:20 PM
Well, it looks like rep power is calculated by starting with 1 and adding on to it for # of posts, days registerd, and reputation. So if you wanted to start with 10 instead of 1 you could make a plugin using hook reputation_power and this:

if ($reppower != 0)
$reppower += 9;


The check for 0 is because $reppower is set to 0 in certain cases (like they haven't met the minimum # of posts yet).

As for setting it for people already on your board, they're still going to have theirs calculated as mentioned above, they'll just get 9 more on top of that. I'm not sure if that's what you want to do, especially if you allow negative reputation.

CoffeeLovesYou
12-22-2011, 04:48 AM
Ooo! Thank you!! That worked :D
I do not allow Neg Reputation. It was a real pain trying to balance rep when ppl started at 1 rep power and you dont get another "rep pip" until like, 50 or whatever I have it set to.

HMBeaty
12-22-2011, 04:58 AM
you dont get another "rep pip" until like, 50 or whatever I have it set to.
Actually, if you have a look at /includes/functions_reputation.php, you get 1 reputation pip for every 100 reputation points ;)

CoffeeLovesYou
12-27-2011, 09:48 PM
Actually, if you have a look at /includes/functions_reputation.php, you get 1 reputation pip for every 100 reputation points ;)
I am using Extended Reputation Display so it tweaked all of that lol. Merry Christmas to both of you, thanks for helping.