[geeklog-devel] Deleting comments
Vincent Furia
vfuria at gmail.com
Fri Jan 28 14:22:24 EST 2005
Well,
I think I'm done. Attached is the new documentation for Plugin
Comment Engine. Note the missing code examples. I was hoping to work
with Blaine, Tom, or one of the other plugin developers that use
comments to get the examples done (and to make sure that the new API
is reasonable).
Note that comment.php passes on requests to delete and save comments
to the plugin which then must call CMT_deleteComment or
CMT_saveComment respectively. That way plugins can do any
pre-save/delete checks and post-save/delete processing that they want.
Besides the major changes to the comment API, I have also refactored
the code in comment.php and consolidated comment related code in
system/lib-comment.php. A code review would be welcome, but at the
least some strenuous testing is required. Here is a list of files
that I ended up touching:
public_html/comment.php
public_html/article.php
public_html/layout/professional/comment/commentbar.thtml
public_html/layout/professional/comment/thread.thtml
public_html/lib-common.php
system/lib-comment.php
system/lib-plugins.php
I'll repeat. Please test this out a bit. I've done a lot of testing,
but the changes are pretty significant.
Thanks,
Vinny
On Sat, 22 Jan 2005 21:22:49 -0500, Vincent Furia <vfuria at gmail.com> wrote:
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist8.pair.net/pipermail/geeklog-devel/attachments/20050128/6e8a02a9/attachment.html>
More information about the geeklog-devel
mailing list