Untergeordnete Boards nicht nebeneinander sondern untereinander anordnen

Started by riax, February 16, 2009, 08:22:30 AM

Previous topic - Next topic

riax

Aloha,

das Topic sagt eigentlich schon alles.

Grundlage ist SMF 1.1.8 - default theme

Ich geh davon aus dass ich die BoardIndex.template.php bearbeiten muss - doch ohne php-künste tu ich mir recht schwer. Daher die Frage: Wie muss ich welche Template Datei bearbeiten, sodass die untergeordneten Boards ( Child Boards ) in ihrer Auflistung untereinander erfolgen.

Standart Template:

*Offtopic
   Witze
   Childboards: Bilderwitze, Lustige Videos, etc

und ich hätte gerne:

*Offtopic
  Witze
  Childboards
  Bilderwitze
  Lustige Videos
  etc.

FAQs hab ich mir angeschaut, und die Suchfunktion auch schon bemüht, bisher nichts gefunden.

Vielen Dank schonmal im vorraus.

riax

das thema wäre immernoch aktuell - also wenn jemand ne antwort weiß oder nen tipp hat, wär ich sehr dankbar.

daGroove

Moin...

Öffne mal deine BoardIndex.template.php (im Theme-Ordner).

Dort suchste mal nach: "// Show the "Child Boards"
Du solltest etwas in der Art finden:


// 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) {
                        $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 '
<tr>
<td colspan="3" class="windowbg', !empty($settings['seperate_sticky_lock']) ? '3':'', '">
<span class="smalltext"><b>', $txt['parent_boards'], '</b>: ', implode(', ', $children), '</span>
</td>
</tr>';


Ich hoffe jetzt einfach mal das das bei dir genauso ist und nicht wegen unterschiedlichen Themes was ganz andres passiert :D

In dem Block änderst du nun folgende Kleinigkeiten:
Aus:

$child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333]:$txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';

Machst du:

$child['link'] = '<br /><a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333]:$txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';



Aus:

$children[] = $child['new'] ? '<b>' . $child['link'] . '</b>':$child['link'];

Machst du:

$children[] = $child['new'] ? '<b>* ' . $child['link'] . '</b>':'* ' . $child['link'];



Und aus:

<span class="smalltext"><b>', $txt['parent_boards'], '</b>: ', implode(', ', $children), '</span>

Machst du:

<span class="smalltext"><b>', $txt['parent_boards'], '</b>: ', implode(' ', $children), '</span>



Ich habe das zwar nicht getestet, gehe aber davon aus das es so in der Art klappen sollte.
Pass nur auf das in deinem Theme dann nicht eine Kleinigkeit anders ist, man weiß ja nie ;)



MfG
wer zum teufel bin ich und wenn ja wieviele?

Advertisement: