Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-30-2004, 08:49 AM
Milez Milez is offline
 
Join Date: Jan 2002
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Reputation System a bit Lacking?

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:
Reply With Quote
  #2  
Old 01-30-2004, 01:44 PM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Suggest u check out http://www.mysql.com/doc/en/Date_and...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.
Reply With Quote
  #3  
Old 01-31-2004, 08:45 AM
Milez Milez is offline
 
Join Date: Jan 2002
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 01-31-2004, 09:58 AM
Milez Milez is offline
 
Join Date: Jan 2002
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 01-31-2004, 10:04 AM
Milez Milez is offline
 
Join Date: Jan 2002
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
Code:
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!
Reply With Quote
  #6  
Old 01-31-2004, 11:12 AM
Milez Milez is offline
 
Join Date: Jan 2002
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Milez
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:
Code:
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?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:59 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03681 seconds
  • Memory Usage 2,214KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete