Recent Topics

1 Sep 21, 2005 22:06    

I like b2evo a lot, and thanks to the helpful stuff posted here I've been able to customize it to my tastes. One thing I'd like is for comment posters to be able to be notified when someone replies to their comments. Is that possible?

2 Sep 21, 2005 22:17

Nope. I've often thought it should be, but never got around to hacking it up. So like someone asks me about poor performance of a hack and I want to try to resolve. I can reply to the email but then the blog looks like I don't care. I can reply on the blog but then do I know they came back to see it? Thus I wanted a checkbox that says "notify this author of a reply". Problem is just settin' here looking at it (so long ago) I couldn't wrap my brain around how to do it. I therefore gave up.

Any takers? Reply to a specific comment author?

Oh by the way I'm going to move this to the "request a hack" forum since that's what it is. I think I am. I think I can is what I mean. If I can then I will, and I'll shut up now.

3 Sep 21, 2005 22:52

As a blog admin, I get notified by email of a comment. Seems like similar code could be used to notify comment posters (who are registered users).

4 Sep 21, 2005 23:13

Yup. That's because comments are attached to posts, and posts to authors, who have email ids. Given that there can be many commenters on a post you would need to be able to specify which commenter you wanted to notify even though at a code level you don't know how many comments or if the author even supplied an id, and that's where I got lost.

5 Sep 22, 2005 02:24

Hmm. Continuing the thought experiment here...

What if we modify the comment code so that if the user checks the "Notify" box, the author's email is appended to a "distro list" hidden field. Then a copy of the comment is sent to everyone on the list. This distro list would be in each new comment as a hidden field, and contain the email addresses of every previous commenter who's elected to be notified.

The append-to-distro routine would be smart enough to eliminate duplicate addresses.

The send comment notify routine would first check any to-send address against a blacklist (email, post id) that would be a per post id opt-out of future notifications. (i.e., you can reply to a comment notification with REMOVE ME or something in the subject and it adds your email to the blacklist for the corresponding post id). Opting-out of one post id would not opt-you out for any others. But we could have a global opt-out too that would prevent someone else from posting under your email and selecting "Notify" just to annoy.

6 Sep 22, 2005 15:44

Hmm. I was looking at another blog (WordPress, maybe?) and noticed it sets up RSS 2.0 feeds for comments. That might be an easier way to implement this functionality. What do you think?

7 Sep 22, 2005 16:43

B2evolution already has a feed for comments, but it's for all comments on a blog, not for a specific post.

As far as using hidden fields, you should make sure to keep all e-mail addresses on the server side. Using hidden HTML form fields will not only reveal your e-mail addresses to anyone who is smart enough to look at the HTML source, but it will also open your system up to be used by spammers, since they could manipulate those fields to cause e-mails to be sent to other addresses.

8 Sep 22, 2005 16:49

Ok instead of hidden fields with a list of emails, how about a hidden field with an id. The server looks up the id in a server-side table and gets the emails.

9 Sep 22, 2005 18:55

Another thing that got me down on this idea was the general idea that push systems (email in general) are uncool. Syndication allows the individual control over what information comes his/her way, so giving up a checkbox that will send an email means commenter B could send snide remarks to commenter A through your web. Thus I felt the hack would have to limit exactly who could have the checkbox available. Anyway that sort of unmotivated me back in the day.

mrshiney wrote:

Hmm. I was looking at another blog (WordPress, maybe?) and noticed it sets up RSS 2.0 feeds for comments. That might be an easier way to implement this functionality. What do you think?

As Kweb pointed out, syndication feeds for comments already exist. The drawback is the feed is across the entire blog, unless you take advantage of [url=]a groovy new hack[/url]!

10 Sep 22, 2005 21:15

Thanks! That looks like exactly what I want. Now if I can get it working...

11 Sep 22, 2005 22:09

What version are you using? Report any problems you have on the hack thread, and please include your version number. I thought it was a simple hack because it's only three files, but to me a complex hack opens so much I can't see the file names in my editor...

12 Nov 02, 2005 17:40

I also want this feature.
I saw this in many worpress blogs.

Form is loading...