[AJAX] Websites who have referred today (in the last 24 hours)

pmt

New Member
Original Creator: RedTyger

Modified a few lines of fixes

Description:
Lists all websites who have sent you visitors in the last day.

Each time a person arrives at your forum by clicking on a link from another website, the website URL they arrived from is listed on the index page of your forum in the same manner as members who are logged in. Each entry is shortened for display purposes but clicking on the link sends you to the exact page they arrived from, so if the referring page was a search engine you will visit the page and search terms they used to bring up your link. The list is cleared at midnight every day.

Options: (AdminCP > vBulletin Options > Websites who have referred today)
Turn it on or off
Mod goes on, mod goes off. Mod goes on, mod goes off.

Trim URL variables?
Choose Yes to remove variables from the end of URLs to shrink listing repeats. (i.e. Set to No, every different search from Google will add a new www.google.com referral to the listings. Set to yes, all will be compressed into one listing but the search terms will be lost.)

Blockword List:
Enter character strings to be prevented from being added to the URL database, separated by commas (,). You may use any part of domains (www.xxx or xxx or www.xxx.com or .com).

Installation Instructions:
1. Go to AdminCP > Plugins & Products > Manage Products > Add/Import Product.
2. Upload the websites_who_have_referred_today.xml file.
3. Upload the wwhrt.php file to the includes/cron folder of your forum directory.
4. Open AdminCP > Styles & Templates > (Your Theme) Edit Templates > Forumhome templates > FORUMHOME.
5. FIND:
PHP:
<!-- end logged-in users -->
</if>

BELOW, ADD:
PHP:
<!-- websites who have referred today -->
<thead>
    <tr>
        <td class="thead" colspan="2"><a style="float:$stylevar[align=right]" href="#top" onclick="return toggle_collapse('referrers_today')"><img id="collapseimg_referrers_today" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_referrers_today].gif" alt="" border="0" /></a>
            $vbphrase[referrers_today]: $url_count <if condition="$bbuserinfo['usergroupid'] == '6'"> (<a href="index.php?$session[sessionurl]do=kill_all_referrers">$vbphrase[referrers_kill_all]</a>)</if>
        </td>
    </tr>
</thead>
<tbody id="collapseobj_referrers_today" style="$vbcollapse[collapseobj_referrers_today]">
    <tr>
        <td class="alt2">
            <img src="$stylevar[imgdir_misc]/stats.gif" alt="$vbphrase[referrers_today]" border="0" />
        </td>
        <td class="alt1 smallfont">
            $referrers
        </td>
    </tr>
</tbody>
<!-- end websites who have referred today -->
</if>

And save the template. Done!

Queries:
This modification adds one very small query for every arrival from an external link. One additional larger query is used on the index page to construct the list.
 
Top