Not tested myself, but should work - try this:
In functions.php, find:
PHP Code:
$post[off]=bbcodeparse($post[off],0,$allowsmilies);
UNDERNEATH, add:
PHP Code:
// Get referrals
if ($usereferrer) {
$refcount = $DB_site->query_first("SELECT count(*) AS count
FROM user
WHERE referrerid = '$post[userid]'");
$referrals = $refcount[count];
}
Then, in your postbit, add this anywhere you like to show the referral count:
Code:
Referrals: #$referrals
Should work! However, this will add an extra query per post in a thread to the showthread page. There's no real way around this unfortunately, since the referral count needs a query to COUNT the variable from the database.