Topic List Previews

(Angus McLeod) #305

Perhaps, but tbh this is not at the top of my todo list atm.

Not really a priority for me.

Sorry, I’m working a fair bit on my own custom Discourse installation at the moment, so I’m not going to be building a lot of new features here. Just the things I mentioned at the end of my long post.

I’m happy to accept PRs for these kind of things though.


Thanks Angus, no issues :slight_smile:

(Pad Pors) #307

thanks, got your point. the only point i’m concerned with is “why should the title have the same weight in visibility as views?”

won’t people then chose the topic based on other factors rather than the importance of the content?

or let’s say should i answer the question of “how can we reduce food waste?” because of the importance of the problem and number of hungry people who exist around me, or should i reply it to be seen by a community of 100 people who are currently discussing about the problem?

anyway i know my concern is raw :poultry_leg: :wink: and i’m sure there’re lots of thought behind the current design. i just asked in order to cook what i had in mind via discussion.

as we tested in our forum, the topic excerpt is not being read that much in the current configuration. and the question is how to bring the balance toward adsorbing people by the topic itself and not the participant information.

(Angus McLeod) #308

Finally got around to fixing this. If you update to the latest, the broken images should no longer appear.

(Angus McLeod) #309

Just circling back here. So in this implementation, would the post the image is take from also be the post from which the topic excerpt is taken from?

If so, the way to implement this could be to add an extra button to posts, visible to the topic author, mods and admins, that selects that post to be the ‘preview’ for the topic.

If not, I’m not sure if separating the preview image from the preview excerpt is a good idea.

(Angus McLeod) #310

I see this feature as different from the ‘manual selection’ feature (unless I’m misunderstanding it). This seems to be a feature whereby you set a global or category ‘fallback’ if there is no automatically generated - or manually selected as per the logic discussed in my previous post - topic preview image. Setting this fallback would ensure that all topics for which it is set always have a preview image, regardless of whether the topic itself has an image in it. Is that what you’re thinking?

(Tobias Eigen) #311

it worked - thanks! So glad you fixed this and appreciate it.

but why does that same topic (the one with the featured image in this screenshot) not have a line or two of a teaser text, as do the other topics in the list?

Yep - that’s the idea, much better expressed.

(Tobias Eigen) #312

Maybe the answer is an optional (staff only) field for inserting a url of an image to use as featured image. If none is set it finds one automatically, and if it doesn’t find one it takes the fallback url as set in the category settings.

(Kevin Nguyen) #313

I’ve installed the plugin but the images only show in each category

, but not displayed in all categories

Please help me display in all categories, Thank all!

(Andrew Roth) #314

Hi Angus,

Thanks for making this plugin, it looks very useful.

I tried to install it on the latest discourse master and with your master, and I do see the settings for the global, but I don’t see any custom settings in the categories. I enabled the global settings and did a rake posts:rebake and cleared out all the caches but I still don’t see any post previews. Any ideas what’s going on and where I might start poking around to try to fix this? Thanks.

(Angus McLeod) #315

@kevin.nguyen.8699 @andrewroth Hey, thanks for using the plugin. There are two ways to use the plugin:

1 - On a per category basis. The settings are in the Category settings in the Settings tab.

2 - On a global basis. The settings are in Admin > Settings > Plugins.

@andrewroth Currently, the topic image previews will only show up reliably for topics with images posted after the plugin was installed.

(Angus McLeod) #316

It was falling just outside of my pixel calculations for the height of the excerpt in that scenario (double line title with topic actions). All elements have to fit into a max height of 100px. I’ve made some small tweaks that will allow for a single line excerpt in that scenario.

(Andrew Roth) #317

I figure it out! I just needed to precompile assets. Coming from non-ember rails, a server restart and cache clear is sufficient to reload any templates, but with hbs I guess they need to be compiled, which thinking about it now makes sense :slight_smile:

(Andrew Roth) #318

Hi again,

It seems the topic previews are of the latest post on the topic. Is there a way to display the first post?

(Pad Pors) #319

it shows the excerpt of the main topic or the selected answer (not sure about this one), in our case.

(Kevin Nguyen) #320

Perfect, Thank you so much! :slight_smile:

(Andrew Roth) #321

Ah, I had a bug in my initial post imports that reversed the post order, and it seems the post previews got generated from that. Once I cleared stuff out and rebuilt it it was showing the first post. Thanks for confirming it should be previewing the first post.

(Angus McLeod) #322

There were a couple of reports of incompatibility between this plugin and Babble. That is now fixed.
@Tom_Newsom @companyhen cc @gdpelican

(Philip Battin) #323

Hi would it be possible to make 2 settings

  • Display heart button on front page even if you are not logged in - which is now going to be default Discourse behavior
  • Display heart button even for the topics you created yourself - i know you can’t like your own items in discourse but we would like to at least have a grey heart visible on own threads too.

E.g.below is a sketch of how we want our site to look and we’re pretty close but the heart is not visible if you created the topic yourself

(Jesse Starr) #324

Hello @angus , Thank you for making this plugin as it is exactly what we’d need in order to use Discourse! Is it possible to change the number of lines shown in the post excerpt?