If all you are not looking to do anything special after you get the
comment notification then using the built-in email notifier is probably
your best option. It's very easy to configure.
If email doesn't work as well then you can also use comment feeds as a
pull mechanism. The comment feeds are the same as normal weblog feeds
except that they just contain your comments, so you can use that to grab
your comments regularly and if you want to do any processing on them
that's up to you. The advantage here is that you don't need to modify
the Roller application directly, you can pull the feeds and do any
special handling in your own client app.
As for your original question, the answer is "no" there is no really
easy way to plug in your own code to listen for comment posting events.
-- Allen
dstruck wrote:
I'm looking to set up a weblog and I have a particular interest in tracking
when comments are made and who makes them. Pebble
(http://pebble.sourceforge.net) claims to provide "Comment Listeners" that
"let you write Java code that is called when comments are added, removed,
approved and rejected." Ideally, this is what I'm looking for (provided the
listener is handed the pertinent information about the comment, in my case,
who made the comment and what blog entry the comment was for).
For my weblog, I'd prefer to use Roller because it is an Apache project,
it's well-documented, etc. So I'm wondering if Roller provides any
functionality similar to what Pebble claims to provide. If not, I'm open to
considering alternatives that might duplicate the functionality I desire.
The first possibility I notice is Roller provides the ability to set up
email notifications for comments. It wasn't clear to me though exactly how
this is set up. If I set up my own Roller server, how do I configure it to
turn on email notifications. Furthermore, will the emails give me the
information I want (again, who made the comment and what blog entry the
comment was for)?
The next possibility might be to use a pull operation (as opposed to the
above options which would provide push functionality). Roller supports the
Blogger and MetaWeblog APIs and also provides some level of support for the
Atom API. From what I can tell, the Blogger and MetaWeblog APIs don't have a
notion of comments. Is this accurate? Also, from what I can tell, though
Atom does have a notion of comments, the Roller implementation of it does
not. Is this accurate? If I'm wrong on either of these points, then I think
I could retrieve all the comments for each weblog entry and diff the results
against my local data model. It wouldn't be ideal but it wouldn't be too
ugly either.
Thanks in advance for any help.
David