ResaleBroker
06-22-2005, 05:39 PM
IMO, "referrals" are the best form of promotion and VB is already set up with "referral links".
I wanted to make it easy for VB forum members to find these links while at the same time having the capability to deliver a sales message so I put together this quick and easy template modification: Referral ID in User CP (http://www.vbulletin.org/forum/showthread.php?threadid=90849)
Take advantage of this additional opportunity to promote your forum. ;)
theMusicMan
06-23-2005, 12:44 PM
Yes indeed.... have added this to my site too! Thanks for the heads up on it.
ResaleBroker
06-23-2005, 10:01 PM
Ok, I finished Referral ID in User CP (http://www.vbulletin.org/forum/showthread.php?t=90849) (v1.1) tonight. This new version allows you to customize the referral message in the vBulletin Phrase Manager. Enjoy, and don't forget to click "install". ;)
Hoojie
08-10-2005, 05:50 AM
Nice one Jeff - we will install it today.
Am I correct in assuming that it hooks into an existing affiliate system in VB?
ResaleBroker
08-10-2005, 06:55 PM
Thanks for the positive feedback. :)
Dan, this mod does not hook into any existing affiliate systems. Until I read your post the thought hadn't crossed my mind. It simply displays the VB referral code for each user.
ResaleBroker
12-07-2005, 08:17 AM
Ah Crap! A glitch in this mod was recently brought to my attention. "$referrals" does not echo/print from the USERCP template. I believe this is because the usercp.php file does not contain a script that pulls the required information from the database.
There is a script in the member.php file [REFERRALS] that pulls this information but I was not successful in getting it to work in the usercp.php file.
Would any fine REW members be willing provide a usercp.php file hack to get this to work? Of course, credit will be given in the original vbulletin.org thread. :cool:
noppid
12-07-2005, 09:29 AM
hehe, you need a query to count the referrals, they are counted dynamically.
Add a hook with this code to pull the data.
// REFERRALS
$refcount = $db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "user WHERE referrerid = '".$vbulletin->userinfo['userid']."'");
$referrals = vb_number_format($refcount['count']);
Add the hook to "usercp_complete". I tested it and it works. Thanks for the cool hack.
ResaleBroker
12-07-2005, 10:46 AM
Hello Noppid, thank you for the help. How can I get this to work in 3.07?
noppid
12-07-2005, 10:54 AM
Hello Noppid, thank you for the help. How can I get this to work in 3.07?
Dang! I didn't even notice you guys were playing with 3.0.x. Anyway...
Edit usercp.php
locate:
eval('$HTML = "' . fetch_template('USERCP') . '";');
add above:
// REFERRALS
$refcount = $DB_site->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "user WHERE referrerid = '".$bbuserinfo['userid']."'");
$referrals = vb_number_format($refcount['count']);
ResaleBroker
12-07-2005, 10:58 AM
Awesome! That works great! Thanks a million! :)
noppid
12-07-2005, 12:25 PM
Awesome! That works great! Thanks a million! :)
I have the product for this hack to be used on vB 3.5.x ready to post. Holler if ya want it or let me know if it's ok to post it.
Thanks
ResaleBroker
12-07-2005, 03:49 PM
I have the product for this hack to be used on vB 3.5.x ready to post. Holler if ya want it or let me know if it's ok to post it.
ThanksHey Noppid, thanks again for the help. I have to admit that all day I've been cussing at myself for not figuring out where that 3.0.x code went. My wife said it's good for my ego. (Yeah right!)
I've updated the instructions to include both the 3.0.x and 3.5.x versions. Did you have something else in mind?
noppid
12-07-2005, 04:00 PM
Hey Noppid, thanks again for the help. I have to admit that all day I've been cussing at myself for not figuring out where that 3.0.x code went. My wife said it's good for my ego. (Yeah right!)
I've updated the instructions to include both the 3.0.x and 3.5.x versions. Did you have something else in mind?
Yeah, the 3.5 version is a product, it needs to be a seperate thread at vb.org though. I didn't want to post it without your permission though.