Hi,
I was wondering if there was a way to display the avatar of the latest post author, and the category of the posts, just like on the front page of the forum, instead of only the topic titles ?
Hi,
I was wondering if there was a way to display the avatar of the latest post author, and the category of the posts, just like on the front page of the forum, instead of only the topic titles ?
Wow, thanks, that’s… too many informations Is there something in between, or should I hide the unnecessary informations with custom css ?
Besides, this displays the topic author, not the latest post author.
The complete template wraps all the information in containers as it’s expected that each site will customize it to match their own design with CSS.
This is great!
Is it possible to change its width?
It’s a fluid container, it will adapt to the width of the parent element.
On my site it doesn’t. It’s too wide for the div it’s in, unfortunately.
Double check the markup, hide and position the elements properly, it should work in any container:
Sadly that doesn’t work on my website. I think maybe the CSS stuff in the responsive framework is confusing it. Is there any way of changing the width (e.g. to be 90% of its current value, or even some number of pixels less wide)?
Did you try using CSS like:
d-topics-list iframe {
padding: 0 5%;
}
?
That doesn’t work. If I edit the iframe tag in Chrome’s F12 console to include width="100%"
it works fine though… is there any way of making that change?
I added an example of how to add custom css to the list on the OP.
Thanks. I tried this. It does make the embedded topics display in a grid format. Unfortunately the width of the grid (i.e. two topics) is still the same width as before - nowhere near 100%.
The CSS above (d-topics-list iframe) doesn’t change the iframe at all. If only it could change it to have “width: 100%”…
I’ve tried it in an otherwise blank HTML document and it still is narrow. Any more ideas?
Loving this embed…
Couple of issues, and a feature request…:
allow-create="true"
and the category="4"
parameters, when I click on the ‘+ Create new topic’ button the ‘Add new topic’ modal/pop-up doesn’t spin up. Is it supposed to?allow-create="true"
and the tags="random-tag"
parameters, when I click on the ‘+ Create a new topic’ button I get taken to the list of topics filtered to random-tag - but the tag drop-down doesn’t display ‘random-tag’ and when I click ‘Add new topic’ the tag hasn’t been pre-filledThis would be good!
Also I’m still keen to sort out the width thing…
The CSS needs adding to your site, rather than Discourse’s embedded, CSS. So you’d have something like this:
<html>
<head>
<script src="https://jonathan5-discourse.com/javascripts/embed-topics.js">
</script>
<style>
d-topics-list iframe{
width: 100%!important;
}
</style>
</head>
<body>
<d-topics-list discourse-url="https://jonathan5-discourse.com" category="5" per-page="5"></d-topics-list>
</body>
</html>
Thank you very much. That seems obvious now. I went from failing to style the iframe’s internal CSS (trying within my site) to failing to style the iframe itself (trying within Discourse). I’ll give this a go and report back!
Update: Your CSS worked - thank you very much.
I’ve just tried this out. In my case it’s category=5
as that’s the category number I’m embedding. It doesn’t show the popup, but opens a new tab with URL https://forum.example.com/new-topic?category_id=5
. Maybe you’ve got a browser setting that blocks this sort of “popup”?
Thanks for confirming it’s working for you, @Jonathan5. I disabled the discourse-tag-sidebar theme component, and now the pop-up’s working
I will take a look into this