I last updated on the 5th. It’s odd because the results are different across three sites. Here are the settings for each site:
David, can you supply some reliable Steps To Reproduce?
Thank you for this plugin, very good one.
Sorry but can you help me figure out how to add those #featured images on frontpage?
How can i add Category to show last 4-5 posts with picture and title, im kinda lost atm
I have found options where i can add Featured posts, but after i select some of them, they wont show up on frontpage
Something like:
The most important thing is to select the right tag and make sure the Topics are tagged.
There are two caveats:
-
In the plugin, this only works on desktop (the TC version supports Featured Images on mobile too)
-
In the plugin, you can’t make the list of images specific to the Category (you can in the TC)
Please note the distinction between “Topic” and “Post”. Topic is the entity that has a thumbnail.
Make sure there no JavaScript errors in the browser console. If there are related ones please share them here. Featured images were recently fixed for a breaking change in core.
Thank you, its activated
Is that possible to move topic list preview (featured) section above to the navigation section?
I can’t find a way to repro, it’s not critical so we’ll just let this go.
On another note, I am having another issue that I thought I brought up before but I can’t find anything. When you visit a topic and then go back to the category, it doesn’t return you to where you were.
I have tried disabling all other TC’s, different browsers, all with the same results. I would test this on https://try.thepavilion.io/ but there doesn’t seem to be a category with TLP enabled.
I have problem with adding sidecar plugin. I added this line to my app.yml
- git clone https://github.com/merefield/discourse-topic-previews.git -b "theme_sidecar"
When I do launcher rebuild app it gives me error:
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse/plugins && git clone - git clone https://github.com/merefield/discourse-topic-previews.git -b "theme_sidecar" failed with return #<Process::Status: pid 424 exit 129>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
Update
Ok, it seems this plugin conflict with “Topic List Previews” plugin. So, I removed topic list repo and added it. And launcher rebuild worked. After installation of theme_sidecar there is no option for like buttons?
Any idea?
It’s either or If you choose to use the TC, the sidecar plugin adds extra functionality. You were duplicating the plugin and the TC sidecar. That won’t work.
Look at the TC settings. You need to enable Topic List Actions.
Thank you for your answer. I am installed theme_sidecar. But It appears as “Topic List Preview” in the plugin tab.
Topic list actions enabled for the tags but I could not see any difference
Also, I am just using the topic list preview theme component for the featured posts feature. Can I add the number of likes of the topics to the boxes shown as featured post with this plugin?
Yep it should because it is. Plugin settings always appear in ‘settings’. The rest of them will appear in Customize on the TC itself. This setup is a hybrid.
What does your topic list actions settings look like on the TC?
No that’s not supported. Nice idea for an enhancement though. Although it’s already very cramped in there so I’d suggest this is a little fussy to implement. PR welcome if you can use the available space well.
I am trying.
We need to change this hbs file i think?
<div class="featured-details">
{{preview-unbound topic.thumbnails opts=(hash featured=true)}}
<div class="content">
<div class="title">
{{topic.title}}
</div>
{{#if featuredExcerpt}}
<div class="excerpt">
{{{featuredExcerpt}}}
</div>
{{/if}}
<span class="user">
{{featuredUsername}}
{{avatar featuredUser imageSize="small"}}
</span>
</div>
</div>
These buttons?
{{raw 'list/topic-meta' likesHeat=likesHeat title=view.title topic=topic}}
{{#if showActions}}
{{raw "list/topic-actions" likeCount=likeCount topicActions=topicActions}}
You will need hbs and css changes. Perhaps some JavaScript too? I would prioritise the TC ( which is in any case easier to develop for)
Make sure you set up a proper development environment, use a fork and test it all together :). If you get a high quality result I will consider a PR.
It will need to be behind a setting as if the images are too small there will be no space so should definitely be optional.
Good news! I got the result I wanted. However, I could not add a function to turn this feature on or off from the settings section. I’m new to javascript and trying to learn.
The change I made is quite simple, I just made the following changes. Do you want me to do a pull request anyway?
tlp-featured-topics.hbs
<div class="likecount">
{{number topic.like_count}} {{d-icon 'heart'}}
</div>
common.scss
.likecount {
position: absolute;
bottom: 10px;
left: 10px;
}
What do you think?
Best to take this offline and to GitHub if and when you submit a PR
That’s not possible in the settings.
In your fork you could change the connector folder to put it in a different place. Use the plugin outlets TC to find a preferred location. You might need to amend the CSS too to make this work.
What I suggested doesn’t work? Just create the new folder and move the two files. You shouldn’t have to touch the JavaScript.