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 wrote a city affairs column in Hamilton Magazine, and several of his articles have been published in the Hamilton Spectator. His articles have also been published in The Walrus, HuffPost and Behind the Numbers. He maintains a personal website, has been known to share passing thoughts on Twitter and Facebook, and posts the occasional cat photo on Instagram.

4 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

[ - ]

By jajal (registered) - website | Posted July 06, 2019 at 08:21:45

Hi there to every one, the contents existing at this website are genuinely amazing for people knowledge, well, keep up the good work fellows. betta fish for sale

Permalink | Context

View Comments: Nested | Flat

Post a Comment

You must be logged in to comment.

Events Calendar

There are no upcoming events right now.
Why not post one?

Recent Articles

Article Archives

Blog Archives

Site Tools

Feeds