Topic List Previews


(Chris Beach) #547

Yes, I’ve been pondering your (good) question, but not sure how to answer, beyond the bullet points in my post.

Trying to design for small mobile screens is a massive challenge. If pics are included, they really get in the way! And my forum users seem keen to showing as many topics on the list as possible on the small screen, so the content-driven Reddit style would probably get a few backs up.


(Erica Peterson) #548

Just wanted to say thanks for this – our users definitely wanted image and text previews.

One question: is it possible to get video previews as well? When people post youtube videos (for example) it would be neat to see the preview image that youtube chooses the video, so people are aware there’s media content in that topic.

Thanks!


(Angus McLeod) #549

Hey Erica, yes, that is the next item on the agenda here. As you asked so nicely, I’ll give this a shot this weekend :slight_smile:


(Chris Beach) #550

I’m getting an odd bug on my forum where two blue update badges are shown on each topic.

I have the TLP plugin installed but not enabled on the mobile view - I have suspicions it is the TLP plugin that’s causing this though.


(Angus McLeod) #551

Thanks Chris, fixed.


(Dante) #553

hey This maybe a problem, use topic list previews cant displaying sub-categories in boxes


(Vincent) #554

Hey @angus, any update regarding that feature?

Thanks :slight_smile:


(Angus McLeod) #555

Sorry guys, I’ve been quite busy with other stuff. Will get back to this plugin asap.


(Dante) #556

I want to ask you a question how can I change the thumbnail size?



(Pad Pors) #557

look for thumbnail in the admin setting panel and you’ll see two settings regarding the width and height of a thumbnail:

topic list thumbnail width
topic list thumbnail height


(SMHassanAlavi) #558

@angus
I am writing a widget and want to use the thumbnail of each topic and I do this(res is a topic ajax):

cooked = res.post_stream.posts[0].cooked;
      if (cooked.search("<img")) {
        imgUrl = cooked.substr(cooked.search("<img") + 4,cooked.length);
        
        imgUrl = imgUrl.substr(imgUrl.search("src=\"") + 5,imgUrl.length);
        
        imgUrl = imgUrl.substr(0,imgUrl.search("\""));

But I got the same problem as you and I get the first emoji instead of first image(This is because both emoji and images shows in img tag) and you have solved this problem. can you suggest for solving this problem for me?


(Angus McLeod) #559

Rather than trying to parse the cooked post, use the original thumbnail links saved as JSON in the ‘thumbnails’ TopicCustomField: see here.

This means that if you have a Topic object, you can access the thumbnails for that topic if the thumbnails custom field is serialized with that object.

For example, each topic list item has the thumbnails available because they are serialized here, and used by the client here.


(SMHassanAlavi) #560

This code returns error in console and make my widget crash:
console.log(this.get('topic.thumbnails'));


(Angus McLeod) #561

See if you can figure out why. When you’ve tried what I suggested, ping me again.


(Pad Pors) #562

Hi Angus,

Do you think the plugin speed can be improved? also the site size?

Currently our site is highly affected by the plugin:


(Angus McLeod) #563

Do you have any evidence it is this plugin that is affecting your site speed?


(Mittineague) #564

I would be more inclined to have concern over “browser cache” warnings than I would about initial page load speed. Though with vs without plugin load speed differences if drastic enough could indicate possible room for improvement


How to increase site speed
(Pad Pors) #565

hard question, :thinking: correct me please if I’m wrong:

the only thing that seems fixable in the Make the Web Faster  |  Google Developers panel, and the first thing is about optimizing topic-images about 62% reduction. is there any way to reduce this image size for the thumbnails?

thanks for the hint. let me search how I can do this! as it points to setting some expiry date for the google analytics as well as the fonts.


(SMHassanAlavi) #566

I think our site speed’s problem isn’t Topic list previews:
when we don’t use it:


when we use it:

there is just 500Kb transfer from this plugin,
Without this plugin we have 1Mb transfer more than meta.dsicourse


How to increase site speed
(Pad Pors) #567

a question Angus:

the avatars are loaded twice in our site, one in 25px, and another in 32px. does it have anything to do with the plugin?

I see some other strange things in the developer.google reports:

as you see in the right preview of the mobile version of our platform, the topic-list-preview is not active for mobile version. but the developer console is saying that we need to reduce the size of the preview images!

is the plugin working even when it’s not activated? or should I ignore the Make the Web Faster  |  Google Developers report?