Site Notes

Update to Comments Page: View Comments with Highest Scores

By Ryan McGreal
Published September 30, 2009

this blog entry has been updated

For some time, RTH has had a Comments page where you can see the most recent 20 comments on articles and on blog entries, with the option to see the 20 articles and blogs with the most comments.

It can be a handy way to keep on top of discussions across various pages, and while the layout isn't great (it would be nice to see the comments in a threaded view, for example), it makes it easier to see when a new comment appears on a page of interest.

Now that the site has had comment voting for some time, I decided it wouldn't hurt to add the ability to view lists of comments (for articles and blog entries) with the highest net scores. As a result, the Comments page now offers three views:

While I was in there, I also refactored the code that generates the lists so the page loads considerably faster.

Update: in response to the observation that "Best Comments" is qualitative, I changed the title to "Highest Voted Comments".

Ryan McGreal, the editor of Raise the Hammer, lives in Hamilton with his family and works as a programmer, writer and consultant. Ryan volunteers with Hamilton Light Rail, a citizen group dedicated to bringing light rail transit to Hamilton. Ryan writes a city affairs column in Hamilton Magazine, and several of his articles have been published in the Hamilton Spectator. He also maintains a personal website and has been known to post passing thoughts on Twitter @RyanMcGreal. Recently, he took the plunge and finally joined Facebook.

3 Comments

View Comments: Nested | Flat

Read Comments

[ - ]

By race_to_the_bottom (anonymous) | Posted September 30, 2009 at 15:52:31

Great stuff, now all we need is a "Worst Comments" page! ;)

Permalink | Context

[ - ]

By synxer (registered) | Posted September 30, 2009 at 16:59:43

Great stuff, now all we need is a "Worst Comments" page! ;)

SELECT comment FROM UserComments WHERE userCommentsName = 'A Smith' OR userCommentsName = 'Capitalist';

Done.

Permalink | Context

[ - ]

By synxer (registered) | Posted September 30, 2009 at 17:00:28

^ joking :)

Permalink | Context

View Comments: Nested | Flat

Post a Comment

You must be logged in to comment.

Events Calendar

Recent Articles

Article Archives

Blog Archives

Site Tools

Feeds