Adding Thumbnail Image From Post to a Widget
-
Hello! This is probably an odd and possibly impossible question to answer, but I'm screwing around in NodeBB for a personal project and am trying to add images to a few Recent Topics widget I created:
I'm trying to make my test forum's front page have a sort of "news outlet" feel. Topics are moved into a category that automatically generates the titles, but I'm wondering if they can automatically generate thumbnails too. Or if there's an <img /> html code that will pluck out thumbnails from the articles that are linked (NodeBB uses that {{body}} tag for the data that changes, such as the links and the title. Would love the ability to extract an image from that, somehow... but again, I'm unsure if that's possible).
It's important to note that I'm only on the starter plan for a few weeks (again, was just fiddling around with a personal project and getting used to NodeBB, which is used on a different forum that I'm a part of). I don't know a ton about HTML and CSS, just enough to be dangerous. Hope this makes sense and I can get some help! Thanks in advance!
-
Hello! This is probably an odd and possibly impossible question to answer, but I'm screwing around in NodeBB for a personal project and am trying to add images to a few Recent Topics widget I created:
I'm trying to make my test forum's front page have a sort of "news outlet" feel. Topics are moved into a category that automatically generates the titles, but I'm wondering if they can automatically generate thumbnails too. Or if there's an <img /> html code that will pluck out thumbnails from the articles that are linked (NodeBB uses that {{body}} tag for the data that changes, such as the links and the title. Would love the ability to extract an image from that, somehow... but again, I'm unsure if that's possible).
It's important to note that I'm only on the starter plan for a few weeks (again, was just fiddling around with a personal project and getting used to NodeBB, which is used on a different forum that I'm a part of). I don't know a ton about HTML and CSS, just enough to be dangerous. Hope this makes sense and I can get some help! Thanks in advance!
Are you using the recent topics widget that's included with core? I think that widget doesn't display the thumbnail of the topic, but we can probably add that in or make it a setting in the widget itself.
-
S support@community.nodebb.org shared this topic
-
baris said in Adding Thumbnail Image From Post to a Widget:
> Are you using the recent topics widget that's included with core?Yep, that's correct!
> I think that widget doesn't display the thumbnail of the topic
And so is this!
> but we can probably add that in or make it a setting in the widget itself.
That would be amazing for the particular application I'm going for! Don't know how easy that'd be to spin up, but it would allow for my displays to actually have visuals!
Are there any core widgets that do display thumbnails? I didn't find any on my end.
-
No the widgets that come with a default install don't display the topic thumbnail, I will look into adding that in.
-
I've added the topic thumbnail to the recent topics widget, you should see it when you use that. You might need to use some custom css if you want to adjust the size though.
-
That's awesome! I'll play with the CSS on my end since it looks like this:
But the turnaround is amazing man! Thank you thank you!