1
Hi All,
ISTATS is a great package, but I found the referer report was including all the query string as part of the referer. Another thing it was recording the same domain multiple times due to way the domain was writteN (
http://www.tumaternidad.com <> WWW.TUMATERNIDAD.COM )
To get a unique name of the domain as a stat in ISTATS replace the original code with the following \modules\istats\include\counter.php
/**
* @feature
* Keeps track of referers
*/
$referer = $HTTP_GET_VARS['referer'];
$referer_array = parse_url($referer);
$referer = $referer_array['host'];
if ($referer<>"") {
$referer = strtolower("http://".$referer);
} else {
$referer = strtolower("http_referer_blocked");
}
if (!strstr(strtolower($referer), strtolower(XOOPS_URL))) {
$check_ref = getResult("select * from ".XOOPS_DB_PREFIX."_is_referer where ucase(url)='".$referer."'");
if ($check_ref) {
mysql_query("update ".XOOPS_DB_PREFIX."_is_referer set count=count+1 where url='".$referer."'");
} elseif($referer != "") {
mysql_query("insert into ".XOOPS_DB_PREFIX."_is_referer values('', '".$referer."', '1')");
}
}
This will also log the referals with an empty HTTP_REFERAL (firewall users) and will use the document.rererral value from the script in theme.html.
Please change the script in theme.html to:
<{if $xoops_isadmin != 1}>
<script type="text/Javascript">
script>
<{/if}>
Enjoy it!