TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,009
  • Total Topics: 21,331
  • Online today: 1,809
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 1028
  • Total: 1028

Remove Comment Counter

Started by Itchdog, September 25, 2026, 05:19:05 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Itchdog

Hi. I run a news and current events forum with SMF 2.1.7 and the latest version of TP. Is there a way to remove the comments information at the bottom of a post on the frontpage (see image). I couldn't find a setting for this. If it requires a file edit, can you point me to which file?

Also, I'd like to remove the "views" info at the top of the image as well.

Thanks.



Join us for discussion of the latest current events: https://evolvedones.net

We also have a channel on the Undernet IRC Network: #evolvedones

@rjen

#1
This is not configurable. The only way to remove those fields for forum posts on the frontpage is to make code changes to file Article.php

This will get rid of the "views"
File: \TinyPortal\Article.php

Find
              if (!isset($context['TPortal']['frontpage_visopts'])) {
                    $context['TPortal']['frontpage_visopts'] = 'date,title,author,views' . ($context['TPortal']['forumposts_avatar'] == 1 ? ',avatar' : '');
                }

and change to

                if (!isset($context['TPortal']['frontpage_visopts'])) {
                    $context['TPortal']['frontpage_visopts'] = 'date,title,author' . ($context['TPortal']['forumposts_avatar'] == 1 ? ',avatar' : '');
                }
Running Latest TP on SMF2.1 at: www.fjr-club.nl

@rjen

And to get rid of the comments sections...

File TPsubs.template.php

find

function article_boardnews($render = true)
{
global $context, $scripturl, $txt;

if (!isset($context['TPortal']['article']['replies'])) {
return;
}

and change to

function article_boardnews($render = true)
{
global $context, $scripturl, $txt;

// if (!isset($context['TPortal']['article']['replies'])) {
return;
// }
return;
Running Latest TP on SMF2.1 at: www.fjr-club.nl

Itchdog

Awesome! Thanks so much @rjen.


Join us for discussion of the latest current events: https://evolvedones.net

We also have a channel on the Undernet IRC Network: #evolvedones

@rjen

After your question I was looking into this functionality and noticed that there is very limited control on the layout for these topics on the frontpage.

I may add some options for this in the Frontpage settings in the next version
Running Latest TP on SMF2.1 at: www.fjr-club.nl

This website is proudly hosted on Crocweb Cloud Website Hosting.