News:

Wondering if this will always be free?  See why free is better.

Main Menu

MessageIndex.template.php

Started by d6veteran, October 21, 2005, 12:17:53 AM

Previous topic - Next topic

d6veteran

Inbetween the linktree and the bar tool bar that show number of pages and tool buttons, there is the code pasted below.  What does it do?  I assume it is checking for a board setting to determine whether or not to display extra info, but I cannot figure out what setting activates it.

if (isset($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0))
{
echo '
<div class="tborder" style="padding: 1px; margin-bottom: 2ex;"><table border="0" width="100%" cellspacing="1" cellpadding="5">
<tr class="titlebg">
<td colspan="4">', $txt['parent_boards'], '</td>
</tr>';
foreach ($context['boards'] as $board)
{
echo '
<tr class="windowbg2">
<td class="windowbg" width="6%" align="center" valign="top">';

// Is this board itself new?
if ($board['new'])
echo '<img src="', $settings['images_url'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
// Is one of this board's children new, then?
elseif ($board['children_new'])
echo '<img src="', $settings['images_url'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
// I guess it's not new at all.
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';

echo '</td>
<td align="left">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];

if (!empty($board['moderators']))
echo '
<div style="padding-top: 1px;" class="smalltext"><i>', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '</i></div>';

if (!empty($board['children']))
{
$children = array();
foreach ($board['children'] as $child)
{
$child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';
$children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : $child['link'];
}

echo '
<div style="padding-top: 1px;" class="smalltext"><i>', $txt['parent_boards'], ': ', implode(', ', $children), '</i></div>';
}

echo '
</td>
<td class="windowbg" valign="middle" align="center" style="width: 12ex;"><span class="smalltext">
', $board['posts'], ' ', $txt[21], ' ', $txt['smf88'], '<br />
', $board['topics'],' ', $txt[330], '
</span></td>
<td class="smalltext" valign="middle" width="22%">';

if (!empty($board['last_post']['id']))
echo '
', $txt[22], ' ', $txt[30], ' ', $board['last_post']['time'], '<br />
', $txt['smf88'], ' ', $board['last_post']['link'], ' ', $txt[525], ' ', $board['last_post']['member']['link'];

echo '
</td>
</tr>';
}
echo '
</table></div>';
}

if (!empty($options['show_board_desc']) && $context['description'] != '')
{
echo '
<table width="100%" cellpadding="6" cellspacing="0" border="0" class="tborder" style="margin-bottom: 1ex;">
<tr>
<td align="left" class="catbg" width="100%" height="24">
<span class="smalltext">', $context['description'], '</span>
</td>
</tr>
</table>';
}

xenovanis

"Insanity: doing the same thing over and over again and expecting different results."

Advertisement: