Yes, it’s part of the
topic list action setting:
Thanks for your answer. It works!
Another question, can I use it on my different categories? For example, I create a new category named ‘ABC’. Can I use this topic-list-preview for my new category?
Just like the screenshot below, can I use it here?
Yes you can … there are settings for each Category via the Edit wrench:
My teammates always say I’m an idiot…
Just select ‘Latest’ here? If I have a topic, which belongs to this category, but does not belong to ‘Latest’, will it be shown as expected?
I think you need to have a play!
We are using Tiles View on our site and want to highlight specific topic tiles based on the group the poster is a member of. We have a user group that is a higher Patreon level… and want to add a specific CSS class to topics posted by member of this group. I dug into the plugin code, but can’t quite find out how to accomplish this. I’m guessing it needs to happen in preview-edits.js.es6?
That’s correct. You might consider toggling a class based on group membership in
component:topic-list-item and format your highlighting in CSS
However, I would urge you to consider this functionally first - whats the full criteria for highlighting a topic? Are you in essence wishing to highlight watched items based on membership of a group and some additional criteria?
I tried the “social” theme, but it looks a little strange.
My setting is as follows:
I need your help! Merefield
For a start don’t have Tiles and Social on same route. Tiles is very close to being a tiled view of Social. Turn one of them off! Unfortunately the functionality to force mutual exclusion does not exist, apologies, but workaround is simple I’ll add as issue on repo.
Yes that’s correct. Haha, no problem
Yes, sorry, you should also be aware this format is intended for narrow views, e.g. phones or 16:9 tablets in portrait.
It does look awkward on wider browsers.
If you have a view with more width use Tiles or switch both Tiles and Social off.
You can definitely play around with the CSS all you like using your own Theme Component, but I don’t recommend using Social for normal desktop browser views (better for -mobile) … you will lose a lot of real-estate.
Ok that makes sense. I’m just not sure how to get the group membership, I assumed I need to pull it from
topic.creator.group_primary_name but that didn’t seem to work. I’m guessing I may need to get the Original Poster user id and then query user.json
We want to highlight or somehow visually signify the topics posted by members of this speicific Patreon group level. If original poster is member of group, then toggle on CSS, if not then leave as usual. We just want the posts by members of this group to be visually distinguishable from all the other posts in the tiles view stream.
Thanks for your help and thoughts on this! I appreciate it.
One caveat … i’m not sure you can check private group membership yet from client …but that’s coming …
So if your group is private (you don’t let everyone know who your patreons are) you may need to hold off…
Possibly need to add to
So these are closed groups but they are not private… they are publicly visible. If I look at
latest.json I can see the primary groups are posted for users so I think I can access them from within the plugin.
I can see that having all the groups serialized would be useful, I can just check against that list. But I can also just use the primary group, since that works for our site too.
I’m just having trouble grokking the API, is there any API docs for discourse? I’ve looked but can’t seem to locate them.
oh ok, I’ll see if I can try that route. thanks!