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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,231
  • Total Topics: 21,353
  • Online today: 606
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 577
  • Total: 577

removing "X comments | Write Comment" for forum post in main page

Started by nelsontyc, April 15, 2009, 02:42:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nelsontyc

Hi, may i know what should i do to the source code of the TPortal template so that i could remove the "X comments | Write Comment" from the forum posts shown in the first index page?

I am currently using SMF 1.1.8, TinyPortal v1.0 beta 3, OverViewLight theme.

Really hope that someone could help me on that!  :-\

Renegd98

If you are talking about forum post themselves you may need to ask this over at SMF. By first index page are you talking about the frontpage of TP or from the index page of the forums page?

nelsontyc

Hi! Thanks for your speedy reply!

I am talking about the front page of TP. When i list the forum posts at the main page of TP, it will always show up "X comments | Write Comment" at the bottom of every single forum entries.

I wanted to find any settings to remove it, but i couldn't find it. So is there any ways for me to remove it by editing the source code of it?

Thanks for your help!  :laugh:

nelsontyc


ZarPrime

nelsontyc,

Before I start looking for where this is located in the code I want to make sure I'm not wasting my time with this, since it's going to take a while to find it.

Are you saying that you want people on your Forum to be able see the first post in the topics from your News Board but you don't want them to be able to see how many replies were made or even be able to reply to those messages?

ZarPrime

nelsontyc

Hi,

Really thanks for your reply! Is the news board you mentioned also means the front page of the TPortal? If it is then it is correct!

I enabled the "What to display on frontpage" option to show "Only forum-posts", but I wanted to remove the "0 comments | Write Comment" that was written at every single forum posts shown on the TPortal main page.

Thank you so much for your help!!

ZarPrime

Yes, that is correct.  Removing that means that your Forum members will not be able to respond to these messages from the Front Page.

It's too late to start looking for this tonight.  I'll do it sometime tomorrow.

ZarPrime

nelsontyc

Thanks for your help! really hope to see your reply soon!  :D

Zetan

I'm assuming it works from SMF's SSI.php file, in the root directory.

in ssi.php, find:



', $news['link'], $news['locked'] ? '' : ' | ' . $news['comment_link'], '




[edit]

The whole section for that code is:




   foreach ($return as $news)
   {
      echo '
         <div>
            <a href="', $news['href'], '">', $news['icon'], '</a> <b>', $news['subject'], '</b>
            <div class="smaller">', $news['time'], ' ', $txt[525], ' ', $news['poster']['link'], '</div>

            <div class="post" style="padding: 2ex 0;">', $news['body'], '</div>

            ', $news['link'], $news['locked'] ? '' : ' | ' . $news['comment_link'], '
         </div>';

      if (!$news['is_last'])
         echo '
         <hr style="margin: 2ex 0;" width="100%" />';
   }



I would just comment that line out

// commented line, ignored by browsers.

nelsontyc

hi zetan,

thanks for your reply. I tried to delete or commented that line out, but it didn't work  :'(.

Hope that you could help me on this.

Thanks a million!

This website is proudly hosted on Crocweb Cloud Website Hosting.