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)
-   -   Display full list of referrers and referrals (https://vborg.vbsupport.ru/showthread.php?t=25173)

dwh 09-03-2001 09:51 PM

Hey VB developers!! Don't miss this thread, there's definitely issues with the php vbcode!! The above "&n" actually reads "LIMIT 100", even when I edit it but no matter what i do it shows as &n
weird.

dwh 09-03-2001 09:53 PM

Quote:

Originally posted by Joshs
PHP Code:

SELECT COUNT(*) AS referralsuser.usernameuser.userid FROM user AS users
                   LEFT JOIN user ON 
(users.referrerid user.userid)
                   
WHERE users.referrerid <> AND
                   
user.userid NOT IN (0)
                   
GROUP BY users.referrerid
                   ORDER BY referrals DESC 

Looked like it worked right...

note that the code I gave you got chopped, run it w/ the limit 100...

I thought an extra row may show up w/ some missing data....if not I'll look at the code again....somehow reflistbit is being called one time too many...

Joshs 09-03-2001 09:53 PM

I had to take out the &n because it said it was an invalid SQL statement... Could that be the problem?

Joshs 09-03-2001 09:54 PM

You have an error in your SQL syntax near '&n LIMIT 0, 30' at line 7

dwh 09-03-2001 09:58 PM

since the php vbcode isn't working, once again, here's the proper code to try:

"SELECT COUNT(*) AS referrals, user.username, user.userid FROM user AS users
LEFT JOIN user ON (users.referrerid = user.userid)
WHERE users.referrerid <> 0 AND
user.userid NOT IN (0)
GROUP BY users.referrerid
ORDER BY referrals DESC
LIMIT 100"

Joshs 09-03-2001 10:00 PM

You have an error in your SQL syntax near 'LIMIT 0, 30' at line 7

dwh 09-03-2001 10:02 PM

You're using an old version of phpMyAdmin....just pull off the LIMIT 100 portion...then scan the results.

If there's more than 30, be sure to go to the next page and check that every line is ok.

Joshs 09-03-2001 10:04 PM

I am using the newest version of phpmyadmin... Everything that was pulled with that SQL looks alright... BTW whats your URL?

dwh 09-03-2001 10:17 PM

My boss won't let me post my url :(

OK, I have a question. How many rows were returned from the sql statement? It should have been 7.


Josh
Kckazdude
pug
DonnieD
cryzten
1gigkid
Andrew

Joshs 09-03-2001 10:18 PM

Yes, that is correct. Maybe its just a mistake in the php file or one of my templates...

dwh 09-03-2001 10:20 PM

Quote:

Originally posted by Joshs
Yes, that is correct. Maybe its just a mistake in the php file or one of my templates...
I'm looking but this is very weird. Your reflistbit template is being called 8 times. If you view the source of your page you can see that and count it yourself. But the code will only loop thru as many times as your mysql statement comes back with...so how it can call the template 8 times when there's only 7 rows is just wacko.

dwh 09-03-2001 10:24 PM

found it!

Pull out

eval("\$reflistbits .= \"".gettemplate("referrer_listbit")."\";");
$referrerlist="";

from AFTER the TOP REFERRER section and you'll be fine...you WERE calling that listbit 8 times!

Joshs 09-03-2001 10:47 PM

Thanks so much!

Steve_S 01-17-2002 04:48 PM

Thanks everyone. I've got a JS pop up hacklette which lets your members send an email with the referral code automatically inserted.

See:

https://vborg.vbsupport.ru/showthrea...838#post212838

Gutspiller 01-28-2002 08:45 PM

demo please. :(

Floris 03-22-2002 10:00 AM

I requested this in the request thing & bumped myself..

What I would like to see is some kind of hack where I can let users donate their gained referral points to other users.

Let say I as an admin have 5 points, and wich to give it to userX, it would be nice of I could select a referral and type in a referrers name. So he gets the points.

If this is not possible 1.2.3, then I would be happy with a script in the admin dir, which makes it more easy to do , then running manual mysql query's to replace referral points.

wvvwnet 03-26-2002 07:53 PM

It's a really great Job, Thanks
But, is there a way to insert the top 10 referals at the bottom of the main page of the forum,
please help

pHAZE_1 04-29-2002 05:27 PM

Quote:

Originally posted by FireFly


1. Create a new file named referrerlist.php and in it put the content of referrerlist.txt in it. Config $shownorefs.

4. Add an index to the field referredid in the table user.

5. Add a link to referrerlist.php?s=$session[sessionhash] anywhere you want.

could someone please elaborate on the above instructions??? i understand the rest of them except those..

1. where does referrerlist.php go? whats Config $shownorefs??
4. ??
5. ??

Webmasta XT 07-20-2002 08:48 PM

Can we get new instructions for vb 2.2.6, cuz the top referrer on forumhome thing doesn't seem to work!!

a43079 09-27-2002 08:33 PM

nice

Webdork 09-28-2002 12:24 AM

Any working demos?

All the ones in this thread seem to have 404 errors.

Visionray 12-03-2002 04:18 PM

Um...In this thread I see 5 pages with big chunks of code in each post, and it seems as if the original post hasn't been updated.

What is the correct code to make this hack work? Is it in the original post?

Alien 06-24-2003 08:09 PM

I'd like to see this updated, with a final .txt of the least load version or whatever in one place. :) dwh's? It's not all in one place and the thread got nuts...

Anyone up to it?


All times are GMT. The time now is 12:19 PM.

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.24265 seconds
  • Memory Usage 1,765KB
  • 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_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (23)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete