Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Topic started by: AllanD on May 04, 2012, 12:49:50 PM

Title: couple quick question
Post by: AllanD on May 04, 2012, 12:49:50 PM
Using 2.0.2 on the curve theme

How can I remove the unread posts from the cat bar?
Also need to remove the new no new posts that appear right above the info center?
Title: Re: couple quick question
Post by: IchBin™ on May 04, 2012, 03:55:44 PM
Make a backup of your file first in case you have problems.

To remove the unread posts link comment out or remove this code from Themes/default/Boardindex.template.php:
if (!$context['user']['is_guest'] && !empty($category['show_unread']))
echo '
<a class="unreadlink" href="', $scripturl, '?action=unread;c=', $category['id'], '">', $txt['view_unread_category'], '</a>';



To remove post indication icons find this code:
if ($context['user']['is_logged'])
{
echo '
<div id="posting_icons" class="floatleft">';

// Mark read button.
$mark_read_button = array(
'markread' => array('text' => 'mark_as_read', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=all;' . $context['session_var'] . '=' . $context['session_id']),
);

echo '
<ul class="reset">
<li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_some.png" alt="" /> ', $txt['new_posts'], '</li>
<li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_none.png" alt="" /> ', $txt['old_posts'], '</li>
<li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_redirect.png" alt="" /> ', $txt['redirect_board'], '</li>
</ul>
</div>';

// Show the mark all as read button?
if ($settings['show_mark_read'] && !empty($context['categories']))
echo '<div class="mark_read">', template_button_strip($mark_read_button, 'right'), '</div>';
}
else
{
echo '
<div id="posting_icons" class="flow_hidden">
<ul class="reset">
<li class="floatleft"><img src="', $settings['images_url'], '/new_none.png" alt="" /> ', $txt['old_posts'], '</li>
<li class="floatleft"><img src="', $settings['images_url'], '/new_redirect.png" alt="" /> ', $txt['redirect_board'], '</li>
</ul>
</div>';
}


Replace with:
if ($context['user']['is_logged'])
{
echo '
<div id="posting_icons" class="floatleft">';

// Mark read button.
$mark_read_button = array(
'markread' => array('text' => 'mark_as_read', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=all;' . $context['session_var'] . '=' . $context['session_id']),
);

echo '
</div>';

// Show the mark all as read button?
if ($settings['show_mark_read'] && !empty($context['categories']))
echo '<div class="mark_read">', template_button_strip($mark_read_button, 'right'), '</div>';
}
Title: Re: couple quick question
Post by: AllanD on May 04, 2012, 04:12:36 PM
ok thank you very much.