Child Boards"lari gizleme.(alt kategoriyi gizleme)

Started by 12jasonyep, January 14, 2016, 09:25:10 AM

Previous topic - Next topic

12jasonyep

arkadaslar yeniyim sitemde cok fazla alt konu var.
bunlar konunun altinda child boards olarak gozukuyor.
ve rahatsizlik veriyor. bunlari gizleyebilirmiyim.
yarddimlariniz ici nteskkurler.

cee山

temanızın BoardIndex.template.php yoksa default temadan edinerek şu kısımları silin.Burda kodları silerek gizlemiş değil kaldırmış olursunuz tekrar geri getirmek isterseniz aynı şekilde aynı bölgeye eklemeniz gerekicektir.

Veya şöyle bir mod var : http://custom.simplemachines.org/mods/index.php?mod=1691
Badboy cevap için tekrar Teşekkürler : http://www.simplemachines.org/community/index.php?topic=514891.msg3640145#msg3640145

// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
if (!empty($board['children']))
{
// Sort the links into an array with new boards bold so it can be imploded.
$children = array();
/* 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="board_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']) . ')"><span class="new_posts">' . $txt['new'] . '</span>' : '') . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . ' - ' . $child['short_description'] . '">' . $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 '
<div id="board_', $board['id'], '_children" class="children">
<p><strong>', $txt['sub_boards'], '</strong>: ', implode(', ', $children), '</p>
</div>';
}

Advertisement: