View Full Version : Show Thread Enhancements - Referrals in Postbit
WhaLberg
04-06-2007, 10:00 PM
Dear vBulletin users,
Yesterday I saw a thread about "how to show referrals in postbit" and I decided to do a favour to those people who want that.
HOW TO INSTALL
1) Please upload the "plugin" first.
2) Go to your postbit or postbit_legacy template and find:
$vbphrase[posts]: $post[posts]
Add after:
<br />Referrals: $referrals
That's all!
Congratulations! You have it working!
Do not forget to click install! (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=144222)
zhabbo
04-07-2007, 11:57 AM
Thanks,
Floris
04-07-2007, 09:12 PM
Nice, installed.
I changed <br> to <br /> though
bacanze
04-07-2007, 09:53 PM
Cheers, might be useful.
Logikos
04-07-2007, 11:39 PM
I would suggest using vBulletins database class to do this.
$refcount = $db->query_first_slave("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "user WHERE referrerid = $this->post[userid]");
$referrals = vb_number_format($refcount['count']);
Would be more efficient. :)
NaughtyStud
04-08-2007, 12:32 AM
Nice plugin, Thanks. ;)
jerrygad
04-08-2007, 05:28 AM
Yeah, nice plugin, indeed. Thanks for sharing it with us :D
*installed*
zınar
04-08-2007, 05:41 AM
Nice plugin thanks whalberg,installed.
Jay...
04-08-2007, 02:22 PM
is there anyway to get the font of 'Referrals' in the postbit the same as the rest of the items in the postbit?
have a look at where it says referrals, you'll see what i mean
http://www.donkproject.net/forum/showthread.php?t=399
Brandon Sheley
04-08-2007, 02:53 PM
nice hack, I agree .. I would want the font a little smaller to match
Surviver
04-08-2007, 03:08 PM
This Hack adds 1 Query to echt post in showthread.php. That isnÄt good for the performace (You can get problems if your Server is slow).
WhaLberg
04-08-2007, 07:36 PM
is there anyway to get the font of 'Referrals' in the postbit the same as the rest of the items in the postbit?
have a look at where it says referrals, you'll see what i mean
http://www.donkproject.net/forum/showthread.php?t=399
nice hack, I agree .. I would want the font a little smaller to match
Change that
<br />Referrals: $refferals
to:
<br /><div class="smallfont">Referrals: $referrals</div>
This should work.
This Hack adds 1 Query to echt post in showthread.php. That isn?t good for the performace (You can get problems if your Server is slow).
A suggestion would be better.
I would suggest using vBulletins database class to do this.
$refcount = $db->query_first_slave("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "user WHERE referrerid = $this->post[userid]");
$referrals = vb_number_format($refcount['count']);
Would be more efficient. :)
I used that before but there were some errors so I changed it. Thanks for the information.
Zerovb
04-09-2007, 03:30 AM
Thnaks Good Idea
But I Cant Find The Code In Postbit_Legacy
I Only Found It In Postbit
Logikos
04-09-2007, 04:51 AM
I used that before but there were some errors so I changed it. Thanks for the information.
What were the errors? That code is also used in the default member.php file, so I don't see how there could have been errors.
WhaLberg
04-09-2007, 10:52 AM
What were the errors? That code is also used in the default member.php file, so I don't see how there could have been errors.
Yes, I know, that's why I tried it first. :)
It was about the variable. I'll check it later again.
ChinniePaws
04-09-2007, 03:12 PM
*Installs*
Thanks - so far so good ;)
DieselMinded
04-09-2007, 10:05 PM
Thanks Worked Great !
DM
krazycivik
04-10-2007, 04:32 PM
it comes up but i dont see the number of refferals :S
WhaLberg
04-10-2007, 07:12 PM
it comes up but i dont see the number of refferals :S
How come?
It works great for everyone?
DieselMinded
04-10-2007, 10:58 PM
This has caused an uprise in referrals Members dont like seeing a Zero in there :)
Thanks Again
DM
WhaLberg
04-11-2007, 11:46 AM
This has caused an uprise in referrals Members dont like seeing a Zero in there :)
Thanks Again
DM
So do you want me to change the code? I mean if they have zero referrals, it won't show up, but if they have at least 1, it will show up.
DieselMinded
04-11-2007, 09:33 PM
Its showing up and it says Referrals - 0 I like it this way This is why the members are going to find referrals to get rid of the zero in there :)
www.dieselbombers.com
Thanks for the Hack Brother !
DM
DieselMinded
04-11-2007, 09:34 PM
Join Date: Mar 2007
Location: Northwest Arkansas
Posts: 227
Referrals: 0
Thanks: 31
Thanked 5 Times in 5 Posts
Heres An Example
WhaLberg
04-12-2007, 01:18 PM
Its showing up and it says Referrals - 0 I like it this way This is why the members are going to find referrals to get rid of the zero in there :)
www.dieselbombers.com
Thanks for the Hack Brother !
DM
Ah, sorry I am the dumb, I got it now. :)
You are welcome.
If you have other genius ideas, let us know. :)
DieselMinded
04-13-2007, 08:40 PM
This may be the most Productive hack ive installed
Thanks Again !
DM
WhiteEagle
04-13-2007, 09:01 PM
Thanks for the plugin!
--> installed
DieselMinded
04-15-2007, 06:18 PM
Found a Bud :
The Referrals show up Backwards on Private Messages
DM
Majest
05-05-2007, 07:44 AM
Referrals don't seem to show up for me, I have followed the instructions but they still don't show up. :confused:
EDIT: I figured out the problem, learnt much about vBulletin coding since I originally made this post.
Great mod something that really should come standard in vBulletin.
*Clicks Install.
biggeorge
06-07-2007, 10:02 PM
I cannot get this to work. Installed the plugin first and then modified the template. It shows up in the plugin list but nothing is displayed in the forum. I'm using 3.6.7. Any help would be appreciated.
kennethsia
06-08-2007, 04:40 AM
works on my 3.6.5 thanks
biggeorge
06-08-2007, 01:27 PM
I cannot get this to work. Installed the plugin first and then modified the template. It shows up in the plugin list but nothing is displayed in the forum. I'm using 3.6.7. Any help would be appreciated.
Got it working! I was placing the code in the legacy postbit template - foolish of me! Works great! Thank you. [clicks installed]
DieselMinded
06-27-2007, 08:14 PM
This is great and was written for me ,
There is a bug that needs addressed when in Pm's the profile field is flip flopped it shows the person who pmed you has your exact amount of referrals and it shows him that you have his exact amount of referrals
Please look into this
Thanks
DM
WhaLberg
06-28-2007, 07:26 AM
I will check this. ;)
AuroraStorm
07-08-2007, 01:44 PM
This would be really +++++in if it could list the name of the referrer...my members get points for referrals and this would cut down on the bickering on who referred who...
DieselMinded
07-08-2007, 03:02 PM
This Displays The Amount of Referrals on your posts , Theres another hack that adds a referrals page
SBlueman
07-08-2007, 08:21 PM
I am getting this message:
This file appears to be a Plugin, not a Product. Please use the Plugin Manager to add this file.
How do I do this?
DieselMinded
07-08-2007, 10:14 PM
Click plug in manager directly below product manager ,, then scroll down and click add new plug in
SBlueman
07-08-2007, 10:39 PM
Yeah then when I get there it is asking me to enter some information....I don't know what to enter:
https://vborg.vbsupport.ru/
SBlueman
07-11-2007, 01:32 AM
Anyone? Help!
Censtudios
07-18-2007, 06:29 AM
Nice, installed.
I changed <br> to <br /> though
why <br />
??? whats the difference
agumba
07-18-2007, 06:47 PM
basic and nice :)
Alfa1
07-22-2007, 12:27 PM
The amount of referrals shows up wrong in private messages. For some reason it lists 8 referrals when there's none.
Is it possible that this code adds server load? My forum is extremely slow since i added this.
I deactivated the plugin and my forum was fast as ever again. Is there a way around this? Can the number of referrals be cached or something?
Shelly
07-25-2007, 04:11 AM
Yeah then when I get there it is asking me to enter some information....I don't know what to enter:
http://img103.imageshack.us/img103/7828/pluginmy0.jpg
use the one below that in the previous menu called Download / Upload Plugin
induslady
08-09-2007, 02:18 PM
This is great and was written for me ,
There is a bug that needs addressed when in Pm's the profile field is flip flopped it shows the person who pmed you has your exact amount of referrals and it shows him that you have his exact amount of referrals
Please look into this
Thanks
DM
Hello,
I like this add-on. Showing the number of referrals will boost the members ego and will encourage them to refer more to the site. Thanks for this great addon and great idea!
BTW, has this bug of showing your referrals in the person who pm-ed you been fixed? Please can someone point me to the fixed code?
Thanks in advance
DieselMinded
08-09-2007, 03:03 PM
Mo this has not been fixed yet but its not a big deal
induslady
08-31-2007, 01:26 PM
This Displays The Amount of Referrals on your posts , Theres another hack that adds a referrals page
Where is this hack that adds a referrals page? I searched for it and could see only hacks for vB 3.5.*. Is there one for 3.6.*? I would love to install it.
Thanks.
induslady
08-31-2007, 01:37 PM
Hello,
I have installed this mod and it shows up referral numbers in the members postbit. A good motivational tool to get members refer more of their friends. Thank you.
But I noticed a mismatch...not sure if it is a bug or I am missing something.
I went to Admincp -> Users -> Referrals and ran a report from the beginning of our forum.
I checked a member's profile and postbit, it shows that she has referred 10 members.
But the admincp report says that she has referred 9 members.
However, when I click on the member's name in the admincp report, it lists 10 member names those of whom she referred.
Why this mismatch? Has anyone noticed this?
Please respond. Thanks.
DieselMinded
08-31-2007, 02:31 PM
Where is this hack that adds a referrals page? I searched for it and could see only hacks for vB 3.5.*. Is there one for 3.6.*? I would love to install it.
Thanks.
its the same hack the esikis one
SCRIPT3R
09-04-2007, 06:11 PM
nm. :)
Alfa1
09-04-2007, 06:17 PM
Any news on this?
The amount of referrals shows up wrong in private messages. For some reason it lists 8 referrals when there's none.
Is it possible that this code adds server load? My forum is extremely slow since i added this.
I deactivated the plugin and my forum was fast as ever again. Is there a way around this? Can the number of referrals be cached or something?
WhaLberg
09-16-2007, 03:01 AM
A new version of this addon will be released today.
DieselMinded
09-16-2007, 05:10 AM
woot
Alfa1
09-16-2007, 10:46 AM
A new version of this addon will be released today.
Great news. Will it have less server load?
WhaLberg
09-16-2007, 10:49 AM
Well, we will see. And also $referrals variable will be as link for a popup and in the popup page the referrals of this user will be shown.
MillerLight
09-17-2007, 03:02 PM
Cant wait, this is a great hack
abo naif
09-18-2007, 01:25 PM
waw Nice plugin,
Thanks :)
vnairp11
09-18-2007, 07:57 PM
Thanks for the mod, i hope if there any updates it will show some advanced statistics of the speciffic users refered etc. and hyperlink the amount of referals in post bit.
fringehead
09-18-2007, 09:11 PM
Looks interesting.. When will you update the code?
Thanks,
Sean
WhaLberg
09-18-2007, 09:12 PM
I am sorry, I said I was going to update the hack yesterday but I had some other things to do, so I'll update it in this week.
What will be new in next release:
- This will be a product
- There will be a link in postbit to referrals.
- There will be referral statistics.
I am really glad that you guys liked this.
TheJekyll
09-20-2007, 05:17 PM
nice code , thanks
beiamerica
09-25-2007, 06:01 PM
Installed.
Thanks! :)
WhaLberg
09-26-2007, 03:51 PM
Next Release Information:
Will be published as a product
Enabling / disabling the product
Referral names and count in UserCP
A link for referrals in postbit
A link for referrals in memberinfo
Referral page and referral statistics.
DrewStr
10-04-2007, 12:41 AM
Sounds good. Looking forward to it.
Thanks,
Drew
BuRaCh
10-12-2007, 03:19 PM
nice hack.wating contine:)
installed..
masterross
10-14-2007, 03:07 PM
nice hack!
how many sql queries are executed by this hack?
i'm askin couse my forum is too big
Alfa1
10-15-2007, 09:22 AM
I am sorry, I said I was going to update the hack yesterday but I had some other things to do, so I'll update it in this week.
Please try to reduce server load when you release an update.
masterross
10-15-2007, 03:54 PM
Any idea why in Private Messages it's not show correct values?
WhaLberg
10-15-2007, 06:37 PM
About the server load: It will just add 1 query instead 2.
About showing the referral count wrong: I guess it shows the referral count of the user who sent you a PM. I'll fix it either.
thunder_sti
10-16-2007, 10:29 PM
Thanks Much !!!
madotds
10-18-2007, 03:13 PM
Installed clicked :) thank you
Next Release Information:
Will be published as a product
Enabling / disabling the product
Referral names and count in UserCP
A link for referrals in postbit
A link for referrals in memberinfo
Referral page and referral statistics.
Registering interest. :)
WhaLberg
10-18-2007, 06:42 PM
Here is the question: Do you want this product to make auto template edits?
Alfa1
10-21-2007, 05:18 PM
That would be optimal for those who have unchanged postbit like i do. But I think that others need to make the template edits by hand.
Any news yet? I installed the current version to test it but the PM 'count reversal' is still happening. This is great - looking forward to finally using it. :)
DieselMinded
10-23-2007, 08:53 PM
Edits by hand Please
masterross
10-28-2007, 06:52 PM
Here is the question: Do you want this product to make auto template edits?
u mean edit or auto injection?
WhaLberg
10-29-2007, 07:49 PM
Auto placing the edits.
DieselMinded
12-17-2007, 01:42 AM
Please Update soon as there maybe an exploit in this hack as a spammer was able to make his referral count what ever he wanted to some how , either that or his user name went to a fictitious Number of referrals because he was deleted from the membership as i was viewing his thread after he was deleted
https://vborg.vbsupport.ru/showthread.php?t=165186
Hornstar
01-02-2008, 12:19 AM
Next Release Information:
Will be published as a product
Enabling / disabling the product
Referral names and count in UserCP
A link for referrals in postbit
A link for referrals in memberinfo
Referral page and referral statistics.
Looking forward to this update. How is the progress coming?
LilSniper
01-05-2008, 09:55 PM
Work for 3.6.7?
And is there a screen shot or demo forum that I can view this at?
Thanks!
zendiver
01-06-2008, 05:39 PM
I'm a bit confused why this 'plug-in' is needed. Isn't this actually already part of vBulletin. Can't you just use the following without having to install another plug-in? Just make a new phrase variable as referrals and make it vBulletin Global.
<if condition="$vboptions['usereferrer']">$vbphrase[referrals]: <strong>$referrals</strong></if>
Well, I guess not, but I find this exact code in the MEMBERINFO template. Not sure why it will not work in the postbit(_legacy)
UPDATE: I found the plug-in already installed in vBulletin ("Number of Referrals") for the hook_location "usercp_complete". Took the exact information and duplicated for the hook_location "postbit_display_start" then everything is as it is suppose to be. Sorry for the rant and thread hi-jack.
grant.hayman
01-09-2008, 09:39 AM
Was wondering if it is possible to to show referrers from this month only...
I want to run a monthly competition for referrels and this would show users where they stand.
Is there somwhere i can edit the query?
Also I am looking for some type of leader board anyone know of any or where is best to start to create one. would love to add to this hack as it looks like this would help increase membership to any forum.
Thanks
grant.hayman
01-09-2008, 01:28 PM
Managed to sort out the this month bit...
altered the code to this: (hope this is ok to alter code, if not please remove this post and except my appologies :erm:)
$usersid = $this->post['userid'];
$refcount = mysql_query("SELECT username FROM " . TABLE_PREFIX . "user WHERE referrerid='$usersid' AND MONTH(FROM_UNIXTIME(`joindate`))=MONTH(now())
");
$referrals = mysql_num_rows($refcount);
Baisicly added the AND clause on the end and it seems to work great.
I was also wondering if I only want certain user groups for this to work on (usergroup of the poster not viewer) and I put an conditional statement in my posbit will the queries still run but wont show or do they not run at all.
Thanks again for a great hack
DieselMinded
01-25-2008, 12:54 AM
Looking forward to this update. How is the progress coming?
Im Game
WhaLberg
01-27-2008, 08:02 PM
The new release is coming soon. I will update all of my released products together.
Gharibe
01-30-2008, 09:18 AM
Thanks ,
it was what i requested
works fine
CrashPush
03-19-2008, 12:40 PM
Great hack that works with 3.7.0 B5 just fine.
Alfa1
03-20-2008, 08:35 AM
Does this fix in vb 3.7 RC1 resolve the problem of this hack with large table scans:
http://www.vbulletin.com/forum/project.php?issueid=24856
It was causing my forum to drastically slow down.
figu120
04-25-2008, 09:21 PM
Gracais lo ensayare a ver pues se ve algo interesante
Boofo
04-25-2008, 10:07 PM
There has been numerous promises of updates and fixes and nothing seems to have happened so far. Are you even supporting this hack any more? Shouldn't make promises you don't intend to keep. ;)
DieselMinded
05-09-2008, 02:27 AM
Working on 3.7.0 Gold
WhaLberg
05-11-2008, 02:20 AM
The next release will be for vB 3.7 with the functionalities I promised.
Alfa1
05-11-2008, 11:26 AM
Will you solve the problem with large table scans slowing larger forums down?
Boofo
05-11-2008, 11:28 AM
Does this still add a query for every post on the page?
DieselMinded
11-22-2008, 04:13 AM
This quit working in ver 3.7.4
Alfa1
12-25-2008, 01:42 PM
The next release will be for vB 3.7 with the functionalities I promised.
Will you solve the problem with large table scans slowing larger forums down?
Will this be upgraded to vb 3.8?
Thanks.
Rickeo
02-04-2009, 01:46 PM
Yea I really like this one hope it gets updated to 3.8
josefebus
06-20-2009, 11:44 AM
I already install this in 3.8...thanks....
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.