[geeklog-devel] Deleting comments

Dirk Haun dirk at haun-online.de
Sat Jan 22 05:00:58 EST 2005


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/




More information about the geeklog-devel mailing list