TinyPortal

Development => Support => Topic started by: Itchdog on September 25, 2026, 05:19:05 PM

Title: Remove Comment Counter
Post by: Itchdog on September 25, 2026, 05:19:05 PM
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.

(https://evolvedones.net/gallery/3_25_09_26_12_14_10.png)
Title: Re: Remove Comment Counter
Post by: @rjen on September 25, 2026, 07:27:39 PM
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' : '');
                }
Title: Re: Remove Comment Counter
Post by: @rjen on September 25, 2026, 08:12:23 PM
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;
Title: Re: Remove Comment Counter
Post by: Itchdog on September 26, 2026, 04:27:49 PM
Awesome! Thanks so much @rjen.
Title: Re: Remove Comment Counter
Post by: @rjen on September 26, 2026, 04:38:35 PM
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
Title: Re: Remove Comment Counter
Post by: Itchdog on September 29, 2026, 04:33:35 PM
I'll give you my cat if you can add the option to have the frontpage topics show horizontal instead of vertical  ;D .
Title: Re: Remove Comment Counter
Post by: @rjen on September 29, 2026, 09:29:09 PM
Quote from: Itchdog on September 29, 2026, 04:33:35 PMI'll give you my cat if you can add the option to have the frontpage topics show horizontal instead of vertical  ;D .

I hate cats...
Title: Re: Remove Comment Counter
Post by: Michael Vail on October 20, 2026, 07:39:55 PM
@rjen :D  :2funny:  ;D  :D
Title: Re: Remove Comment Counter
Post by: @rjen on November 02, 2026, 02:10:12 PM
Included in version 3.0,4