Submitted by kore in Postmill (edited )

Hello,

Over in https://raddle.me/f/meta/55551 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 raddle.me/comments 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.

6

Comments

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

/templates/_includes/site_nav.html.twig

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.

2

Fossidarity wrote (edited )

The template for the HTML of the sorting/tabs seems to be here: https://gitlab.com/edgyemma/Postmill/blob/master/templates/front/base.html.twig

1

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

2

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.

2