- Moderated by:
- Support Team
-
- rank:
-
Freshman
- registered:
- August 2003
- Status:
- offline
- last visit:
- 17.09.03
- Posts:
- 2
I work on my site from home and from work...Two different IP's. I was getting tired of artificially inflating my banner impression numbers (or having to change my IP in the banners configuration section every time I went to work, or came home) so I modified includes/pnBanners.php @ line 72. (0.7.2.6-Phoenix RC3)
Replace:
if ($myIP == $myhost) {
with
if ( ereg($myhost, $myIP) ) {
Then, in the banners configuration, you can put a bunch of IPs on the same line. I use a space as a delimiter, but there's no reason you couldn't use a comma or something else...probably. YMMV.
Just thought someone else may be having the same problem... -
- rank:
-
Freshman
- registered:
- August 2003
- Status:
- offline
- last visit:
- 17.09.03
- Posts:
- 2
I have also "fixed" modules/News/article.php so that it doesn't increment the view counter for a story if the user is coming from one of the "admin ips", as specified by the banners config.
@ around line 90:
$myIP = pnConfigGetVar('myIP');
$remote = getenv("REMOTE_ADDR");
if ( ! ereg($remote, $myIP) )
{
$column = &$pntable['stories_column'];
$dbconn->Execute("UPDATE $pntable[stories] SET $column[counter]=$column[counter]+1 WHERE $column[sid]='" . pnVarPrepForStore($sid) . "'");
}
I basially encapsulated the SQL update that was already there inside of a little ereg, similar to what I did with includes/pnBanners.php
Look at me, ain't I neat?
No. I'm not.
