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

Michael Askew michaelaskew at mac.com
Sun Jan 23 15:43:38 EST 2005


Vinny and Dirk,

I notice that the 'info' option of PLG_handleTrackbackComment is nearly
identical to the function I created to return info to the What's New
block (see Feature Request 366, and accompanying patch file). For this
reason, why not spike that functionality out into its own plugin API
function and let it serve both roles? This would let plugin writers get
the What's New comment functionality for free if they support the
trackback API. Of course, in that case you might also want to provide a
way for the plugin to 'opt out' of one or the other.

-Michael

On Jan 23, 2005, at 12:00 PM, geeklog-devel-request at lists.geeklog.net
wrote:


> 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. DB_delete vs. DB_query("DELETE FROM ...") (Dirk Haun)

> 2. Re: Deleting comments (Vincent Furia)

>

> --__--__--

>

> Message: 1

> From: "Dirk Haun" <dirk at haun-online.de>

> To: <geeklog-devel at lists.geeklog.net>

> Date: Sat, 22 Jan 2005 22:23:05 +0100

> Organization: Terra Software Systems

> Subject: [geeklog-devel] DB_delete vs. DB_query("DELETE FROM ...")

> Reply-To: geeklog-devel at lists.geeklog.net

>

> Just an observation:

>

> I've noticed that we're using DB_query("DELETE FROM...") a lot when we

> actually have a separate function for that: DB_delete

>

> | dirk at terra:geeklog-1.3> grep -r 'DB_q.*DELETE FROM' . | wc -l

> | 47

>

> bye, Dirk

>

>

> --

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

> http://geeklog.info/

>

>

> --__--__--

>

> Message: 2

> Date: Sat, 22 Jan 2005 21:22:49 -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

>

> With Dirk's blessing to break the comment plugin API. Here is my idea

> thus far:

>

> CMT_deleteComment and CMT_saveComment will be limited to exactly that

> functionality. They will act no different for articles or polls as

> they would for any other variable. They will return 0 for success or

>> 0 for failure (and log the failure to the errorLog). I plan on doing

> something similar for CMT_commentForm.

>

> So there will now be plugin functions for saving and deleting comments

> which should simply call these functions when they are ready (and

> determine that the correct permissions hold, etc).

>

> I'll continue with this approach if it sounds good to everyone. I'd

> especially like some feedback from anyone currently using the plugin

> comment functionality.

>

> -Vinny

>

>

> On Sat, 22 Jan 2005 11:00:58 +0100, Dirk Haun <dirk at haun-online.de>

> wrote:

>> Vincent Furia wrote:

>>

>>> Next step is to look at redoing the comment API (especially for

>>> deletes).

>>

>> For the trackback comments, I've introduced a function that only

>> checks

>> with the plugin if it would be okay for the current user to delete a

>> comment on an object under the plugin's control. The actual delete is

>> then done by Geeklog.

>>

>> /**

>> * Ask plugins to handle a trackback comment operation.

>> *

>> * Operations:

>> * 'accept' - does the plugin accept a trackback comment for its entry

>> $id,

>> * returns: true or false

>> * 'delete' - does the user have permission to delete comments on

>> entry $id,

>> * returns: true or false

>> * 'info' - plugin is asked to provide information on entry $id,

>> * returns: array (url, title, excerpt)

>> *

>> * @param string $type plugin type

>> * @param string $id ID of an entry under the plugin's

>> control

>> * @param string $operation operation to perform

>> * @return mixed depends on the operation (see above)

>> *

>> */

>> function PLG_handleTrackbackComment ($type, $id, $operation)

>>

>> Since this isn't used anywhere yet, we could easily change it to keep

>> it

>> in sync with the plugin API for "normal" comments.

>>

>>

>>> The tough part of that will be keeping it backwards compatible.

>>

>> Since the current delete is actually messing up the comments, I'd say

>> we

>> should break it on purpose ...

>>

>> 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

>>

>

>

> --__--__--

>

> _______________________________________________

> geeklog-devel mailing list

> geeklog-devel at lists.geeklog.net

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

>

>

> End of geeklog-devel Digest

> _______________________________________________

> geeklog-devtalk mailing list

> geeklog-devtalk at lists.geeklog.net

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





More information about the geeklog-devtalk mailing list