![]() |
Referrals in Postbit
This hack displays the number of users each user has referred (via the referral system) in the postbit.
|
Screenshot:
|
Nice job!
So this adds 1 query to the postbit page? |
[high]* Talisman installed, but is really bummed!
[/high] :( It didn't work. There's no number there and I've checked the insert before - insert after - and everything. What's missing? |
A lot of people have wanted this for a longgg time ;)
- miSt |
Talisman is right. This hack isn't working.
|
I'm getting.... Referred: users
No number is appearing Any advice would be greatly appreciated, thanks. Michael |
No, this does not work here eighter! Please fix it because this would be great to have!
|
Well, I'm out of ideas. What's wrong with it (code-wise!)?
|
Shouldn't it be:
Code:
In postbit, find: :) Satan |
No, but I did forget a step I think...
|
Ah...
Anyway, remember to make that <br> <br />;) Satan |
Well, let's hope that you will find out soon....
|
What would be the benefit of this?
My templates are full of <br>, any reason to use the other out of curiousity? -Jason Quote:
|
To be XHTML compliant because the W3C can't keep a standard for more than 6 months.
|
Fixed. I forgot a trailing line.
|
Did you already update the file? I checked everything and I'm still getting the same results. Could you please direct me to where this trailing line was missing. Once again, thanks for a great hack.
Michael |
I updated the first step.
|
Still no go... :dead:
I greatly appreciate your efforts. I tried everything and did it step by step. No big deal....I'll live. I probably did "something" wrong. Thanks again. I'll play around with it once and a while. Michael |
Try emptying the cache because I'm getting a bad download, too (although when I edit the file as a moderator I see the code).
|
It worked! Thanks a lot. Your help on this has been greatly appreciated.
|
It's fixed. Yay!! :banana:
|
Thanks m8!
*Clicks Install* |
I made a change to ours that someone else might like. For anyone using vbStats (or another hack like it) that shows your top referrers on a page, you could make this part in your postbit.... clickable.
That lets your members go check who all those people are that someone referred. In the postbit template, instead of using "Referred: $post[ referredcount] users" ..... you would use: Referred: <a href="/forum/vbstats.php?action=memberrefer" target="_blank">$post[ referredcount] users</a> (Guess I'll also attach a screenshot to show how it looks on our posts.) Cheers all, Talis. PS ~ We're using "member(s)" instead of "users." PPS ~ Hellsatan is just kidding us about the <br /> :cross-eyed: |
No I am not:)
<br /> is what it should be;) <br /> is what vBulletin should make vB3 templates... <br /> is XHTML compliant... Satan |
Hehehe.
(Men are so easy.) :p |
:)
So this adds 1 query to each postbit page? |
Wouldn't this add one query for EACH post in showthread? So if you have 20 posts, that is an additional 20 queries in showthread on top of whatever you have already? Plus since you are doing a count, this will slow down the loading of showthread. Not that there is any way around this without adding another column to store the number. But good work in making it work. Not sure if this can be optimized without adding another column to the user table.
|
I thought it only added 2 queries to the showthread. ;)
|
Well, I wondered about that, too. So I disabled it by commenting out that line in the postbit and there was no difference. Same number of queries on the page (showing 5 posts) as when it was active.
That doesn't seem right though .... the queries don't run if the variable is commented out, do they? Anyway, with everything else I've got going already, I figure my site's gonna blow up sometime next week ..... either way. :p |
Try comment out the code in the php files and see what that counts.
|
Okay.... just did that and the difference is ONE query.
There were five posts on that page -- 2 posts showing referrals (both mine) and 3 posts showing a zero result. |
It mus do it for each unique user on a page. Try one with more than 2 users posting.
|
Ok, did it again. This time, the page had 7 posts --> 2 posts with a zero result for referrals, 2 posts by someone with 8 referrals, 1 post by someone with 3 referrals, and 2 posts by someone with 2 referrals.
Once again.... the hack added only one query to the page. |
still no worky here :(
|
For the record, it only added one query to my showthread.php. Is there any way to NOT have it show in postbit if the user does not have any referrals?
Edit: I thought I should mention that the thread I tested it had a boatload of posts and people with between 0 and 10 referrals. Great hack! Miguel |
how can this be done in 3.0.x
|
Does anybody know if there's a version for 3.0.7 :(
|
All times are GMT. The time now is 04:05 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|