Alt Bölümleri Alt Alta Sıralama 2li 3lü - 1 ve 2 serisi için

tarantula90126.07.2013 - 22:45
Anlatımlar default içindir diğer temalar için farklılıklar gösterebişlir.

1.x versiyonu için.

2'li olarak:

BoardIndex.template.php'de bulun:

Kod: [Seç]
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>
Değiştirin:
Kod: [Seç]
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'] ? '<img src="' . $settings['images_url'] . '/on.gif" alt="' . $txt[333] . '" width="15" height="15" style="vertical-align: middle; margin-left: 2px;" /><b>' . $child['link'] . '</b>' : '<img src="' . $settings['images_url'] . '/off.gif" alt="' . $txt[334] . '" width="15" height="15" style="vertical-align: middle; margin-right: 2px;" />' . $child['link'];
                    }

                    echo '
            <tr>
                <td colspan="3" class="windowbg', !empty($settings['seperate_sticky_lock']) ? '3' : '', '">
                    <table>
                        <tr>';

                    foreach ($children as $key => $child)
                    {
                        if ($key % 2 == 0 && $key != 0)
                            echo '
                        </tr>
                        <tr>';

                        echo '
                            <td style="padding-left: 10px;"><span class="smalltext">', $child, '</span></td>';
                    }

                        echo '
                        </tr>
                    </table>
                </td>

Sütunları 2 li yada 3 lü 4 lü gibi yapmak için

Değiştirdiğiniz kodun içerisinde bulunan if ($key % 2 == 0 && $key != 0) kodundaki 2 değerini, istediğiniz değerle değiştirebilirsiniz.


2.0 versiyonu için.
 2'li olarak:
 BoardIndex.template.php'de bulun:
 
Kod: [Seç]
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'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
                    }
                    echo '
            <tr>
                <td class="windowbg3 smalltext largepadding"><strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '</td>
Değiştirin:
 
Kod: [Seç]
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'] . '/on.gif" alt="' . $txt['new_posts'] . '" width="15" height="15" style="vertical-align: middle; margin-left: 2px;" /><strong>' . $child['link'] . '</strong>' : '<img src="' . $settings['images_url'] . '/off.gif" alt="' . $txt['old_posts'] . '" width="15" height="15" style="vertical-align: middle; margin-right: 2px;" />' . $child['link'];
                    }
                    echo '
            <tr>
                <td class="windowbg3 smalltext largepadding">
                    <table>
                        <tr>';

                    foreach ($children as $key => $child)
                    {
                        if ($key % 2 == 0 && $key != 0)
                            echo '
                        </tr>
                        <tr>';

                        echo '
                            <td style="padding-left: 10px;">', $child, '</td>';
                    }

                        echo '
                        </tr>
                    </table>
                </td>

Sütunları 2 li yada 3 lü 4 lü gibi yapmak için

Değiştirdiğiniz kodun içerisinde bulunan if ($key % 2 == 0 && $key != 0) kodundaki 2 değerini, istediğiniz değerle değiştirirerek yapabilirsiniz.


Linkback: https://www.buyuknet.com/alt-bolumleri-alt-alta-siralama-2li-3lu-1-ve-2-serisi-icin-t41705.0.html

Etiket:

Bu bilgi size yardimci oldu mu?

EvetHayır
Alt Bölümleri Alt Alta Sıralama 2li 3lü - 1 ve 2 serisi için
Alt Bölümleri Alt Alta Sıralama 2li 3lü - 1 ve 2 serisi için
(Ortalama: 5 üzerinden 1.7 - 3 Oy)
3