[geeklog-modules] Plugins and comments, again

geeklog-modules-admin at lists.geeklog.net geeklog-modules-admin at lists.geeklog.net
Sat May 10 13:09:32 EDT 2003


Sigh, I have to come back to this issue again ...

A couple of days ago, I suggested that the plugins should handle their
comments themselves. When trying to implement that now, I noticed that
the plugins may be missing some of the information necessary to perform
the task.

The current API is

    plugin_handlecomment_<$type> ($id, $operation='')

where "$type" is the type of comment (= the name of the plugin), "$id" is
the ID of the comment's parent object and "$operation" is either 'save'
or 'delete'.

For the 'save' operation, that's fine (more or less): Geeklog saves the
comment in the gl_comments table and then calls the above function so
that the plugin can update its statistics or whatever. It would be nice,
though, if the plugin would also get the comment ID ...

For the 'delete' operation, this is obviously not sufficient since the
plugin wouldn't know which comment to delete.

So we need an additional parameter. The question is now: Should there be
a new API function for this (so as to not break any existing plugins) or
should we just add the comment id as an additional parameter, e.g.

    plugin_handlecomment_<$type> ($id, $operation='', $cid)

Comments?

bye, Dirk


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




More information about the geeklog-modules mailing list