Version: 1.3, by tnguy3n
Developer Last Online: Sep 2010
Version: 3.5.1
Rating:
Released: 11-21-2005
Last Update: Never
Installs: 76
Uses Plugins Template Edits
No support by the author.
Top XX Referrers In FORUMHOME
Author: tnguy3n
Support Site: www.vbviet.org
This plugin pulls out XX top referrers in your database and display it on your FORUMHOME. When you click on the referrer's name, it shows the list of users that the member referred in a popup window.
To change number of referrers to show, open the plugin, and change $num to your own value.
INSTALLTION: 2-3 mins
- plugin: 2
- template mod: 1
- new template: 1
CHANGES SINCE v.1.0
- show lists of users the member referred in a popup window
UPLOAD plugin-referrer.xml in your Plugin Manager, then apply template mod as in top_referrers_on_forumhome.txt file. For those who want to upgrade to version 1.2, follow instructions in upgrade.txt file.
Pls click on "INSTALL" buttons if you use it.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
For those who want to shows it on CMPS, try this add-on. However, I don't guarantee it'll work properly as I didn't get to test it on a live site, and I just wrote it based on some existing mods at vbadvanced.com.
To install, just simply import the topreferrers.module file,
then create a new template named adv_portal_topreferrers with following content:
Sorry, I don't run CMPS on my site nor have it installed on my PC, so I got no idea what format it is valid and what not. However, you can try this new approach.
NOTE: THIS INSTALLION IS FOR CMPS ONLY.
1. create a php file named topreferrers.php with the content:
PHP Code:
<?php
// by tnguy3n @ vbviet.org
// number of top xx referrers to show
$num = 5;
$referrals = $db->query_read("SELECT COUNT(*) AS totalref, user.username, user.userid, user.usergroupid, usergroup.usergroupid, usergroup.opentag, usergroup.closetag FROM " . TABLE_PREFIX . "user AS users LEFT JOIN " . TABLE_PREFIX . "user AS user ON (users.referrerid = user.userid) LEFT JOIN " . TABLE_PREFIX . "usergroup ON (usergroup.usergroupid = user.usergroupid) WHERE users.referrerid != 0 GROUP BY users.referrerid ORDER BY totalref DESC LIMIT 0,$num");
$numref = $db->num_rows($referrals);
if($numref == '0')
{
$showreferrers = "No referrer found!";
}
while($referral = $db->fetch_array($referrals))
{
// display referrals on forumhome
$showreferrers .= "<a href=\"member.php?$session[sessionurl]u=$referral[userid]\" title=''>$referral[opentag]$referral[username]$referral[closetag]</a> ($referral[totalref])<br />;";
}
I'd love to use this...but something is wrong with the plugin...atleast for me... its not registering the fact that it has " . TABLE_PREFIX . " in the query....and its giving me an SQL error on the forum home...any thoughts?