Show Users As List Of Two, Not Frequent Posters

I have my production version of Discourse running on discourse.sulliops.co, but I want to keep the list of users in a topic from being any more than two.

On my forum (and the Meta), the Users list is shown like the screenshot below, with the original poster, frequent posters, and most recent poster.

I want it to look like below, with the original poster, and the most recent poster.

If this is a JS hack, please also include instructions on how to edit this, because I know nothing about doing so. If it’s a setting, I’m blind so feel free to let me know :grinning:

AFAIK, support for the CSS pseudo “not” is still poor.
Try targeting all 5 avatars and display: none them.
Follow that with CSS that targets the avatars you want to display only those.

1 Like
/* hide all avatars */
.topic-list .posters a {
    display: none;
}

/* display first avatar in list */
.topic-list .posters a:first-of-type {
    display: inherit;
}

/* display last avatar in list */
.topic-list .posters a:last-of-type {
    display: inherit;
}

Admin, Customize, CSS/HTML

7 Likes

This worked, thanks!!

Regarding this, the code you gave me made it so that only two users are shown, but I want it so that first is the original poster, and last is the most recent poster, none of this “frequent poster” stuff. At first it seemed like it was fine, but now if the original poster replies, the second user in the list becomes a frequent poster.

That is exactly how it works. First and last. Take a look at the topics in the topic list here if you don’t believe me.

What does this tell you though? When I hover over the system icon it shows, “Original Poster, Most Recent Poster.” Then my icon shows “Frequent Poster” when I hover over it.

2 Likes

Ahh,

You would do something like

/* hide all avatars */
.topic-list .posters a {
    display: none;
}

/* display first avatar in list */
.topic-list .posters a:first-of-type {
    display: inherit;
}

/* display avatar of latest */
.topic-list .posters .latest {
    display: inherit;
}

Not a:last-of-type cause it could target frequent.

6 Likes