vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Referrals in Postbit (https://vborg.vbsupport.ru/showthread.php?t=53146)

filburt1 05-19-2003 10:00 PM

Referrals in Postbit
 
This hack displays the number of users each user has referred (via the referral system) in the postbit.

filburt1 05-19-2003 10:55 PM

Screenshot:

Alien 05-19-2003 11:08 PM

Nice job!

So this adds 1 query to the postbit page?

Talisman 05-20-2003 03:49 AM

[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?

Dean C 05-20-2003 10:53 AM

A lot of people have wanted this for a longgg time ;)

- miSt

Boofo 05-20-2003 11:10 AM

Talisman is right. This hack isn't working.

Corleone 05-20-2003 12:48 PM

I'm getting.... Referred: users

No number is appearing

Any advice would be greatly appreciated, thanks.

Michael

partang2 05-20-2003 02:40 PM

No, this does not work here eighter! Please fix it because this would be great to have!

filburt1 05-20-2003 03:08 PM

Well, I'm out of ideas. What's wrong with it (code-wise!)?

Chris M 05-20-2003 03:35 PM

Shouldn't it be:

Code:

In postbit, find:

Posts: $post[posts]

Replace with:

Posts: $post[posts]<br>
$user[referredcount] users

??

:)

Satan

filburt1 05-20-2003 03:36 PM

No, but I did forget a step I think...

Chris M 05-20-2003 03:56 PM

Ah...

Anyway, remember to make that <br> <br />;)

Satan

partang2 05-20-2003 04:29 PM

Well, let's hope that you will find out soon....

Alien 05-20-2003 04:56 PM

What would be the benefit of this?

My templates are full of <br>, any reason to use the other out of curiousity?

-Jason

Quote:

Today at 12:56 PM hellsatan said this in Post #12
Ah...

Anyway, remember to make that <br> <br />;)

Satan


filburt1 05-20-2003 04:58 PM

To be XHTML compliant because the W3C can't keep a standard for more than 6 months.

filburt1 05-20-2003 04:59 PM

Fixed. I forgot a trailing line.

Corleone 05-20-2003 05:56 PM

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

filburt1 05-20-2003 05:58 PM

I updated the first step.

Corleone 05-20-2003 06:16 PM

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

filburt1 05-20-2003 06:25 PM

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).

Corleone 05-20-2003 06:38 PM

It worked! Thanks a lot. Your help on this has been greatly appreciated.

Talisman 05-20-2003 06:57 PM

It's fixed. Yay!! :banana:

partang2 05-20-2003 07:54 PM

Thanks m8!

*Clicks Install*

Talisman 05-21-2003 05:33 AM

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:

Chris M 05-21-2003 09:04 AM

No I am not:)

<br /> is what it should be;)

<br /> is what vBulletin should make vB3 templates...

<br /> is XHTML compliant...

Satan

Talisman 05-21-2003 09:08 AM

Hehehe.

(Men are so easy.)

:p

Alien 05-21-2003 07:07 PM

:)

So this adds 1 query to each postbit page?

Erwin 05-22-2003 06:45 AM

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.

Boofo 05-22-2003 07:23 AM

I thought it only added 2 queries to the showthread. ;)

Talisman 05-22-2003 07:54 AM

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

Boofo 05-22-2003 08:00 AM

Try comment out the code in the php files and see what that counts.

Talisman 05-22-2003 08:12 AM

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.

Boofo 05-22-2003 08:39 AM

It mus do it for each unique user on a page. Try one with more than 2 users posting.

Talisman 05-22-2003 01:31 PM

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.

Almax 05-23-2003 04:17 PM

still no worky here :(

jdmuniverse 08-01-2003 09:19 PM

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

sketch42 09-13-2005 04:03 AM

how can this be done in 3.0.x

RapCapital 10-04-2005 11:55 PM

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
  • Page Generation 0.01531 seconds
  • Memory Usage 1,775KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (38)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete