Version: 1.20, by payamix1
Developer Last Online: Oct 2012
Version: 3.5.3
Rating:
Released: 01-12-2006
Last Update: 01-22-2006
Installs: 76
DB Changes Uses Plugins Template Edits
No support by the author.
Released : 13 Jan 06
This plugin shows the websites linked to your forum on stat section of forumhome.
When you click on the site link, it redirects to the page where linked to your forum.
You can change number of top links in Admin CP.
UPDATED 1.20 : 16 Jan 06
changes in version 1.20
-----------------------
Referral Stat Page ...
Ability to remove refers
UPDATED 1.10 : 14 Jan 06
changes in version 1.10
-----------------------
Ignore Mail Servers ability via Admin CP (like us.f123.yahoo.com)
Ignore Spiders (MSNbot YAHOO GOOGLE) via Admin CP
Ignore List which Admin specifies via Admin CP
Change Sub Domain to Domain (aa111.bloger.com changes to www.bloger.com)
Bug fix (table error)
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Just made a minor modification to the query on this plugin. I wanted to see referrals as they happened (newest first), so I changed the ordering:
PHP Code:
$referrals = $db->query_read("SELECT COUNT(refer) AS num,refer FROM " . TABLE_PREFIX . "referrallinks GROUP BY refer ORDER BY date DESC, num DESC LIMIT $num");
I was looking over the code and have a few comments and an offer:
1) I noticed a define for 'THIS_SCRIPT' and yet I didn't see it referenced in the code. It appears that the var was put in there to make it easier to change the name of the page -- which is great, but since it isn't used it didn't work. I updated the script to use the DEFINE (I'm sure it was just an oversite). So could that be incorporated into the next release?
2) Related to #1 above, I thought it would make sense to add another phrase in which would be something like 'referral_links_linkTitle' or 'referral_links_pagename' and then the DEFINE could get it's value from that phrase so no code changes would be necessary to rename the file. All one would have to do is rename the referrals.php file and then update the phrase...
3) While I was in the code, I noticed a few potential changes that I believe to be optimizations:
a) default $insert to true
b) change the first if statement so it will set $insert to false when appropriate (these first two changes are more about clarity than anything)
c) check $insert as first part of all the rest of the if statements (for the other options loops) to prevent those checks from running if $insert is already false
d) use the break; command to exit loops as soon as $insert = false
4) My host has various aliases (as many do) and therefore I need the system to not record referrals from those various aliases in addition to the standard server name.
I have already coded all of these updates into a new xml and referrals.php file if you (or anyone else) would like to make these changes.