I spent quite a bit of time yesterday trying to understand the karma equation (Pligg's, not the universe's), but ultimately abandoned it because of this one factor: a user who had registered and posted a single link that day had the highest karma of any user on my site -- many of whom had been submitting, voting, and commenting regularly. Maybe it will be different when my Pligg-powered site is getting 1,000 (or 10,000) visits/day (rather than 100), but right now the built-in karma function doesn't provide the results I'm looking for.
So today I wrote my own. It's pretty basic, but I wanted to share it because it will be easy for others to modify to suit their particular situation.
A few notes:
1. It uses a pure points system, not a 1 to 20 scale like the original karma. (There may be a good reason for the scale, so I may change that later.)
2. For my site, I'm outputting a Top Contributors list to a text file for display in the sidebar so we don't hit the database on every page load. If you want to do that, you'll need to change the location of the text file in the fopen command near the end to match whatever you want to use. If you don't want to create the file, you can delete everything after "Output the List."
3. The variables at the top control the scores. You'll definitely want to adjust those based on what habits you want to encourage in your users.
I know I've forgotten something, so let me know if you have questions!



Reply With Quote





