Topic List Thumbnails

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]
2 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:

1 Like

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?

1 Like

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.

2 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
1 Like

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

Maybe you have Discourse Topic Author installed?

2 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.

1 Like

I’m afraid it looks like the Discourse Topic Author component overrides some core templates, which means that it’s incompatible with topic-list-thumbnails. You’ll need to pick one of them to use.

3 Likes

It seems you are right, I can do the previews with the thumbnails from the preview link at the bottom of the TC page.

We used the author theme component to customize the avatar where it was shown, and we used a customization in order to get squares with rounded corners instead of circles.

But even if I disable the topic author, I cannot see the thumbnails.

1 Like

What if you go to the topic-list-thumbnails component, and use the “Preview” button. Does it work then?

If so, it suggests a conflict with one of the other themes/components.

1 Like

Yes it seems to work.

Seems both are incompatible between them.
I have to see what was the use of topic author and decide if we disable it (or we find a solution).

I see that this plugin does not excepert the post and you have another one that does, will try it too.

2 Likes

Now it seems to work, with excerpts and thumbnails and avatar customization.

Just disabling Author topic.

Have to read what it did, and why we installed it, as it has been working for quite long and I don’t remember the use.
If it is not all that important I just will disable it.
Thanks a lot.
@david :
By the way: as an improvement, it would be great to add an option to show the avatar for topics that have no image in it, instead of just showing a selected image.
With an option or using a special meaning placeholder name like $avatar or something like that.

For many uses, it is better to see the author avatar than just the same icon for all the topics with no image.
Another improvent I would like to see is the option to include the excerpts (generated by the corresponding TC) in the masonry and grid views, not only in the list view.

It woud be great to be able to read something of the content.

2 Likes

I run into the same issue, did you find how to display the last image instead of the first one in OP?

2 Likes

Hi, is there an easy way to use e.g. category icon as a place holder image? With old solution (excerpts module) only topics with image in first post had image thumbnail, other had nothing (in list view). With TC I am able to see thumbnails of images, but if topic has no image in a body, it displays a placeholder icon. Is there a way to disable the icon (but keep thumbnails for topics with images), or use category logo as thumbnail? Thank you! Other than that, great component!

2 Likes

Set thumbnails for tag settings seems broken on latest discourse ( 6555f0c11b) + latest topic list thumbnail component

Those 4 settings are not working on desktop/mobile.

3 Likes

The tag setting also doesn’t work on b20307377a and does not work on theme-creator.

3 Likes

The bug was fixed on the latest commit, I was assuming the excerpts component is broken due to a similar reason and tried to apply the same fix on a forked repo. Sadly the result works on theme-creator but not on 6555f0c11b still.

2 Likes

Yep, discourse-topic-thumbnails should be fixed by FIX: Correctly detect current tag (#15) · discourse/discourse-topic-thumbnails@4c666e0 · GitHub

I’ll take a look at the excerpts component :eyes: Thanks for reporting @th21!

1 Like

Hi David,

Is there any way this component could be set up for a single category and not the whole site?

Thanks,
Tom

1 Like

Yep, it can be applied based on a specific category or tag. Once installed, you should see these settings in the theme admin section:

(e.g. here on Meta we have it enabled for #theme and #plugin, with a different mode for each)

1 Like