How do I turn off Referers so that it does not continually add info to the db.
My host has a rule that it is illegal to have a separate stats program running. I once got shut down for this.
Turn Off Referers
Re: Turn Off Referers
How about if I just change line 26 in index.php fromPat wrote:How do I turn off Referers so that it does not continually add info to the db.
My host has a rule that it is illegal to have a separate stats program running. I once got shut down for this.
$track_referer = true; to
$track_referer = false;
will that stop adding the referer information to the db?
or can I just comment out a line somewhere that says
add_referer to DB?
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Turn Off Referers
Yes, you can change that line to turn it off!
Regards,
Garvin
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Turn Off Referers
Hi Gavin,garvinhicking wrote:Yes, you can change that line to turn it off!
Regards,
Garvin
I tried, it did not work. I'm in phpmyadmin and, after emptying the referers table, I can still see the new referers being added.
I'm trying to understand the logic.
It seems to me the only thing that the entries in the referers table are good for are stats. All they say are google (host) sent me x amount of traffic on this particular querey, msn (host) sent me etc.al.
The only reason to have that table is for stats. I don't have the stats plugin installed and I can not find the file where the command for putting that information into the referers table in the db.
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
So what else did you have to hack to get it running? Just curious! ![Smile :)](./images/smilies/icon_smile.gif)
Regards,
Garvin
![Smile :)](./images/smilies/icon_smile.gif)
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
oh, sorry, in include/functions.inc.php line 488 and belowgarvinhicking wrote:So what else did you have to hack to get it running? Just curious!
Regards,
Garvin
serendipity_db_query(
//@sprintf(
//"UPDATE %s%s
//SET count = count + 1
//WHERE scheme = '%s'
//AND host = '%s'
//AND port = '%s'
//AND path = '%s'
//AND query = '%s'
//AND day = '%s'
//%s",
$serendipity['dbPrefix'],
$list,
serendipity_db_escape_string($url_parts['scheme']),
serendipity_db_escape_string($url_parts['host']),
serendipity_db_escape_string($url_parts['port']),
serendipity_db_escape_string($url_parts['path']),
serendipity_db_escape_string($url_parts['query']),
date('Y-m-d'),
($entry_id != 0) ? "AND entry_id = '". (int)$entry_id ."'" : ''
);
if (serendipity_db_affected_rows() == 0) {
serendipity_db_query(
//sprintf(
//"INSERT INTO %s%s
// (entry_id, day, count, scheme, host, port, path, query)
//VALUES (%d, '%s', 1, '%s', '%s', '%s', '%s', '%s')",
$serendipity['dbPrefix'],
$list,
(int)$entry_id,
date('Y-m-d'),
serendipity_db_escape_string($url_parts['scheme']),
serendipity_db_escape_string($url_parts['host']),
serendipity_db_escape_string($url_parts['port']),
serendipity_db_escape_string($url_parts['path']),
serendipity_db_escape_string($url_parts['query'])
);
you can see I just commented out entering the info into the table.
I also had to remove 2 ")" after
($entry_id != 0) ? "AND entry_id = '". (int)$entry_id ."'" : '' and
serendipity_db_escape_string($url_parts['query'])
to get rid of some parse errors
Option for this?
Garvin, do you plan to have an option to turn off referrer saving?
Imho this is very important for high load blogs, beside that I'd suggest adjusting the stats/topreferrer/etc.-plugins to be able to use apache-logfiles.
Imho this is very important for high load blogs, beside that I'd suggest adjusting the stats/topreferrer/etc.-plugins to be able to use apache-logfiles.
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Option for this?
Thanks for the suggestion, I just added the config option to SVN trunk.
I disagree about plugins being able to parse apache logfiles. PHP applications should not do that, it's very memory and time intensive. Use modlogan, awstats or google analytics or any other offline analyzer. I think you intented a cronjob like script that imports apache logfiles into the serendipity_referrers tables, but I think that's not really required. All the data is already in serendipity, why parse the apache logfile with additional headaches?![Smile :)](./images/smilies/icon_smile.gif)
Regards,
Garvin
I disagree about plugins being able to parse apache logfiles. PHP applications should not do that, it's very memory and time intensive. Use modlogan, awstats or google analytics or any other offline analyzer. I think you intented a cronjob like script that imports apache logfiles into the serendipity_referrers tables, but I think that's not really required. All the data is already in serendipity, why parse the apache logfile with additional headaches?
![Smile :)](./images/smilies/icon_smile.gif)
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/