All Comments

I recently added something a little fun to the site: a way to view all comments by a particular person.

I've wanted to do this for awhile because I think it's a great way to get a sense of the vibe and history someone might have on a particular site (in this case, mine). Does someone tend to always be crabby or have they generally been pretty good?

On any of the comments on the site, just click on the "All Comments" link. When viewing all comments for a person, you can click on the article title to view the comment in its original location.

Along with this I also added the five most recent comments to the home page.

Fun stuff like this is easy with CakePHP. This took me all of a half hour to integrate. About 4 lines of code in the controller and about 10 lines of code in the view (90% of which is just HTML).

Published December 29, 2006
Categorized as Other
Short URL: https://snook.ca/s/737

Conversation

35 Comments · RSS feed
Jonathan Snook said on December 29, 2006

And in case you wanted to try it out, feel free to view all of my comments. :)

Miles Johnson said on December 29, 2006

Thats a good idea, besides the fact many users can have the same name :]

Jonathan Snook said on December 29, 2006

Miles: true. The comment look up is actually based on email address (which I've encoded so as not to publicize those email addresses). So, in actuality, you can actually see if people use variations of their own name over time (which some do).

Jeff Croft said on December 29, 2006

I already told you in e-mail, but I don't mind publicly saying that this is a sweet idea and I fully intend to steal it. :)

Walker Hamilton said on December 29, 2006

I want to try this.

Walker Hamilton said on December 29, 2006

hahaha!

Awesome!

kartooner said on December 29, 2006

Nice! Just to see all of my comments, I'm commenting now.

Not that I don't like commenting otherwise, it's just that I -- like Jeff -- think this is pretty sweet.

Nate K said on December 29, 2006

Im only commenting to see all my comments :)

Nate K said on December 29, 2006

Geez - 32 comments. I am a comment whore. ha. This is a very nice feature...

Tony said on December 29, 2006

Good call on using emails for key. Some other blog had a similar feature and I found myself on the list of "top commenters" because one of them also went by "Tony".

Nathan Smith said on December 29, 2006

Cool idea. I'm mainly just commenting now, so I can see all my past comments!

Jonathan Snook said on December 29, 2006

What's interesting is that I've had this idea for awhile. I originally discussed it last year when showing some designs for YourTotalSite. It took me over a year to implement on my own site!

Matthew Pennell said on December 30, 2006

Nice idea - it would be cool to combine it with Jack Slocum's in-line commenting so that the aggregate view also showed what the archive comments are actually commenting on.

Jakob Heuser said on December 30, 2006

Hey, very well done Jon! I really like the idea of using the md5 of the email as the key. In the future though, you might want to consider changing it to a crc32 since int lookups are much faster in MySQL than a varchar. This will probably become more relevant as the comment count clears a 5-6 digit mark, but something to think in larger scale implementations.

Kilian Valkhof said on December 30, 2006

This is one nice feature, cool idea!

I recently switched e-mailaddresses, so I probably won't have many comments

Jonathan Snook said on December 30, 2006

Matthew: The problem is that I'd have to have some way to identify which comment is being replied to and right now, I don't have that. But that would be interesting to see.

Chris Huff said on December 30, 2006

I think I've only commented a couple times...but I'm curious to see what they were...thus this comment.

Justin Ruckman said on December 30, 2006

Nice! This is a great idea, thanks for the inspiration.

Bramus! said on December 30, 2006

Nice work Jon! It's these kind of changes and tweaks that make websites better, day by day.

johan said on December 30, 2006

happy new year, jonathan and all of you!!!
Gelukkig nieuwjaar!!! (Flemish-Belgium)

Elliot Swan said on December 30, 2006

Awesome...All these cool custom blog CMSes are making me want to drop WordPress.

Robert said on December 30, 2006

I just have to try it for myself ;)

Also happy new year to all the commenters and of course you, Jonathan.

and to johan: Jij ook een gelukkig 2007!

Andrea said on December 30, 2006

I, too, am totally going to steal this idea. Just like I stole the fixed comment box. I may steal your glasses too if you don't watch out! :)

Montoya said on December 30, 2006

This is cool, and it gives you a nice way of seeing when a person first discovered your site (unless they lurked for a while).

Steven Campbell said on December 30, 2006

Jonathan Snook: Are you using a custom CMS? If not, what CMS are you using?

Steven Campbell said on December 30, 2006

Bah, scratch that. I just read Elliot Swan's comment.

Jonathan Snook said on December 30, 2006

Steve: it's a custom CMS I built using CakePHP.

Tobie Langel said on December 30, 2006

What a great and original idea. (Really just posting to see what it looks like... )

Andy Kant said on December 31, 2006

Cool idea, kinda useless aside from seeing who the most active people are, but fun nevertheless. (Like Jeff, I might steal this idea too...if I ever find the time to get a blog up.)

Derek Allard said on December 31, 2006

Jonathan, I see you pass the email as a hash in the URL (I assume this is to get around disallowed characters, I recently wrote something about this on my own blog).

Would you mind commenting if you used a particular hash, and why? Does cake offer convenient encode/decode native functions?

Jonathan Snook said on December 31, 2006

Derek: I'm actually just using an MD5 to help protect the anonymity of people's email address.

As far as I know, Cake doesn't offer convenient encode/decode functions but by the same token, I've been happy with those already built into PHP. I don't believe Cake has the same allowable character filter that Code Igniter has. Whether that is good or bad, remains to be seen. In .NET, I know their acceptable characters filter is absolutely annoying. ymmv.

Zach Salzbank said on December 31, 2006

Thanks for mentioning CakePHP. I took a look at it and now I'm hooked!!

James Mitchell said on December 31, 2006

Very sweet. I have been looking at CakePHP for sometime, and my partner loves it.

Jem said on January 03, 2007

I've seen this sort of thing on WordPress blogs before with the wp-stats plugin or whatever it's called, but never thought of implementing it into my own blog. It's quite neat, and I hope you don't mind if I consider 'stealing' it? ;)

Kathleen Santana said on November 12, 2008

i1dk622yr7jbjgij

Sorry, comments are closed for this post. If you have any further questions or comments, feel free to send them to me directly.