Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by Admin (Coder) Admin is offline
Developer Last Online: Nov 2024 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 08-11-2001 Last Update: Never Installs: 8
 
No support by the author.

To see this in action go here.

Installation:
0. Download the attached zip file and extract it.
1. Create a new file named referrerlist.php and in it put the content of referrerlist.txt in it. Config $shownorefs.
2. Create a new template named reflist and put the content of reflist.txt in it.
3. Create a new template named reflistbit and put the content of reflistbit.txt in it.
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.

Good luck, and feedback is welcomed!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 08-13-2001, 08:00 AM
dwh's Avatar
dwh dwh is offline
 
Join Date: Feb 2002
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We should also make the referred members in the right column clickable but I'm going to bed. Maybe when I wake up someone will post the answer
Reply With Quote
  #13  
Old 08-13-2001, 08:56 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks dwh, I appreciate your help.
Reply With Quote
  #14  
Old 08-15-2001, 03:01 AM
unixman
Guest
 
Posts: n/a
Default

Here you go, clickable usernames in the last column - enjoy. Great hack ...

PHP Code:
<?php
error_reporting
(7);
$templatesused='reflistbit,reflist';
require(
'./global.php');
$max=25//This number decides how many users to display
$referrers $DB_site->query("SELECT COUNT(*) AS referrals, user.username, user.userid FROM user AS users
                   LEFT JOIN user ON (users.referrerid = user.userid)
                   WHERE users.referrerid <> 0
                   GROUP BY users.referrerid
                   ORDER BY referrals DESC
                   LIMIT 
$max");
while (
$referrer=$DB_site->fetch_array($referrers)) {
  
$referreds $DB_site->query("SELECT username FROM user WHERE referrerid = '$referrer[userid]'");
  while (
$referred $DB_site->fetch_array($referreds)){
    
$enc_username urlencode($referred[username]);
    if (
$referrerlist) {
      
$referrerlist .= ", <A HREF=member.php?action=getinfo&username=$enc_username>$referred[username]</A>";
    } else {
      
$referrerlist .= "<A HREF=member.php?action=getinfo&username=$enc_username>$referred[username]</A>";
    }
  }
  eval(
"\$reflistbits .= \"".gettemplate("reflistbit")."\";");
  
$referrerlist="";
}
eval(
"dooutput(\"".gettemplate("reflist")."\");");
?>
Reply With Quote
  #15  
Old 08-15-2001, 08:37 AM
Bane's Avatar
Bane Bane is offline
 
Join Date: Oct 2001
Posts: 411
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I liked this hack so much I modified it a hair (as seen on http://www.talkloud.net/referrerlist.php ) and put an install script together for the templates.

The only real difference here is it adds the challenge to the top ( User XXX has the highest referrals with XX, can you do better? ) and has a fancy schmancy install file (ala-Kier). Should you want to give it a go feel free to DL the file here.

All credit goes to FireFly, and the others who modified his code
Reply With Quote
  #16  
Old 08-15-2001, 05:00 PM
dwh's Avatar
dwh dwh is offline
 
Join Date: Feb 2002
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I haven't tried your code, but nice idea. One problem, on your site the top challenger you have listed is the second person w/ 2 referrals instead of the guy w/ 8 referrals.
Reply With Quote
  #17  
Old 08-15-2001, 05:16 PM
Bane's Avatar
Bane Bane is offline
 
Join Date: Oct 2001
Posts: 411
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There are three variables in the script now:

$max=?? - This number decides how many users to display
$userx=?? - Users to exclude from top referrer
$userl=?? - Users to exclude from top referrer list

On my board I have the admin [userid1] (me ) on the list but not on the top referrer for the board. It may look silly, but any admin worth his salt is going to have more referrals than his users I should think. If you dont like this you can set both userx and userl to 0 and it will list all.

Otherwise any userids you list will be excluded.
Reply With Quote
  #18  
Old 08-23-2001, 03:54 PM
george_proost george_proost is offline
 
Join Date: Nov 2001
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi all,

My SQL is sooooooo bad.

Instead of the number of 'clean' referrals I would like to introduce the RIP. What is this RIP.

Well it is designed to give a workable indicator as to the effect of
a single member's referrals within a given timeframe.

How would it work ? Well ....
The RIP is calculated as follows :
-- you have a start date and an end date
-- one RIP point is added to the RIP period total for each directly referred new member.
-- add to this one half of the total RIP's for each directly referred new member.

The refererid becomes a sort of child and parent. And you probably have to work backwards somehow.

So no matter which time period you look at you get an accurate assessment of the members referal behaviour and referral effect.

I would like to award referal prizes based on something like this
instead of the 'one-on-one' hard referrals.

Can anyone help on this?
Reply With Quote
  #19  
Old 08-23-2001, 07:13 PM
dwh's Avatar
dwh dwh is offline
 
Join Date: Feb 2002
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

eh, are you trying to say that you want to pro-rate the referrals so that new members who referrred a lot of people in a short time get a better ranking than old timers who had more time to get referrals in? Like a referrals/day type deal but called RIP?
Reply With Quote
  #20  
Old 08-24-2001, 07:13 AM
george_proost george_proost is offline
 
Join Date: Nov 2001
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi dwh,

Thanks for the reply... but no not really that way, and certainly not with that effect. Let me try expalin it in another way.

standard RIP logging - running totals in brackets

period1.
=====
Jack referes Jill and Simon -- Jack(2 RIP's)

period2.
======
Jill refers Pete -- Jill(1 RIP) and Jack(2,5 RIP's)

period3.
======
Pete referrs Paul --- Pete(1 RIP) Jill(1,5 RIP's) Jack(2,75 RIP's)

If the period to be measured is 'period 3' the actual standings would be :

Pete(1 RIP)
Jill(0,5)
Jack(0,75)

a member therefor ALWAYS for any given period WILL have a RIP value if a 'child' refereree at any level were to obtain a registration.

If Jack had refered 1 more member in period 3 in the current system of referals then would be a tie 1 RIP each. In the RIP system at the start of the period, depending on how large the referral tree is of a member and how deep there will ALWAYS be a RIP value ... albeit a very small one eg:

--1 direct referal in period
--0,5 referal once-revomed
--0,25 referal twice-removed
--0,125 ..
--0,0625 ..
--0,03125 and so on

This accurately measures the effect of refferals of a user over time within a given time period.

Hope this is clearer ..
Reply With Quote
  #21  
Old 08-24-2001, 07:21 AM
eva2000's Avatar
eva2000 eva2000 is offline
 
Join Date: Oct 2001
Location: Brisbane, Australia
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

look the hack i installed the original version and works fine for my needs
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:40 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05106 seconds
  • Memory Usage 2,315KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete