[geeklog-devtalk] geeklog-devel digest, Vol 1 #484 - 8 msgs

geeklog-devel-request at lists.geeklog.net geeklog-devel-request at lists.geeklog.net
Thu Jan 20 13:00:02 EST 2005


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: Google ranking and blogs... (Dirk Haun)
2. Re: About the forum spammer (Dirk Haun)
3. Deleting comments (Dirk Haun)
4. Re: About the forum spammer (Blaine Lang)
5. Re: Deleting comments (Blaine Lang)
6. Re: Deleting comments (Tony Bibbs)
7. Re: Deleting comments (Vincent Furia)
8. Re: Deleting comments (Dirk Haun)

--__--__--

Message: 1
From: "Dirk Haun" <dirk at haun-online.de>
To: <geeklog-devel at lists.geeklog.net>
Subject: Re: [geeklog-devel] Google ranking and blogs...
Date: Wed, 19 Jan 2005 21:11:42 +0100
Organization: Terra Software Systems
Reply-To: geeklog-devel at lists.geeklog.net


>http://arstechnica.com/news.ars/post/20050118-4536.html


There's a forum thread about this here:

http://www.geeklog.net/forum/viewtopic.php?showtopic=46405

bye, Dirk


--
http://www.haun-online.de/
http://www.macosx-faq.de/


--__--__--

Message: 2
From: "Dirk Haun" <dirk at haun-online.de>
To: <geeklog-devel at lists.geeklog.net>
Subject: Re: [geeklog-devel] About the forum spammer
Date: Wed, 19 Jan 2005 22:02:40 +0100
Organization: Terra Software Systems
Reply-To: geeklog-devel at lists.geeklog.net


>Here you go.


Thanks, Tom :-)

But I guess line 44 in IP.Examine.class.php:

if ($val = $_SERVER['REMOTE_ADDR'])) {

should really read

if ($val == $_SERVER['REMOTE_ADDR']) {

i.e. add one '=', remove one ')'.


Also, this seems to block by IP address. What I meant was that all the
domains in the spam post resolve to a certain IP address. The spam post
itself is sent from one of the hijacked PCs under the spammer's control,
so blocking by their IP address won't help much in this case.

It's still useful for other cases, so I'll probably be adding it to CVS
anyway.

bye, Dirk


--
http://www.haun-online.de/
http://www.macosx-faq.de/


--__--__--

Message: 3
From: "Dirk Haun" <dirk at haun-online.de>
To: <geeklog-devel at lists.geeklog.net>
Date: Wed, 19 Jan 2005 22:52:02 +0100
Organization: Terra Software Systems
Subject: [geeklog-devel] Deleting comments
Reply-To: geeklog-devel at lists.geeklog.net

Since Geeklog 1.3.10, deleting comments isn't done with a simple
DB_delete call any more - the relation with other comments on the same
"comment tree" has to be fixed as well. Geeklog does that for comments on
stories and polls, but not for comments in plugins (most prominent
example: File Management plugin, but there are others).

So I guess what we need is a function that deletes a comment properly and
give plugins a way to access it.

Just the other day, I was actually thinking about moving all the comment-
related functions from lib-common.php[1] into their own lib-comment.php
file. If we add a COM_deleteComment function to that, plugins could
simply include that file and delete comments properly.

The other option would be to change the PLG_handlePluginComment(...,
'delete') call yet again and only make it indicate if it's okay to delete
the comment, but let Geeklog do the actual deletion.

Vinny? Blaine?

bye, Dirk

[1] which amount for almost 10% of the code in lib-common.php, btw


--
http://www.haun-online.de/
http://www.tinyweb.de/


--__--__--

Message: 4
From: "Blaine Lang" <geeklog at langfamily.ca>
To: <geeklog-devel at lists.geeklog.net>
Subject: Re: [geeklog-devel] About the forum spammer
Date: Wed, 19 Jan 2005 17:09:44 -0500
Reply-To: geeklog-devel at lists.geeklog.net

Yeh - Thanks Tom :)
Another nice addition.

So ... are you up for another extension to query the IP's if there are
multiple links in the post?

Or maybe we just reject posts with more then a set number of links :)

Blaine

----- Original Message -----
From: "Dirk Haun" <dirk at haun-online.de>
To: <geeklog-devel at lists.geeklog.net>
Sent: Wednesday, January 19, 2005 4:02 PM
Subject: Re: [geeklog-devel] About the forum spammer



>Here you go.


Thanks, Tom :-)

But I guess line 44 in IP.Examine.class.php:

if ($val = $_SERVER['REMOTE_ADDR'])) {

should really read

if ($val == $_SERVER['REMOTE_ADDR']) {

i.e. add one '=', remove one ')'.


Also, this seems to block by IP address. What I meant was that all the
domains in the spam post resolve to a certain IP address. The spam post
itself is sent from one of the hijacked PCs under the spammer's control,
so blocking by their IP address won't help much in this case.

It's still useful for other cases, so I'll probably be adding it to CVS
anyway.

bye, Dirk


--
http://www.haun-online.de/
http://www.macosx-faq.de/

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


--__--__--

Message: 5
From: "Blaine Lang" <geeklog at langfamily.ca>
To: <geeklog-devel at lists.geeklog.net>
Subject: Re: [geeklog-devel] Deleting comments
Date: Wed, 19 Jan 2005 17:11:19 -0500
Reply-To: geeklog-devel at lists.geeklog.net

Hi Dirk,

I like any idea to reduce the size of lib-common and was not aware the
comment functions already are some 500 lines of code.
I don't have an issue with the Plugin Api changing if thats a better option.

Blaine

----- Original Message -----
From: "Dirk Haun" <dirk at haun-online.de>
To: <geeklog-devel at lists.geeklog.net>
Sent: Wednesday, January 19, 2005 4:52 PM
Subject: [geeklog-devel] Deleting comments


Since Geeklog 1.3.10, deleting comments isn't done with a simple
DB_delete call any more - the relation with other comments on the same
"comment tree" has to be fixed as well. Geeklog does that for comments on
stories and polls, but not for comments in plugins (most prominent
example: File Management plugin, but there are others).

So I guess what we need is a function that deletes a comment properly and
give plugins a way to access it.

Just the other day, I was actually thinking about moving all the comment-
related functions from lib-common.php[1] into their own lib-comment.php
file. If we add a COM_deleteComment function to that, plugins could
simply include that file and delete comments properly.

The other option would be to change the PLG_handlePluginComment(...,
'delete') call yet again and only make it indicate if it's okay to delete
the comment, but let Geeklog do the actual deletion.

Vinny? Blaine?

bye, Dirk

[1] which amount for almost 10% of the code in lib-common.php, btw


--
http://www.haun-online.de/
http://www.tinyweb.de/

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


--__--__--

Message: 6
Date: Wed, 19 Jan 2005 16:17:41 -0600
From: Tony Bibbs <tony at tonybibbs.com>
To: geeklog-devel at lists.geeklog.net
Subject: Re: [geeklog-devel] Deleting comments
Reply-To: geeklog-devel at lists.geeklog.net

Dirk Haun wrote:


>Just the other day, I was actually thinking about moving all the comment-

>related functions from lib-common.php[1] into their own lib-comment.php

>file. If we add a COM_deleteComment function to that, plugins could

>simply include that file and delete comments properly.

>

>

If you mean lib-comment.php that would actually be CMT_deleteComment,
right? I'm guessing you mean not to confuse it with lib-common.php
functions. I'm all for this. I think you could also justify HTML-related
stuff like COM_startHeader, COM_startBlock, etc. In fact, it might be a
good exercise to review the code in lib-common.php and determinte what
categories of functions you can come up with and decide how to layout
the libraries.

Only issue with this sort of stuff is it will clearly break
compatiblity. I say you would leave the stubbed out functions in
lib-common.php, call the new library equivalent (i.e. COM_deleteComment
would call CMT_deleteComment) and then log a warning to error.log that
the function is deprecated and will be removed in a future version.

Thinking out loud,

--Tony

--__--__--

Message: 7
Date: Wed, 19 Jan 2005 20:56:08 -0500
From: Vincent Furia <vfuria at gmail.com>
To: geeklog-devel at lists.geeklog.net
Subject: Re: [geeklog-devel] Deleting comments
Reply-To: geeklog-devel at lists.geeklog.net

Also the functions in comment.php could probably be moved into the
"lib-comment.php" file as well. If you'd like, I can take a first
stab at this this coming weekend (with the weather here I should have
time to get some work done). Though if you'd prefer to do it I won't
get hurt feelings. Hopefully Tony won't mind me working on something
besides Geeklog-2. ;)

If you want to get really adventurous, I could go crazy and implement
comments in a more OO fashion.

-Vinny

P.S. For those interested, I just checked in the first part of
comments for GL2. See
http://cvs.geeklog.net/co.php/Geeklog-2/system/Propel/Geeklog-2/Gl2Comment.php.
Just ignore the FIXMEs. :)

On Wed, 19 Jan 2005 16:17:41 -0600, Tony Bibbs <tony at tonybibbs.com> wrote:

> Dirk Haun wrote:

>

> >Just the other day, I was actually thinking about moving all the comment-

> >related functions from lib-common.php[1] into their own lib-comment.php

> >file. If we add a COM_deleteComment function to that, plugins could

> >simply include that file and delete comments properly.

> >

> >

> If you mean lib-comment.php that would actually be CMT_deleteComment,

> right? I'm guessing you mean not to confuse it with lib-common.php

> functions. I'm all for this. I think you could also justify HTML-related

> stuff like COM_startHeader, COM_startBlock, etc. In fact, it might be a

> good exercise to review the code in lib-common.php and determinte what

> categories of functions you can come up with and decide how to layout

> the libraries.

>

> Only issue with this sort of stuff is it will clearly break

> compatiblity. I say you would leave the stubbed out functions in

> lib-common.php, call the new library equivalent (i.e. COM_deleteComment

> would call CMT_deleteComment) and then log a warning to error.log that

> the function is deprecated and will be removed in a future version.

>

> Thinking out loud,

>

> --Tony

> _______________________________________________

> geeklog-devel mailing list

> geeklog-devel at lists.geeklog.net

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

>


--__--__--

Message: 8
From: "Dirk Haun" <dirk at haun-online.de>
To: <geeklog-devel at lists.geeklog.net>
Subject: Re: [geeklog-devel] Deleting comments
Date: Thu, 20 Jan 2005 08:00:55 +0100
Organization: Terra Software Systems
Reply-To: geeklog-devel at lists.geeklog.net

Tony,


>Only issue with this sort of stuff is it will clearly break

>compatiblity. I say you would leave the stubbed out functions in

>lib-common.php, call the new library equivalent (i.e. COM_deleteComment

>would call CMT_deleteComment) and then log a warning to error.log that

>the function is deprecated and will be removed in a future version.


That would still require lib-common.php to include the lib-comment.php
then. Since comments are only used by a few components (and plugins) I
was actually thinking about getting rid of that code entirely so that
those components that actually need it would have to include this.

if (!function_exists ('COM_comment')) {
require_once ($_CONF['path_system'] . 'lib-comment.php');
}

Yeah, it would break compatibility. But then again, there are more flaws
in the plugin API regarding comments (I'll post something about them
later) and this would be a good opportunity to fix them all at once.

Vinny, I'm not opposed to having a comment.class.php instead of the lib-
comment.php if you think that makes sense.

bye, Dirk


--
http://www.haun-online.de/
http://mypod.de/



--__--__--

_______________________________________________
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