How can you set up comments to show all comments under a photo?

benz

Joined: 2009-01-16
Posts: 5
Posted: Thu, 2009-01-29 12:50

Hi all,

I'm just starting to develop my first theme in Gallery 2 and I'm finding the way comments work to be a bit weird in a world of blogs, social networking sites and forums (like this one!) and I'm trying to change it.

Currently in the classic theme it shows X recent comments under a photo, with the newest at the top. No other popular sites work like this, so its quite counter intuitive - everyone expects the oldest at the top and all the comments to be on the same page as the original article/image.

If you want to see all comments in chronological order (ie so you can follow the conversation) you have to follow a link to get the "comment.ShowComments" view to render. This shows comments correctly (ie blog style) but takes you away from the photo that you are commenting on!

Is this easy to change?

The only existing g->block call I've found so far is the {g->callback type="comment.LoadComments" itemId=$item.id show=$show} one. This is sorted newest first and seems to be of an arbitrarily fixed length based on the "show" parameter. I could set the "show" value really large then decrement through the array, but that's a really ugly hack and not a general solution.

As the ShowComments view is already doing the right thing, is there already another callback that wraps this up for inclusion in a template?
If not can I just extend the Callback.inc to call the GalleryCommentHelper::fetchAllComments method or is there a simpler solution? I thought I'd ask in case there's a configuration switch in the admin that I just need to turn on before I wade into the code!

Thanks!