Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
referrals adding to rep power hack Details »»
referrals adding to rep power hack
Version: 1.00, by Carnage Carnage is offline
Developer Last Online: Sep 2014 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 01-05-2005 Last Update: Never Installs: 2
Is in Beta Stage  
No support by the author.

something i've litrally just finished coding. it seems to work ok, but since very few people on our board have referral counts high enough to make much effect on their rep power, i thought some other people may be able to help me test it some more.
i've not got an instal script yet and since i'm not really supporting the hack, it would be better if you have some knowledge of php/sql before installing.

file: includes/functions_reputation.php
edits made to function 'fetch_reppower' (the first one)
find:
Code:
global $vboptions;
replace with:
Code:
global $vboptions, $DB_site;
find:
Code:
                if ($vboptions['rdpower'])
                {
                        $reppower += intval(intval((TIMENOW - $userinfo['joindate']) / 86400) / $vboptions['rdpower']);
                }
insert after:
Code:
                if ($vboptions['rfpower'])
                {
                        $ref = $DB_site->query_first("SELECT COUNT(userid) AS count 
                                                      FROM " . TABLE_PREFIX . "user 
                                                      WHERE referrerid = '$userinfo[userid]'
                                                      AND usergroupid != 8
                                                      AND posts > 10
                                                     ");
                        $reppower += intval((log($ref[count]*2)/log(2))/$vboptions['rfpower']);
                }
then you will need to run these database queries, if your tables have a prefix, you need to add it into the query, as i copied these straight from phpmyadmin.

Code:
INSERT INTO `setting` ( `varname` , `grouptitle` , `value` , `defaultvalue` , `optioncode` , `displayorder` , `advanced` , `volatile` ) 
VALUES (
'rfpower', 'reputation', '1', '1', '', '91', '0', '1'
);

INSERT INTO phrase (phraseid, languageid, varname, text, phrasetypeid) 
VALUES 
('', 0, 'setting_rfpower_desc', 'Changes how a users referrals effects their rep power the higher the value the more referrals are needed to get an effect. Set to 0 to disable', 5000),
('', 0, 'setting_rfpower_title', 'How should referrals alter rep power', 5000);
now i'm hoping this will work perfectly, my code usually does, if not drop me a note in this thread include as full an error report as possible. If i get no bugs, i'll add a few more options to it (specifying min posts for users to count towards referrals and allowing other banned groups to be specified)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-07-2005, 06:30 AM
kisersose kisersose is offline
 
Join Date: Jun 2004
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ill give this a shot tomorrow and let you know how it went.

thanx
Reply With Quote
  #3  
Old 01-23-2005, 11:26 AM
Elfo King Elfo King is offline
 
Join Date: Apr 2003
Location: Pisa-Italy
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I need to add point at rep.point not at the rep power.
(invite use to present the community )
Are possible?
:nervous:
Reply With Quote
  #4  
Old 01-25-2005, 04:16 PM
Elfo King Elfo King is offline
 
Join Date: Apr 2003
Location: Pisa-Italy
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Up...i need help pls ....any :P
Reply With Quote
  #5  
Old 01-25-2005, 08:16 PM
Carnage Carnage is offline
 
Join Date: Jan 2005
Location: uk
Posts: 760
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmmm adding to rep with a referal is do-able i'll have a go at it.
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 01:00 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04850 seconds
  • Memory Usage 2,236KB
  • Queries Executed 18 (?)
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
  • (5)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (5)postbit_onlinestatus
  • (5)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