The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Adding Referral Count to User Stats
Hi folks,
How would I go about adding "Referrals:" to the user stats at left (locatin, registered since, and posts, etc..) I have installed the Refer Friends hack and want to add the # of referrals to this info. Also is there a variable ($referrals ??) that would present the users total referrals within the user stats on every post. Thanks for any help. Greg |
#2
|
||||
|
||||
Not tested myself, but should work - try this:
In functions.php, find: PHP Code:
PHP Code:
Code:
Referrals: #$referrals |
#3
|
|||
|
|||
Thanks for your reply Erwin!
I looked and looked for the snippet of code (an probably missed it :cross-eyed: ) to no avail.. (functions.php in VB 2.2.8) Can you give me an idea where it may be? I did post the code on the 248-255 but it didn't work. I have the postbit taken care of. Here's my code: Quote:
Thanks a bunch! Greg |
#4
|
|||
|
|||
bump
|
#5
|
||||
|
||||
Put the code in functions.php exactly where I say to put it - that line of code was taken from functions.php 2.2.8 unhacked - and then remember to edit your postbit template. It should work.
The referral count needs to be specifically queried from the database for the postbit. |
#6
|
|||
|
|||
Okay... I still cannot find that "exact" line of code. I even performed a find and replace in Dreamweaver after manually scrolling 2300 plus lines and it wasn't found. Then I pulled a fresh vb.zip for the functions.php file (figuring maybe a hack modified it) and still no match.
Either I'm nuts, blind, or that code is not in there There is no code that starts with $post[off] whatsoever in the functions.php version 2.2.8. Please advise?!? Thanks for your time, Greg |
#7
|
||||
|
||||
Sorry, vB.org parsed the code I used.
Try to find this in functions.php instead: PHP Code:
See if that works. |
#8
|
|||
|
|||
Okay.. found the code but it didn't work The Referrals: # shows up in my postbit but it's not logging the $referrals number.
Code:
} else { $post[pmlink] = ""; } // Get referrals if ($usereferrer) { $refcount = $DB_site->query_first("SELECT count(*) AS count FROM user WHERE referrerid = '$post[userid]'"); $referrals = $refcount[count]; } eval("\$post[profile] = \"".gettemplate("postbit_profile")."\";"); eval("\$post[search] = \"".gettemplate("postbit_search")."\";"); eval("\$post[buddy] = \"".gettemplate("postbit_buddy")."\";"); Code:
<smallfont>Registered: $post[joindate]<br> Location: $post[field3]<br> Posts: $post[posts]<br> Total Referrals:#$referrals<br><br> Certifications: <br>$badge $badge2 $badge3<br> $onlinestatus</smallfont></td> <td bgcolor="$post[backcolor]" width="100%" |
#9
|
||||
|
||||
Try this code instead:
PHP Code:
Then, in your postbit template, try this: Code:
Referrals: #$refcount[count] |
#10
|
|||
|
|||
Hi Erwin,
I made the changes... now when I click on a thread it gives me: Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|