Submitted by kore in Postmill (edited )


Over in we're talking about ways to facilitate discussion. One idea that seems popular, unobtrusive, and does not "force" conversations is to offer an option to sort by most recent comments.

Looking through the source of Postmill, it seems that a function to return a paginated list of the most recent comments already exists, in CommentRepository.php.

I unfortunately do not have the php skill to figure out how to expose this function on the site. It looks like the stuff that does front page sorting is in FrontController.php.

Anyway, any leads on this would be much appreciated. Like I said, looks pretty straightforward, I just don't really know what I need to do.

EDIT: okay so exists. I think it'd be cool to put a link to this page titled "recent comments" in a tab right next to "most commented" on the front page. I can probably do the code myself i literally just need someone to help me find where the code that actually makes those tabs is.



You must log in or register to comment.

kore OP wrote

Okay so the really hacky easy solution would be for me to just edit


To include a "Comments" link next to "Forums"

This is the only thing that I feel like I have the ability and time to do.


Fossidarity wrote (edited )

The template for the HTML of the sorting/tabs seems to be here:


kore OP wrote

yeah that's just the "featured/all/subscribed/moderated," not the sorting stuff. it'd be easier for me to put it there though


kore OP wrote

yeah i found that too it's just all done by accessing the variables of the Submission class. There's no example in the code that I can find that demonstrates how to access the variables of the comments of the submission and I do not have the skill to figure it out myself.