PDA

View Full Version : Reputation System a bit Lacking?


Milez
01-30-2004, 08:49 AM
First let me say that if this would work properly it would be the coolest new feature in VB3, and it nearly does work properly, more so on a new VB3 board.

Ive seen some good questions asked that none of the developers are answering that are really preventing me from opening my upgraded board with the Rep system turned on.

Question 1: Unfortunately VB3 currently does not upgrade a board to reflect reputation scores based on post count, join date etc. I would imagine the developers will make this a feature of the final version of VB3. I have been desperate to try and build a query to edit all user's rep scores based on criteria assigned in the admincp. IE: 1 point for every 90 days. 1 point for every 500 existing posts etc. A query based on posts is not so hard:

UPDATE user SET reputation= posts/500;

But what about the rest of the criteria - Like joindate? This has me stumped.

Question 2: I am also worried that by adjusting everyones rep score by seeding the results in this way that the rep power giving points will not relect these changes. Is that the case? Also, will it screw anything else up if I adjust these values?

Anyways if the Rep system is not yet ready to use on an upgraded board the way I and others have asked about thats fine, I will turn the feature off until the Gold version arrives. Please let me know if that is the case. However, if it's just a matter of a simple query can someone lend me a hand with it? I would be VERY grateful as I am sort of just waiting for a solution to this before I can open my upgraded board.

Thanks for reading!
:ermm:

Natch
01-30-2004, 01:44 PM
Suggest u check out http://www.mysql.com/doc/en/Date_and_time_functions.html <- MySQL has the facilities to take the value of joindate and subtract it from NOW() in the query - so u can get your value for reputation by:

UPDATE user SET reputation = reputation + (((NOW()-joindate)*(60*60*24)) / 90 )

Or something of the sort.

Milez
01-31-2004, 08:45 AM
Hey thanks for the reply Natch.

I checked out the Mysql manual on the Now() operand and found it a bit confusing.

UPDATE user SET reputation = reputation + (((NOW()-joindate)*(60*60*24)) / 90 )

This should seed the reputation table with 1 point for every 90 days registered correct? So basically I can run my initial query:

UPDATE user SET reputation = posts/500

Then run your query. I will backup my database and give this a shot tonite! Thanks for the help ;)

Milez
01-31-2004, 09:58 AM
Ouch that didn't work. Every user now has a reputation score of 32767.

Natch: Let me know if you have any ideas to fix that query. I will get back to the drawing board.

Milez
01-31-2004, 10:04 AM
I should also point out that after unning the first query:

UPDATE user SET reputation= posts/500

...all of the users reputation scores were adjusted properly however none of the users reputation power scores were changed at all. I know the rep power scores are calculated at run time but so I don;t see how these values don't get adjusted.

As an example here is a list of users both before and after running the above query:

BEFORE:
User | Reputation | Rep Power
-------------------------+----------------+--------------------
user1 10 7
user2 1000 10
user3 30 11
user4 10 16
user5 10 7
user6 10 4
user7 10 10
user8 10 0
user9 10 8

AFTER:
user1 14 7
user2 1004 10
user3 43 11
user4 34 16
user5 17 7
user6 10 4
user7 20 10
user8 12 10
user9 17 8


...Hope this helps!

Milez
01-31-2004, 11:12 AM
I should also point out that after unning the first query:

UPDATE user SET reputation= posts/500

...all of the users reputation scores were adjusted properly however none of the users reputation power scores were changed at all. I know the rep power scores are calculated at run time but so I don;t see how these values don't get adjusted.

As an example here is a list of users both before and after running the above query:

BEFORE:
User | Reputation | Rep Power
-------------------------+----------------+--------------------
user1 10 7
user2 1000 10
user3 30 11
user4 10 16
user5 10 7
user6 10 4
user7 10 10
user8 10 0
user9 10 8

AFTER:
user1 14 7
user2 1004 10
user3 43 11
user4 34 16
user5 17 7
user6 10 4
user7 20 10
user8 12 10
user9 17 8


...Hope this helps!
This query will work for seeding the reputation scores based on joindate. In my example I give a user a rep point for every 180 days registered:

UPDATE user SET reputation = reputation + ((UNIX_TIMESTAMP()-joindate)/(86400))/90)

Anyone know why the rep power scores are not relecting the adjustments made by these 2 queries?