Advertisement:

Author Topic: Remove Subject/Started By, Replies/Views, Last Post on Topics List  (Read 410 times)

Offline chyyyone

  • Newbie
  • *
  • Posts: 9
I'm using SMF 2.0.17 with Fumes theme

I'm wanting to remove the text Subject/Started By, Replies/Views, and Last Post without removing the background.



I found this topic on how to remove the Subject/Started By but I could not find any other topics on how to remove the Replies/Views and Last Post. Any help would be appreciated.

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,811
  • We were all equal in the end.
Re: Remove Subject/Started By, Replies/Views, Last Post on Topics List
« Reply #1 on: January 08, 2021, 11:54:53 PM »
Do you want to remove the columns or just the headings?
“The best laid schemes o' mice an' men / Gang aft a-gley.” - Robert Burns

Offline GL700Wing

  • Full Member
  • ***
  • Posts: 655
  • Gender: Female
Re: Remove Subject/Started By, Replies/Views, Last Post on Topics List
« Reply #2 on: January 09, 2021, 12:46:14 AM »
To remove the column headings in the messages displayed in boards and also for unread posts and new replies you need to update two template files.

In ./Themes/default/MessageIndex.template.php
Find:
Code: [Select]
echo '
<th scope="col" class="first_th" width="8%" colspan="2">&nbsp;</th>
<th scope="col" class="lefttext"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a> / <a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['started_by'], $context['sort_by'] == 'starter' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>
<th scope="col" width="14%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['replies'], $context['sort_by'] == 'replies' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a> / <a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=views', $context['sort_by'] == 'views' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['views'], $context['sort_by'] == 'views' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>';
// Show a "select all" box for quick moderation?
if (empty($context['can_quick_mod']))
echo '
<th scope="col" class="lefttext last_th" width="22%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>';
else
echo '
<th scope="col" class="lefttext" width="22%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>';

Replace With:
Code: [Select]
echo '
<th scope="col" class="first_th" width="8%" colspan="2">&nbsp;</th>
<th scope="col" class="lefttext"></th>
<th scope="col" width="14%"></th>';
// Show a "select all" box for quick moderation?
if (empty($context['can_quick_mod']))
echo '
<th scope="col" class="lefttext last_th" width="22%"></th>';
else
echo '
<th scope="col" class="lefttext" width="22%"></th>';


In ./Themes/default/Recent.template.php
Find:
Code: [Select]
echo '
<div class="tborder topic_table" id="unread">
<table class="table_grid" cellspacing="0">
<thead>
<tr class="catbg">
<th scope="col" class="first_th" width="8%" colspan="2">&nbsp;</th>
<th scope="col">
<a href="', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a>
</th>
<th scope="col" width="14%" align="center">
<a href="', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['replies'], $context['sort_by'] == 'replies' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a>
</th>';

// Show a "select all" box for quick moderation?
if ($showCheckboxes)
echo '
<th scope="col" width="22%">
<a href="', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a>
</th>
<th class="last_th">
<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" />
</th>';
else
echo '
<th scope="col" class="smalltext last_th" width="22%">
<a href="', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a>
</th>';

Replace With:
Code: [Select]
echo '
<div class="tborder topic_table" id="unread">
<table class="table_grid" cellspacing="0">
<thead>
<tr class="catbg">
<th scope="col" class="first_th" width="8%" colspan="2">&nbsp;</th>
<th scope="col">
</th>
<th scope="col" width="14%" align="center">
</th>';

// Show a "select all" box for quick moderation?
if ($showCheckboxes)
echo '
<th scope="col" width="22%">
</th>
<th class="last_th">
<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" />
</th>';
else
echo '
<th scope="col" class="smalltext last_th" width="22%">
</th>';


Find:
Code: [Select]
echo '
<div class="tborder topic_table" id="unreadreplies">
<table class="table_grid" cellspacing="0">
<thead>
<tr class="catbg">
<th scope="col" class="first_th" width="8%" colspan="2">&nbsp;</th>
<th scope="col">
<a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=subject', $context['sort_by'] === 'subject' && $context['sort_direction'] === 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] === 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a>
</th>
<th scope="col" width="14%" align="center">
<a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=replies', $context['sort_by'] === 'replies' && $context['sort_direction'] === 'up' ? ';desc' : '', '">', $txt['replies'], $context['sort_by'] === 'replies' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a>
</th>';

// Show a "select all" box for quick moderation?
if ($showCheckboxes)
echo '
<th scope="col" width="22%">
<a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=last_post', $context['sort_by'] === 'last_post' && $context['sort_direction'] === 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] === 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a>
</th>
<th class="last_th">
<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" />
</th>';
else
echo '
<th scope="col" class="last_th" width="22%">
<a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=last_post', $context['sort_by'] === 'last_post' && $context['sort_direction'] === 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] === 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a>
</th>';

Replace With:
Code: [Select]
echo '
<div class="tborder topic_table" id="unreadreplies">
<table class="table_grid" cellspacing="0">
<thead>
<tr class="catbg">
<th scope="col" class="first_th" width="8%" colspan="2">&nbsp;</th>
<th scope="col">
</th>
<th scope="col" width="14%" align="center">
</th>';

// Show a "select all" box for quick moderation?
if ($showCheckboxes)
echo '
<th scope="col" width="22%">
</th>
<th class="last_th">
<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" />
</th>';
else
echo '
<th scope="col" class="last_th" width="22%">
</th>';
Life doesn't have to be perfect to be wonderful ...

Offline chyyyone

  • Newbie
  • *
  • Posts: 9
Re: Remove Subject/Started By, Replies/Views, Last Post on Topics List
« Reply #3 on: January 09, 2021, 12:50:33 AM »
Yes just the headers.


Offline chyyyone

  • Newbie
  • *
  • Posts: 9
Re: Remove Subject/Started By, Replies/Views, Last Post on Topics List
« Reply #4 on: January 09, 2021, 08:28:42 AM »
GL700Wing Thank you SO VERY much for your help. It was exactly what I wanted. However I did not think about the unread and new replies. I appreciate your help :)