Topic List Previews

(Angus McLeod) #346

I’ve merged v0.1 of the social media discovery setting.

There are now 3 extra settings in Settings > Plugin if you have this plugin installed.

Important thing to note. Thumbnails for the topic list are sized according to the thumbnail size setting at the time they were uploaded. So if you have been using this plugin prior to this update your thumbnails are going to be 100x100 and 200x200 (retina). This means that if you increase the thumbnail size now, the existing thumbnails will look pixelated because they are too small for the image size. I will add functionality to save a new thumbnail if the post containing the thumbnail is edited which will also allow this issue to be overcome.

With the setting on (and the thumbnail size set at 600x150).

Same list with the setting off.

(taylorchu) #347


After I installed the plugin and turned on both text and thumbnail preview, only text preview is shown. Do you know what might happen? I am running discourse version 3bd8b55fce633c469a49d9b0afd9750e9e07390c.

(Pad Pors) #348

vow! that was nice and fast Angus :smiley: thanks.

I’ll try the new setting during the week, and let you know the results.

(Angus McLeod) #349

Hey, the problem on your instance may be that the max image size is set at 0kb. In any event I can’t upload an image to test.

Please change that setting and try creating a new topic with an upload in the first post.

(ginger man) #350

@angus this looks great. If mobile view is added, it will be a killer. Kudos for your quick work.

(taylorchu) #351

Is it possible to show the image by processing image link from post content? It seems possible from the source code.

Max image size is set at 0kb because I don’t want to host any image at this point. All the images are from external links.


(Tom Newsom) #352

The plugin needs to store the thumbnail, which it can’t if you’ve disabled uploads. You really dont want to hotlink to all the external images from the topic list.

(charles) #353

Scrolled through past posts and I’m guessing plugin only adds a thumbnail to each topic?

Can this plugin make the discourse home a more blog/news style look instead of traditional forum look? @angus looking for something similar to this but it’s marked as broken-plugin. Also looked at GitHub - scossar/discourse-curated-home but that one is also broken.

(Pad Pors) #354

ّI think it does what you are asking. please take a look at this post:

(Angus McLeod) #355

Yes, as @Pad_Pors mentions, give the social media discovery setting a whirl

(OG) #356

Hello, I just wanted to thank you Angus for this great plugin and out of curiosity (I haven’t tried installing plugin yet) - what is the current state of mobile version? Is it supported or there are no image previews in mobile version?

(Angus McLeod) #357

Hey, I’ve almost finished it. The branch is here. I’m just have some templating issues. See here.

(Pad Pors) #358

two very simple things regarding the social media UI:

  1. both names and avatars of all the users is being shown in the social view. of course one can change it by some css tricks, but i think it becomes too noisy if more than 2 users are participating in a topic.
  • only avatars are shown in the main list.
  • names and avatar of the last poster is shown there.
  1. at the moment, all the images become 600*150 pixel, even if the width of the image is less than 600 pixels. is it possible to make the image size in the thumbnail conditional: if the image real width size less than 600px, then the image doesn’t get stretched. it’ll have less order in the main page, but i don’t think it makes the page noisy.

(charles) #359

Hi @angus how easy would it be to adjust the layout? Currently it looks like a single column and would like to make it two or more columns to fill up the space. How to go about it?

edit: adding pictures to show possible ways to fill the white space

(Tom Newsom) #360

This is all possible with css.

This is just a proof of concept. Needs more work for a polished look like your example

(charles) #361

Surprised to see layout use tables but will certainly give it a go. Thanks for sharing the link @Tom_Newsom

(Mittineague) #362

The Discourse Latest page and Users page, and a few others, use tables.

It is tabular data after all.

(ginger man) #363

@angus I tried the social media setting. It seems to be working fine except for one thing. The optimised image (600*100px) is pointing to direct s3 link while there is a cdn configured infront of the s3. The original image is rightly pointing to cdn.

(Angus McLeod) #364

Yes, I went with the maximal implementation first. The thought being that people can arrange or hide the elements to their satisfaction using CSS.

I’m going to leave it that way for now actually. As you say, you can hide the elements you don’t want relatively easily.

(Angus McLeod) #365

I just merged the mobile web version of Topic List Previews.

  1. You can turn it on with the Topic List Mobile Previews setting.

  2. The Social Media Discovery has it’s own mobile web version that is always applied if the Social Media Discovery setting is on.

So the default setting (without Topic List Mobile Previews turned on), just looks like normal Discourse mobile web.

With the Topic List Mobile Previews turned on.

With the Social Media Discovery turned on

There are a number of permutations in between if you play around with the other settings.

Considering this has relatively complex view logic to make all the views interoperable there may be some bugs.

I will fix any significant issues that arise, however now this is done I will be turning my attention away from Topic List Previews to implementing a full page Discourse Chat.