• September 7, 2018

    Themes/default/BoardIndex.template.php

    โค๊ด: [Select]

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

    วางทับที่ค้นหา

    โค๊ด: [Select]

    // Show the Child Boards as drop-down menu
    if (!empty($board['children']))
    {
    echo '
    <tr>
    <td colspan="3" class="windowbg', !empty($settings['seperate_sticky_lock']) ? '3' : '', '">
    <form action="', $scripturl, '" method="get" accept-charset="', $context['character_set'], '" name="jumptoForm">
    <span class="smalltext"><label for="jumpto"><strong>', $txt['parent_boards'], '</strong></label>:</span>
    <select name="jumpto" id="jumpto" onchange="if (this.selectedIndex > 0 &amp;&amp; this.options[this.selectedIndex].value) window.location.href = smf_scripturl + this.options[this.selectedIndex].value.substr(smf_scripturl.indexOf(\'?\') == -1 || this.options[this.selectedIndex].value.substr(0, 1) != \'?\' ? 0 : 1);">
    <option value="">' . $txt[251] . '</option>';

    // Populate the dropdown with child boards
    foreach ($board['children'] as $child)
    {
    if ($child['new'])
    echo '
    <option value="?board=', $child['id'], '.0">' , $child['name'] , ' (' , $txt[302] , ')</option>';
    else
    echo '
    <option value="?board=', $child['id'], '.0">' , $child['name'] , '</option>';
    }

    echo '
    </select>&nbsp;
    </form>
    </td>
    </tr>';
    }

    http://www.justusers.net/forum/index.php/topic,2752.0.html



เวอไนน์ไอคอร์ส

ประหยัดเวลากว่า 100 เท่า!






เวอไนน์เว็บไซต์⚡️
สร้างเว็บไซต์ ดูแลเว็บไซต์

Categories


SMF