PDA

View Full Version : Where is the $referrals


Sketch
07-11-2002, 04:06 PM
Okay, I'm slightly confused and pretty much peeved. I don't have time to delve into this code much more than I already have. I see on my profile on my site that I have 4 referrals. I have not made any link referrals anywhere so these referrals have to be coming from somewher.

1. Where is the existing code to add referrals to the database? I can write code from scratch to do what I WANT it to do, but I'd rather work within the vB framework if for no other reaosn so I don't get my wires crossed.

2. Theres a tempolate variable, $referrals, in my getinfo template. This is the portion that displays the referral count in my profile. This appears to be a reference to the getinfo_referrals template. So in THAT template, there is a call to $referrals again. WHERE is this variable defined?

Thanks for helping me sort this.
Sketch

Xenon
07-11-2002, 04:10 PM
its defined in member.php ;)

Sketch
07-11-2002, 04:42 PM
thanks, now if I can just get home to be able to FTP I'd be set. :)

Admin
07-12-2002, 05:46 AM
// Get referrals
if ($usereferrer) {
if ($backcolor=="{firstaltcolor}") {
$backcolor="{secondaltcolor}";
$bgclass = "alt2";
} else {
$backcolor="{firstaltcolor}";
$bgclass = "alt1";
}
$refcount = $DB_site->query_first("SELECT count(*) AS count
FROM user
WHERE referrerid = '$userinfo[userid]'");
$referrals = $refcount[count];
eval("\$referrals = \"".gettemplate("getinfo_referrals")."\";");
} else {
$referrals = '';
}

Xenon
07-12-2002, 11:42 AM
chen you shoul disable parsing of replacements in posts, ist a problem as you can see ;)
also in txt attachments...