2 graham Mar 20, 2005 14:25

Easy enough. Thanks, Graham.
Oh. I forgot to ask. If I do that, do I need to change:
<?php if( $disp == 'stats' ) { // stop search engines from indexing the stats page
echo '<meta name="robots" content="noindex, nofollow" />'."\n";
} ?>
To:
<?php if( $disp == 'info' ) { // stop search engines from indexing the stats page
echo '<meta name="robots" content="noindex, nofollow" />'."\n";
} ?>
To keep my stats page from being indexed?
Graham wrote:
Crack open your _main.php and look for this line:
Actually... That didn't do it. It's still disp=stats.
Have you got a link for me to look at?
Graham wrote:
Have you got a link for me to look at?
Sure:
http://www.undergroundozarks.com/blog/
That's with my _main.php altered with the change. It still shows the links as "disp=stats," but now it brings up a blank Stats page.
How odd. I've never done that myself, so it was really a guess. What I do is leave everything as it is originally and replace the logging function with this. What it does is ignore hits on _stats.php. If you can cope with the bandwidth use, this is the best way of doing it. If you can't, I guess I'll have a look about changing the stats url, but I think that will involve hacking some core files I think, so it might not (probably won't) survive the next upgrade.
Anyway, in _main.php find this:
<?php
log_hit(); // log the hit on this page
debug_info(); // output debug info if requested
?>
And replace it with this:
<?php
if ($disp != 'stats')
{
log_hit(); // log the hit on this page
debug_info(); // output debug info if requested
}
?>
Graham wrote:
If you can cope with the bandwidth use, this is the best way of doing it. If you can't, I guess I'll have a look about changing the stats url, but I think that will involve hacking some core files I think, so it might not (probably won't) survive the next upgrade.
Well, if it's super-complicated, don't worry about it. But, yeah, it's the bandwidth issue I'm trying to get around. The referer spammers have already tripled my bandwidth. At the rate they're going, they'll max out my bandwidth probably within the year (and I get 5GB of transfer a day).
I really hate spammers.
I solved the problem my way and deletet stats in the skins like above.
I can see the logfiles provided by my webhoster and anylase it with webalizer. So what another database for logs? That prevents me looking for the referspammer like the fucking Texas Holden and others.
mikel
Crack open your _main.php and look for this line:
And you can change this to whatever you want