News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Alakategoriat pois näkyvistä etusivulta?

Started by jarska, January 14, 2011, 01:07:31 AM

Previous topic - Next topic

jarska

Käytössä nyt smf 2.0RC4 ja en löydä enää mistään toimintoa mistä saisi alakategoriat pois etusivulta? :-[

Aleksi "Lex" Kilpinen

Ei ole muistaakseni valmista asetusta sille, mutta BoardIndex.template.php:stä pitäisi olla mahdollista muokata pois.
Jotakuinkin tämän näköinen alue pitäisi löytyä, pitäisi kommentoida pois - tai poistaa kokonaan - mutta pidä varmuuskopio käsillä siltä varalta että jotain menee pieleen ;)


// 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="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>';
}

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

jarska

Paljon kiitoksia, toimii defaultilla mut eri teemalla menee sekaisin.

Noh, mä kokeilin laittaa alakategorian alle toisen alakategorian ja nyt ei näy viestimäärät etusivulla, mitenkähän ton sais pelaamaan?

Aleksi "Lex" Kilpinen

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

jarska

Green style mut jos unohdetaan sittenkin se ettei alakategoriat näy, jaoin ne silleen ettei ole niin paljoa etusivulla. :-[

Mut sitten tuleekin tuo jälkimmäinen ongelma, ei laske enää alakategorian alle tehdyn alakategorian viestejä etusivulle, näyttää hölmölle kun o viestiä.

Laitoin kyllä hallinnosta päälle sen laske yhteen alakategorian ja yläkategorian viestit mut ei ilmeisesti "yletä" enää tuonne saakka laskemaan?

Aleksi "Lex" Kilpinen

Ei vaan alakategorioiden viestimääriä ei näytetä erikseen etusivulla, vaan ne siis lasketaan mukaan "emokategorian" viestimääriin. Jos alakategorioillasi näkyy nyt viestimäärä 0, niin se on kokonaan turha kohta.

EDIT: Eikun niin, en ole varma laskisiko niinkään enää alakategorian alle tehdyiltä alueilta... Voi olla ettei yletä sinne.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

jarska

Juu, ei yletä laskemaan yhteen enää sinne, perkules ku ehdin jo muuttaa nuot järkevämmin. ::)

Aleksi "Lex" Kilpinen

Hämärä muistikuva meikäläisellä on että tuo olisi tehty tarkoituksella aikanaan, kun etusivun tietomäärän tuottaminen on muutenkin melko raskas ja usein toistuva prosessi, niin tuo tehtiin sen keventämiseksi.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: