[geeklog-devtalk] geeklog-devel digest, Vol 1 #314 - 2 msgs

geeklog-devel-request at lists.geeklog.net geeklog-devel-request at lists.geeklog.net
Sat May 1 13:00:02 EDT 2004


Send geeklog-devel mailing list submissions to
geeklog-devel at lists.geeklog.net

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.geeklog.net/listinfo/geeklog-devel
or, via email, send a message with subject or body 'help' to
geeklog-devel-request at lists.geeklog.net

You can reach the person managing the list at
geeklog-devel-admin at lists.geeklog.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of geeklog-devel digest..."


Today's Topics:

1. Re: Comment Spam & lib-c*.php (Tony Bibbs)
2. RE: Comment Spam & lib-c*.php (Michael Jervis)

--__--__--

Message: 1
Date: Fri, 30 Apr 2004 17:41:38 -0500
From: Tony Bibbs <tony at tonybibbs.com>
To: geeklog-devel at lists.geeklog.net, mike at skinmaster.co.uk
Subject: Re: [geeklog-devel] Comment Spam & lib-c*.php
Reply-To: geeklog-devel at lists.geeklog.net

I don't see a reply to this so here is mine:

Sure send your code over for tracking IP's in comments.

As for rearranging file locations. We'll be looking at separating
lib-common.php into even more libraries (e.g. lib-html.php, etc) but I
doubt we swap the location of lib-common.php and lib-custom.php just for
support reasons (we'd get flooded with "where is lib-common.php"
questions no matter how much we documented and advertised such a
change). I agree hindsite your suggestions seems the most logical,
however, you must consider the history of those files. lib-custom.php
didn't exist for a long time and all there was was lib-common.php.

Thanks,

--Tony

Michael Jervis wrote:


>Hi,

>

>I've been having a lot of comment spam recently and I noticed there is no IP

>tracking on the comments, making it hard to locate and lock out repeated

>anonymous comment spam. I've modified my geeklog instance, didn't take much,

>to log the comment ip address, and display it next to the delete link if you

>have delete permissions.

>

>I think this code should be a feature. Want mine?

>

>I was thinking, as I trolled round the code changing things. IMHO

>lib-custom.php and lib-common.php are the wrong way round. Sort of.

>

>I think that your geeklog include path and custom files should be in the

>same file. lib-custom.php which should be in the public_html. lib-common.php

>should be in system. This way there are two touch points, config.php and

>lib-custom.php where users put their stuff. They shouldn't need to edit a

>'core' file, lib-common.php themselves.

>

>The content of lib-custom.php would never need to change, it's their system

>specific settings. No more editing of lib-common.php when upgrading etc. It

>just make things more logical, and better for upgrading IMHO.

>

>Just my $0.02.

>

>Mike

>

>

>_______________________________________________

>geeklog-devel mailing list

>geeklog-devel at lists.geeklog.net

>http://lists.geeklog.net/listinfo/geeklog-devel

>

>


--__--__--

Message: 2
From: "Michael Jervis" <mike at skinmaster.co.uk>
To: "Tony Bibbs" <tony at tonybibbs.com>, <geeklog-devel at lists.geeklog.net>
Subject: RE: [geeklog-devel] Comment Spam & lib-c*.php
Date: Sat, 1 May 2004 09:33:34 +0100
Reply-To: geeklog-devel at lists.geeklog.net


>Sure send your code over for tracking IP's in comments.


Change to <prefix>comments add an ip column of type varchar length 15.

Trivial change in comment.php, savecomment line 285 becomes:
DB_save ($_TABLES['comments'], 'sid,uid,comment,date,title,pid,type,ip',

"'$sid',$uid,'$comment',now(),'$title',$pid,'$type','{$_SERVER['REMOTE_ADDR'
]}'");

Trivial change in lib-common.php ;-) line 2774 in the function
COM_getComment becomes:
. $LANG01[28] . '</a> | '.$A['ip'] );

(i.e. after the delete option we have a pipe and the IP posted from)

I think that was everything. Not rocket science.

Shame it turned out the annon comment spam was coming from random IP
addresses. Had to turn of annon commenting in the end. Perhaps some kind of
comment approval system... hmm...


>As for rearranging file locations.


Guessed as much, ta for the reply though.




--__--__--

_______________________________________________
geeklog-devel mailing list
geeklog-devel at lists.geeklog.net
http://lists.geeklog.net/listinfo/geeklog-devel


End of geeklog-devel Digest



More information about the geeklog-devtalk mailing list