View Full Version : Referrals In Postbit
Developer
02-20-2006, 10:00 PM
Number Of Referrals In Postbit
Version 1.1.0
Description::.
This hack shows in postbit Number Of Referrals[Requested By cmiller1014 (https://vborg.vbsupport.ru/member.php?u=56624) ]
Hack Features::.
1-easy yo install
[See Screen Shot]
Installation::.
1-Import The product.
2-run this script admincp/misc.php?do=referrals to insert number of referrals into the new field
3-Edit Template postbit
Find:
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
Add after it
<if condition="$vboptions['usereferrer']">
<div class="smallfont">
<strong>$vbphrase[referrals]</strong> $post[referrals]
</div>
</if>
2-Edit Template postbit_legacy
Find:
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
Add after it
<if condition="$vboptions['usereferrer']">
<div class="smallfont">
<strong>$vbphrase[referrals]:</strong> $post[referrals]
</div>
</if>
History::.
1.0.0 On 21. Feb 2006 Initial Version.
1.1.1 On 26 Apr 2006 Fix Major BUG.
Hack Languages::.
English
Details::.
2 plugins, 3 phrases, 0 option, 0 query
Donation::.
Feel Free To https://vborg.vbsupport.ru/external/2010/09/1.gif (https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=filmahosting%40gmail%2ecom&item_name=DEVELOPER&item_number=1&no_shipping=0&no_note=1&tax=0¤cy_code=USD&bn=PP%2dDonationsBF&charset=UTF%2d8)
aT lAsT::.
IF YOu lIkE iT cLIcK INSTALL
vbulletin.orghttps://vborg.vbsupport.ru/ (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=108558)[/B]
Support Given For Who Clicked Install {ONLY}
bashy
02-21-2006, 06:56 PM
Hi m8
Me again, tis sommat about your hacks :)
Anyway just installed this (im gonna have to stop this soon lol) and
i can see the number of refferrals but not the phrase...
I only see e.g. :4
I have edited both templates and imported the plugin :)
Sorry m8 lol....
LadyJo
02-21-2006, 07:46 PM
same thing is happening to me. ON people who have no referrals its blank, no number, and all we see is :
Mr Chad
02-21-2006, 11:15 PM
same thing is happening to me. ON people who have no referrals its blank, no number, and all we see is :
Add an if condition... If X > 0
proxx
02-21-2006, 11:26 PM
Add an if condition... If X > 0
what do you mean? where to add and how?
I have teh same problem
proxx
02-22-2006, 02:09 AM
I am getting this problem:
Database error in vBulletin 3.5.2:
Invalid SQL:
SELECT COUNT(*) AS count FROM user WHERE referrerid =;
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Error Number : 1064
Date : Tuesday, February 21st 2006 @ 09:50:38 PM
Script : http://***/showthread.php?p=6720
Referrer :
IP Address : 65.54.111.69
Username : Unregistered
Classname : vb_database
redspider
02-22-2006, 02:39 AM
Hi m8
Me again, tis sommat about your hacks :)
Anyway just installed this (im gonna have to stop this soon lol) and
i can see the number of refferrals but not the phrase...
I only see e.g. :4
I have edited both templates and imported the plugin :)
Sorry m8 lol....
Same issue here...
redspider
02-22-2006, 04:25 AM
Here is the fix...
In postbit template
Find:
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
Add after it
<if condition="$vboptions['usereferrer']">
<div class="smallfont">
Referrals<strong>$vbphrase[referrals]:</strong> $developerref
</div>
</if>
In postbit_legacy template
Find:
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
Add after it
<if condition="$vboptions['usereferrer']">
<div class="smallfont">
Referrals<strong>$vbphrase[referrals]:</strong> $developerref
</div>
</if>
bashy
02-22-2006, 05:20 AM
Cheers m8 working fine now!!
Floris
02-22-2006, 10:14 AM
That looks cool! Nice to have :) Nice postbit too btw ;)
proxx
02-24-2006, 02:33 AM
could someone tell me how to fix this error, i get many of these emailed to me:
Database error in vBulletin 3.5.2:
Invalid SQL:
SELECT COUNT(*) AS count FROM user WHERE referrerid =;
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Error Number : 1064
Date : Tuesday, February 21st 2006 @ 09:50:38 PM
Script : http://***/showthread.php?p=6720
Referrer :
IP Address : 65.54.111.69
Username : Unregistered
Classname : vb_database
Lea Verou
03-04-2006, 09:31 AM
Doesn't this add one query to EACH post? :confused:
Scratz
03-04-2006, 09:17 PM
Just thought i would let the developer know that when I applied the plugin and edited the templates that it was calling for the referrals vbphrase when in my 3.5.4 forum the phrase was referrers..
Don't know if it was due some change I did but putting it out there anyway.
trackpads
04-21-2006, 10:19 PM
I am having this same issue, The cause is from the post being by a guest or user 0. Since I have some USENET posts these have no userid and the plugin crashes the thread.
Any idea if we can get an update that eliminates the referall call on guest posts?
Thanks!
-Jason
Developer
04-22-2006, 03:03 AM
i'll update this hack soon
trackpads
04-22-2006, 10:45 AM
Thanks! It is a great hack!!
trackpads
04-24-2006, 08:08 PM
Any luck?
trackpads
04-25-2006, 11:56 PM
Ok, had some other folks here help me on this and here is the patch:
Go into your Admincp, plugins and edit the plugin: Number Of Referrals in postbit-by Developer
Replace this:
if ($vbulletin->options['usereferrer'])
With this:
if ($this->post['userid'])
And it will work with USENET and Guest posts!
(Thanks to tnguy3n, Hambil, gio~logist and Zachery!)
Zachery
04-26-2006, 12:12 AM
Still, a problem with this hack is it runs an addtional query for each post.
It would much better to do an update for each user and log their total user referals. Then log new referals from then on out.
Developer
04-26-2006, 08:03 AM
Fixing It now i'll add a plugin in update counters so you have to run something after installing the hack so it counts referrals and then insert it in a field in user's table using datamanger.
Developer
04-26-2006, 11:06 AM
Version 1.1.0 Released fixs all bugs, added a new field in user table to add in it the total number of referrals to avoid using query for each post and you have first to uninstall the old plugin then install the new product and make sure overwrite set on no, after this u've to run this script admincp/misc.php?do=referrals to insert number of referrals into the new field, then do the new template edit
Boofo
04-29-2006, 09:49 AM
Will you have to always manually update the referrals in the Admin CP or just the first time?
Developer
04-29-2006, 10:13 AM
Nop, first time only
after that automatically in registration using datamanger it will add + 1 to the field in user's table.(look at the product)
Boofo
04-29-2006, 10:33 AM
Great! I'll give it a shot then. ;)
Boofo
04-29-2006, 04:27 PM
Nop, first time only
after that automatically in registration using datamanger it will add + 1 to the field in user's table.(look at the product)
I got to looking at the code and was wondering if there wasn't a way to have that query run on install and not show up in the Maintenace tools at all, if it isn't supposed to be run after the first time. Someone is gonna accidentally run that again, it's bound to happen. ;)
Or am I missing it altogether about that query and what it does?
Zachery
04-29-2006, 10:18 PM
You could run it again, noting bad should happen. It basicly rebuilds the entire count and sets it even.
Boofo
04-29-2006, 11:32 PM
You could run it again, noting bad should happen. It basicly rebuilds the entire count and sets it even.
What do you mean even?
FunaGuy
05-02-2006, 08:50 AM
Installed!
Working Properly :)
Zachery
05-02-2006, 01:47 PM
What do you mean even?
You could run the update counter all day long, it would be horrible for preformance but besides that it wouldn't do anything bad or destory the counts.
The Chief
05-02-2006, 02:34 PM
works awesome, thanks!
/me clicks install
Mr Chad
05-22-2006, 06:03 AM
This does not work in combo with Allow users to delete their account (https://vborg.vbsupport.ru/showthread.php?t=105181&page=2)
Show referal count in postbit.
Database error in vBulletin 3.5.4:
Invalid SQL:
SELECT COUNT(*) AS count FROM user WHERE referrerid =;
MySQL Error : You have an error in your SQL syntax. Check the manual
that corresponds to your MySQL server version for the right syntax to
use near '' at line 1
Error Number : 1064
Date : Sunday, May 21st 2006 @ 07:13:43 PM
Script : http://www.beasttoast.com/forum/showthread.php?t=2386
Referrer : http://www.beasttoast.com/forum/forumdisplay.php?f=8
IP Address : 69.86.105.84
Username : Girl
Classname : vb_database
Please help me out :)
Mr Chad
05-26-2006, 01:43 AM
anyone?
Zachery
05-26-2006, 07:48 AM
Make sure you are running the latest version.
Mr Chad
05-26-2006, 01:54 PM
Make sure you are running the latest version.
I do have the latest version.
I only get this error if a member has deleted their account and had a post in the thread im trying to look @.
Zachery
05-29-2006, 07:16 AM
But the latest version doesn't query the database.
pbradish
05-29-2006, 04:56 PM
Works like a charm, thank you.
Chicago_VLNU_4s
08-06-2006, 08:49 PM
thanks.. real nice code
Ohiosweetheart
11-05-2006, 11:24 AM
does this one work in 3.6.x?
Working fine in our testforum after the upgrade from 3.6.0 to 3.6.4
Ohiosweetheart
12-06-2006, 11:18 AM
thanks acco!
Boosted Panda
05-28-2008, 06:26 PM
Wanted to bump this up. Working on 3.7.1 but you have to manually update the referrals for them to show up :(
Ossedis
09-28-2008, 03:25 PM
Aww. I need one for 3.7.3
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.