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,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,910
  • Total Topics: 21,307
  • Online today: 872
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 541
  • Total: 541

Remove this ! (picture attached)

Started by mariusfv, October 24, 2010, 12:54:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mariusfv

Hi,
I use TP 0.98 and SMF 1.1.11.
I use for Front Page to shows Forum-posts, but is set to show only 2 forum posts and Number of characters to show per forum-post is set to 1100 characters - > to show the whole content. So i want to remove the number of views (and replies) because this disadvantages me as long as is set to show the whole content people don't must to open the post.
Please help !

I attach a picture with what I want to remove !

WillyP

What block code are you using to show posts? Post the contents of your blockcode in a codebox, please.

mariusfv

I use default function of tinyportal.... i don't use a block code....so I don't know what to attach.
Can you help me please ?

WillyP

Sorry, I jumped to a conclusion about the blockcodes...

Anyway, try commenting out a couple of line from ssi.php (which you would find in the root of smf install):

// 'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0">' . $row['numReplies'] . ' ' . ($row['numReplies'] == 1 ? $txt['smf_news_1'] : $txt['smf_news_2']) . '</a>',
// 'replies' => $row['numReplies'],


In mine they are lines 1338 and 1339, but yours may vary somewhat.

agridoc

Not an SSI function. I don't have time, but find the area in Themes\default\TPortalBlocks.template.php

// ..and for views and ratings , even comments?
$opts=array();
if(isset($story['options']['views']) || $story['is_boardnews'])
$opts[] = '<span class="smalltext">' . $txt['tp-views'] . ': ' . $story['views'] . ' </span>';
if(isset($story['options']['comments']) || $story['is_boardnews']){
if($story['is_boardnews'] && ($story['comments']>1 || $story['comments']==0))
$what=$txt[110];
elseif($story['is_boardnews'] && $story['comments']==1)
$what=$txt[146];
else
$what=$txt['tp-comments'];

$opts[] = '<span class="smalltext">' . $what . ': ' . $story['comments'] . ' </span>';
}
if(isset($story['options']['rating']))
$opts[] = '<span class="smalltext">' . $txt['tp-ratingaverage'] . ' ' . $story['rating_average'] . ' (' . $story['rating_votes'] . ' ' . $txt['tp-ratingvotes'] . ') </span>';

echo implode("<br />",$opts);


It must be there.
  For Greek aeromodellers and our friends around the world  - Greek Button sets for SMF

mariusfv

I try both solution but no result...continue to show number of views and replies.(with cookie cleared and browser refresh)


agridoc

Found a piece of time  ::)
Similar routine, other file.

For a quick fix: BACKUP TPortal.template.php then find inside this piece of code

// ..and for views and ratings , even comments?
echo '</div><div style="text-align: right; margin-top: 1ex;">';
$opts=array();
if(isset($story['options']['views']) || $story['is_boardnews'])
$opts[] = '<span class="smalltext">' . $story['views'] . ' ' . $txt['tp-views'] . '</span>';
if(isset($story['options']['comments']) || $story['is_boardnews']){
if($story['is_boardnews'] && ($story['comments']>1 || $story['comments']==0))
$what=$txt[110];
elseif($story['is_boardnews'] && $story['comments']==1)
$what=$txt[146];
else
$what='<a href="'.$scripturl.'?page='.$story['id'].'#tp-comment">'.$txt['tp-comments'].'</a>';

$opts[] = '<span class="smalltext">' . $story['comments'] . ' ' . $what . '</span>';
}
if(isset($story['options']['rating']))
$opts[] = '<span class="smalltext">' . $txt['tp-ratingaverage'] . ' ' . ($context['TPortal']['showstars'] ? (str_repeat('<img src="'.$settings['images_url'].'/tpblue.gif" style="width: .7em; height: .7em; margin-right: 2px;" alt="" />', $story['rating_average'])) : $story['rating_average']) . ' (' . $story['rating_votes'] . ' ' . $txt['tp-ratingvotes'] . ') </span>';

                     echo implode("&nbsp;|&nbsp;",$opts);

echo '
      </div>
</td>';
$context['TPortal']['bothcols']=false;


and delete it.

You are done. It will also affect aricles. You may play around for a better fix.
  For Greek aeromodellers and our friends around the world  - Greek Button sets for SMF

mariusfv

Yes...NOW IS PERFECTLY !
That was...
10x agridoc for your help and for your time !
&10x to all !

Solved !

This website is proudly hosted on Crocweb Cloud Website Hosting.