Topic List Thumbnails

Default thumbnail mode should be set to none if you don’t want to use it everywhere.

The other settings will work as expected

2 Likes

I don’t want to be annoying, but I’m curious if this could be considered? We feel that liking from a thumbnail is a valid use case (you can judge the image without seeing the full version), and that it would greatly increase engagement for the more ‘instagram-oriented’ visitors.

6 Likes

Hi folks,

great components. I want to make it so that the thumbnail shows the LAST image of a topic, not the first one provided by the topic creator.

I looked through the code and found the topic.thumbnails decorator but I cannot reverse engineer how this is created so that I can build logic myself to get the last image in that topic.

Can anyone point me to docs on how to extend/build decorators for the topic?
Discourse is amazing!

Thank you

It also is great to add a User Preference so that users can control the list types themselves. And also make this an optional thing assuming some forum owners wouldn’t want that. We want that option though.

I could build it and rais a PR I guess.

2 Likes

It’s a Theme Component, they can just choose another theme without this component. No code required, just name the Themes appropriately.

7 Likes

That worked well, thank you!

4 Likes

Hey David

what do you think about adding the topic author avatar to the minimal-grid on top of the thumbnail in the lower right corner, something like this? That would be a great addition.

6 Likes

If it’s behind a theme setting (default disabled), then I agree this would be a good option for some sites. pr-welcome

7 Likes

On @jrgong forum the images don’t load after the 10th row. This seems to be independent on the actual amount of images (i.e. it’s always the 10th row, even if there are only a few topics that even have a thumbnail).

No network errors, nothing in console. Any ideas?

4 Likes

I’ve seen this happen when the last topic in the list is hidden via CSS (e.g. someone has added a CSS rule to hide closed topics). Could that be happening here?

Happy to take a quick look if you can send through a link.

4 Likes

@jrgong the TC is currently in preview mode so non-users cannot repro it (they can’t preview_theme_id). Is it ok to enable the TC temporarily on that one category so David can have a look?

3 Likes

Quick update: We figured out that some inofficial plugin was the culprit. We will update here once we pinpointed the one responsible :slight_smile:

4 Likes

So it was not even another plugin. It’s a bug(?) in preview mode.

The lazy loading turns out to break when you open the Topic Thumbnails theme component in preview mode while your currently selected theme does not already include it. Fully able to repro this on stable, did not try it on beta or tests-passed.

4 Likes

Is any way not to upscale tiny images 30x30 etc? They come with incoming emails:

изображение

Played with CSS, got some result, but ideally skip them totally…

изображение

3 Likes

To hide picture as thumbnail you can use spoiler/hide details as well:

the result is a tiny triangle :slight_smile:

![image|612x500](upload://cILOby5v31IEtJtbOEEDgXQPZ7Z.jpeg)

UPD:
You even may blur it:

[spoiler]
[details=""]
![image|612x500](upload://cILOby5v31IEtJtbOEEDgXQPZ7Z.jpeg)
[/details]
[/spoiler]
5 Likes

I’m sorry if this was asked before, I tried searching without any luck.

I was wondering if it’s possible the make it so that clicking the thumbnail in list mode could send you to the first message of the topic?

Thank you for your hard work :slight_smile:

2 Likes

It seems just what I was looking for: a simple replacement of the original plgin topic-list-previews, as I have tried the replacement as a theme component and could not get it to work, and it is full of options I won’t need.

We just use the option to present a miniature of the firs image in each topic instead of the image profile of the author, at the left, in the list views.

But I have activated this TC and used list as the thumbnail default mode:

But it does not show the thumbnails, it continues showing the avatar of the author in every page, for example here in recent page list:

I must be misunderstanding something.
How should I configure it?
Is there a detailed config guide?

May be it is due to only showin thumnails for new posts… in that case Is it possible to recreate thumbnails for old posts to be shown with them?

2 Likes

That “Author” column does not come from Discourse core, or the topic-list-thumbnails theme component.

Do you still have the old topic-list-previews plugin and/or theme component installed? If so, make sure to completely uninstall it.

3 Likes

Thank you David
No, I deleted the topic-llist-thumbnails in the app.yml and make a launcher rebuild.

I have deleted the topic-list component too from the Themes Components.
These are my current components:

And the app.yml hooks:

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-chat-integration
          - git clone https://github.com/discourse/discourse-math.git
          - git clone https://github.com/discourse/discourse-solved.git
          - git clone https://github.com/discourse/discourse-staff-notes.git
          - git clone https://github.com/discourse/discourse-assign.git
          - git clone https://github.com/discourse/discourse-checklist.git
#          - git clone https://github.com/angusmcleod/discourse-topic-previews.git
          - git clone https://github.com/discourse/discourse-data-explorer
2 Likes

Do you have any other third-party plugins installed? Can you share a link to your site?

Maybe you have Discourse Topic Author installed?

3 Likes

I have updated it in my response.
The site:

Yes topic author is installe, but used in other places.

With the topic list preview, the image was showed.

2 Likes