Remove Subject/Started By, Replies/Views, Last Post on Topics List

Started by chyyyone, January 08, 2021, 11:24:50 PM

Previous topic - Next topic

chyyyone

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.

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

GL700Wing

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:
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:
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:
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:
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:
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:
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 ...


chyyyone

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 :)

Advertisement: