vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Default Rep Power 10 at Registration (https://vborg.vbsupport.ru/showthread.php?t=275774)

CoffeeLovesYou 12-21-2011 08:52 PM

Default Rep Power 10 at Registration
 
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:

Code:

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

Quote:

Originally Posted by CoffeeLovesYou (Post 2279972)
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

Quote:

Originally Posted by HMBeaty (Post 2279973)
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.


All times are GMT. The time now is 03:56 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.01081 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete