Right procedure to display likes (or anyother) column in the main page

Hi,

Sorry guys for most likely an obvious question here, but I got confused with what is the right procedure to display the likes column in the main discourse page.

Right now it shows Category Users Replies Views and Activity, well actually I just want to add the likes column there, only this, so the users are free to sort it by likes (actually they requested me to enable this feature).

I have been reading related topics but I want to do just he opposite of hiding anything, and I have seen also the query string that works which is domain.name/?order=likes, so once I go to Admin -> Customize -> CSS/HTML -> new … what do I have to type here, just a CSS snippet or do I need to run a script in the section?

  • In case of the CSS, what do I have to type in the display section of
    the .topic-list .num.likes ?
  • In case of the script section, is there any documentation regarding
    the objects and methods like Discourse.NavItem or show some easy example?

As always any help will be more than wellcome.

Thanks!

Read this
https://meta.discourse.org/t/does-anyone-actually-like-the-likes-column/18397

Hi I already read this before Qasem,

But as you can understand it does not help here, as I said in the post above enabling this feature is a request of our internal users that use discourse, no need or aim to discuss if it is good or bad which of course is a personal taste and out of the scope that I wanted to cover

Cheers

in </body>

<script>
Discourse.TopicListComponent.reopen({
    showLikes: true
});
</script>

should do the trick.

4 Likes

Thanks a lot @sam, it is working fine now