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 !
What block code are you using to show posts? Post the contents of your blockcode in a codebox, please.
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 ?
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.
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.
I try both solution but no result...continue to show number of views and replies.(with cookie cleared and browser refresh)
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(" | ",$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.
Yes...NOW IS PERFECTLY !
That was...
10x agridoc for your help and for your time !
&10x to all !
Solved !