Themes/default/boardindex.template.php doyasını açıyoruz:
Aşağıdaki Kodu Bulun:
/* Each child in each board's children has:
id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
foreach ($board['children'] as $child)
{
if (!$child['is_redirect'])
$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['lang_images_url'] . '/new.gif" class="new_posts" alt="" />' : '') . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';
// Has it posts awaiting approval?
if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics']))
$child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';
$children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
}
echo '
<tr id="board_', $board['id'], '_children">
<td colspan="3" class="children windowbg">
<strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '
</td>
</tr>';
}
}
echo '
</tbody>';
}
echo '
<tbody class="divider">
<tr>
<td colspan="4"></td>
</tr>
</tbody>';
}
echo '
</table>
</div>';
if ($context['user']['is_logged'])
{
echo '
<div id="posting_icons" class="floatleft">';
Aşağıdaki kod ile değiştirin:
/* Each child in each board's children has:
id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
foreach ($board['children'] as $child)
{
if (!$child['is_redirect'])
$child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . $child['topics'] . ', ' . $txt['posts'] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . $child['posts'] . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';
// Has it posts awaiting approval?
if ($child['can_approve_posts'] && ($child['unapproved_posts'] | $child['unapproved_topics']))
$child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > $child['unapproved_posts'] ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';
$children[] = $child['new'] ? '<img src="' . $settings['images_url'] . '/new_some.png" alt="' . $txt['new_posts'] . '" width="15" height="15" style="vertical-align: middle; margin-left: 2px;" /><strong>' . $child['link'] . '</strong>' : '<img src="' . $settings['images_url'] . '/new_none.png" alt="' . $txt['old_posts'] . '" width="15" height="15" style="vertical-align: middle; margin-right: 2px;" />' . $child['link'];
}
echo '
<tr>
<td colspan="3" class="children windowbg">
<table>
<tr>';
foreach ($children as $key => $child)
{
if ($key % 7 == 0 && $key != 0)
echo '
</tr>
<tr>';
echo '
<td style="padding-left: 10px;">', $child, '</td>';
}
echo '
</tr>
</table>
</td>
</tr>';
}
}
echo '
</tbody>';
}
echo '
<tbody class="divider">
<tr>
<td colspan="7"></td>
</tr>
</tbody>';
}
echo '
</table>
</div>';
if ($context['user']['is_logged'])
{
echo '
<div id="posting_icons" class="floatleft">';
Kendinize göre düzenlemeyi unutmayın.
if ($key % 7 == 0 && $key != 0)
Ben yedili kategori yaptım. Siz yukarıdaki kodu kendinize göre düzenleyebilirsiniz.
Mesela 4'lü yapmak isterseniz yapmanız gerek kod şöyle olur.
if ($key % 4 == 0 && $key != 0)