SMF Version: SMF 1.0.7
I have been modifying the Simplicity theme for this website. Here is one of the pages I am working on:
http://www.havanasilks.com/index.php?board=6.0
We would like to remove the "missy ( 0 Replies 2 Views )" that is under each post/page link in the middle, and the number "1" on the left which shows the numbers of users online.
If someone could just tell me the name of the file(s) where those two things are found it would help. I am almost done, these are the last things that I need to remove. :)
Thank you for any help. :D
MessageIndex.template.php
i dont know your theme, but this might help
views are stored in $topic['views']
replies are stored in $topic['replies']
members name is sotred in $topic['last_post']['member']['link']
as for that 1, i have no idea. contact the person who created that theme
Thanks for pointing me to the right file!!! :D
I looked at the file, and am really not sure where to look. Here is the MessageIndex.template.php code in case anyone can point me to the right place or show me how to change it. Thanks for any help I can get to remove that "posted by username" and "users online".
<?php
// Version: 1.0; MessageIndex
function template_main()
{
global $context, $settings, $options, $scripturl, $modSettings, $txt;
echo '<td id ="leftbar" width="' . $context['forum_width_left'] . '%" valign="top" style="padding-left: 15px; padding-right: 15px;">';
// check leftbaritems if they are on top
for($i=1 ; $i<4 ; $i++){
$item=$i;
if(isset($settings['myleftbar'.$item]) && isset($settings['myleftbar_title'.$item]) && isset($settings['myleftbar_pos'.$item]) && $settings['myleftbar_pos'.$item]=='top'){
myleftbar($i);
}
}
echo '<span class="header1"><b>'.$txt['SIMPLE_Tools12'].'</b></span><span class="header2"><b>'.$txt['SIMPLE_Tools14'].'</b></span><br /><hr />';
if (!empty($options['show_board_desc']) && $context['description'] != '')
{
echo '<span class="smalltext"> ', $context['description'], ' </span><br /><br />';
}
echo $context['page_index'];
echo '<br /><br />';
theme_show_buttons();
echo '<br />';
echo '<span class="header1"><b>'.$txt['SIMPLE_Tools15'].'</b></span><span class="header2"><b>'.$txt['SIMPLE_Tools16'].'</b></span><br />';
echo ' <form action="', $scripturl, '" method="get" name="jumptoForm" style="margin-top: 4px;">
<select style="width: 130px;" name="jumpto" id="jumpto" onchange="if (this.options[this.selectedIndex].value) window.location.href=\'', $scripturl, '\' + this.options[this.selectedIndex].value;">
<option value="">' . $txt[251] . ':</option>';
// Show each category - they all have an id, name, and the boards in them.
foreach ($context['jump_to'] as $category)
{
// Show the category name with a link to the category. (index.php#id)
echo '
<option value="" disabled="disabled">-----------------------------</option>
<option value="#', $category['id'], '">', $category['name'], '</option>
<option value="" disabled="disabled">-----------------------------</option>';
/* Now go through each board - they all have:
id, name, child_level (how many parents they have, basically...), and is_current. (is this the current board?) */
foreach ($category['boards'] as $board)
{
// Show some more =='s if this is a child, so as to make it look nice.
echo '
<option value="?board=', $board['id'], '.0"', $board['is_current'] ? ' selected="selected"' : '', '> ', str_repeat('==', $board['child_level']), '=> ', $board['name'], '</option>';
}
}
echo '
</select><br />
<input style="margin-top: 5px; " type="button" value="', $txt[161], '" onclick="if (document.jumptoForm.jumpto.options[document.jumptoForm.jumpto.selectedIndex].value) window.location.href = \'', $scripturl, '\' + document.jumptoForm.jumpto.options[document.jumptoForm.jumpto.selectedIndex].value;" />
</form>';
if (isset($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0))
{
echo '<span class="header1"><b>'.$txt['SIMPLE_Tools10'].'</b></span><span class="header2"><b>'.$txt['SIMPLE_Tools11'].'</b></span><br /><hr />';
foreach ($context['boards'] as $board)
{
// If the board is new, show a strong indicator.
if ($board['new'])
echo ' <img src="', $settings['images_url'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
// This board doesn't have new posts, but its children do.
elseif ($board['children_new'])
echo ' <img src="', $settings['images_url'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
else
echo ' <img src="', $settings['images_url'], '/off.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
echo ' <a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
// Show some basic information about the number of posts, etc.
echo '<br /><span class="smalltext" style="margin-left: 20px;">', $board['topics'],' ', $txt[330], '</span><br />';
}
echo '<br />';
}
// check leftbaritems if they are on bottom
for($i=1 ; $i<4 ; $i++){
$item=$i;
if(isset($settings['myleftbar'.$item]) && isset($settings['myleftbar_title'.$item]) && isset($settings['myleftbar_pos'.$item]) && $settings['myleftbar_pos'.$item]=='bot'){
myleftbar($i);
}
}
echo '</td>';
echo '<td width="' . $context['forum_width_middle'] . '%" valign="top" >';
// If Quick Moderation is enabled (and set to checkboxes - 1) start the form.
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']))
echo '
<form action="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], '" method="post" name="topicForm" style="margin: 0;">';
echo '
<table border="0" width="100%" cellspacing="0" cellpadding="0" >
<tr>';
// Are there actually any topics to show?
if (!empty($context['topics']))
echo '<td width="100%" colspan="7"> </td>';
// No topics.... just say, "sorry bub".
else
echo '<td width="100%" colspan="7"><b>', $txt[151], '</b></td>';
echo '
</tr>';
foreach ($context['topics'] as $topic)
{
echo '
<tr>
<td valign="middle" align="center" width="5%" style="padding-right: 4px; padding-top: 10px;">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td valign="middle" align="center" width="4%" style="padding-right: 8px; padding-top: 10px;">
<img src="', $settings['images_url'], '/post/', $topic['first_post']['icon'], '.gif" alt="" />
</td>
<td valign="middle" style="padding-right: 4px; padding-top: 10px;">
', $topic['first_post']['link'];
// Is this topic new? (assuming they are logged in!)
if ($topic['new'] && $context['user']['is_logged'])
echo '
<a href="', $scripturl, '?topic=', $topic['id'], '.from', $topic['newtime'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';
echo '
<span class="smalltext">', $topic['pages'], '</span>
</td>
<td align="right" valign="middle" style="padding-right: 4px; padding-top: 10px;">';
// Show the quick moderation options?
if (!empty($options['display_quick_mod']))
{
echo '
';
if ($options['display_quick_mod'] == 1 && ($topic['quick_mod']['remove'] || $topic['quick_mod']['lock'] || $topic['quick_mod']['sticky'] || $topic['quick_mod']['move']))
echo '
<input type="checkbox" name="topics[]" value="', $topic['id'], '" class="check" />';
else
{
// Check permissions on each and show only the ones they are allowed to use.
if ($topic['quick_mod']['remove'])
echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions[', $topic['id'], ']=remove;sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_remove.gif" alt="', $txt[63], '" title="', $txt[63], '" border="0" /></a>';
if ($topic['quick_mod']['lock'])
echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions[', $topic['id'], ']=lock;sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_lock.gif" alt="', $txt['smf279'], '" title="', $txt['smf279'], '" border="0" /></a>';
if ($topic['quick_mod']['sticky'])
echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions[', $topic['id'], ']=sticky;sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_sticky.gif" alt="', $txt['smf277'], '" title="', $txt['smf277'], '" border="0" /></a>';
if ($topic['quick_mod']['move'])
echo '<a href="', $scripturl, '?action=movetopic;board=', $context['current_board'], '.', $context['start'], ';topic=', $topic['id'], '.0"><img src="', $settings['images_url'], '/icons/quick_move.gif" alt="', $txt[132], '" title="', $txt[132], '" border="0" /></a>';
}
echo '</td>';
}
echo '</tr><tr>';
echo '<td colspan="4" style="padding-left: 10px; padding-bottom: 5px;" class="smalltext">',$txt[109],'
', $topic['first_post']['member']['link'], ' (
', $topic['replies'], ' ',$txt[110],' ', $topic['views'],' ',$txt[301],' )';
echo '
</td></tr>';
}
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']))
{
echo '
<tr >
<td colspan="8" style="padding-top: 10px;" align="right">
<select name="qaction"', $context['can_move'] ? ' onchange="document.topicForm.moveItTo.disabled = (this.options[this.selectedIndex].value != \'move\');"' : '', '>
<option value="">--------</option>
', $context['can_remove'] ? '<option value="remove">' . $txt['quick_mod_remove'] . '</option>' : '', '
', $context['can_lock'] ? '<option value="lock">' . $txt['quick_mod_lock'] . '</option>' : '', '
', $context['can_sticky'] ? '<option value="sticky">' . $txt['quick_mod_sticky'] . '</option>' : '', '
', $context['can_move'] ? '<option value="move">' . $txt['quick_mod_move'] . ': </option>' : '', '
', $context['can_merge'] ? '<option value="merge">' . $txt['quick_mod_merge'] . '</option>' : '', '
</select>';
if ($context['can_move'])
{
echo '
<select id="moveItTo" name="move_to" disabled="disabled">';
foreach ($context['jump_to'] as $category)
foreach ($category['boards'] as $board)
{
if (!$board['is_current'])
echo '
<option value="', $board['id'], '"', !empty($board['selected']) ? ' selected="selected"' : '', '>', str_repeat('-', $board['child_level'] + 1), ' ', $board['name'], '</option>';
}
echo '
</select>';
}
echo '
<input type="submit" value="', $txt['quick_mod_go'], '" onclick="return document.topicForm.qaction.value != \'\' && confirm(\'', $txt['quickmod_confirm'], '\');" />
</td>
</tr>';
}
echo '
</table>';
// Finish off the form - again, if Quick Moderation is being done with checkboxes. (1)
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']))
echo '
<input type="hidden" name="sc" value="' . $context['session_id'] . '" />
</form>';
echo '<br /><br /> <table cellpadding="0" cellspacing="0" width="100%">';
echo '
<tr>
<td class="smalltext" align="left" style="padding-top: 1ex;">', !empty($modSettings['enableParticipation']) ? '
<img src="' . $settings['images_url'] . '/topic/my_normal_post.gif" alt="" align="middle" /> ' . $txt['participation_caption'] . '<br />' : '', '
<img src="' . $settings['images_url'] . '/topic/normal_post.gif" alt="" align="middle" /> ' . $txt[457] . '<br />
<img src="' . $settings['images_url'] . '/topic/hot_post.gif" alt="" align="middle" /> ' . $txt[454] . '<br />
<img src="' . $settings['images_url'] . '/topic/veryhot_post.gif" alt="" align="middle" /> ' . $txt[455] . '
</td>
<td class="smalltext" align="left" valign="top" style="padding-top: 1ex;">
<img src="' . $settings['images_url'] . '/topic/normal_post_locked.gif" alt="" align="middle" /> ' . $txt[456] . '<br />' . ($modSettings['enableStickyTopics'] == '1' ? '
<img src="' . $settings['images_url'] . '/topic/normal_post_sticky.gif" alt="" align="middle" /> ' . $txt['smf96'] . '<br />' : '') . ($modSettings['pollMode'] == '1' ? '
<img src="' . $settings['images_url'] . '/topic/normal_poll.gif" alt="" align="middle" /> ' . $txt['smf43'] : '') . '
</td>
<td class="smalltext" align="right" valign="middle">
</td>
</tr>
</table>';
}
function theme_show_buttons()
{
global $context, $settings, $options, $txt, $scripturl;
echo '<span style="line-height: 130%;">';
// If they are logged in, and the mark read buttons are enabled..
if ($context['user']['is_logged'] && $settings['show_mark_read'])
echo '<a href="' . $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0">'. $txt[300] . '</a><br />';
// If the user has permission to show the notification button... ask them if they're sure, though.
if ($context['can_mark_notify'])
echo '<a href="' . $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '" onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');">' . $txt[131] . '</a><br />';
// Are they allowed to post new topics?
if ($context['can_post_new'])
echo '<a href="' . $scripturl . '?action=post;board=' . $context['current_board'] . '.0">' . $txt[33] . '</a><br />';
// How about new polls, can the user post those?
if ($context['can_post_poll'])
echo '<a href="' . $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll">' . $txt['smf20'] . '</a><br />';
echo '</span>';
return;
}
?>