SMF Development > Portals, Bridges, and Integrations

ช่วยผมที ปิดsub_boardไม่ได้

(1/7) > >>

น้ำพริก:
ผมใส่บอร์ดย่อยแต่ไม่อยากโชว์ดูแล้วมันรกๆไงก้อไม่รู้ อยากปิด ผมลองไปหาในcpแล้วไม่มี เลยจะลองแก้โค๊ดเอาแต่ก้อหาไม่เจอ

[ไฟล์แนบถูกลบโดยผู้ดำเนินการ]

TinaCat:
อยากปิดบอร์ดไปเลย
หรือว่าแค่ว่าไม่อยากโชว์ชื่อบอร์ดย่อยไว้ที่หน้าแรกคะ??

น้ำพริก:
ไม่อยากโชว์บอร์ดย่อย ให้เห็นแต่บอร์ดใหญ่

TinaCat:
เราลองเดาดูนะคะ  พอดีเว็บเราไม่มีบอร์ดย่อยเลยทดลองโค้ดไม่ได้
ดูที่ไฟล์ BoardIndex.template.php ค่ะ
หาโค้ดนี้


--- โค้ด: --- // 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>';
}
--- ปิดโค้ด ---

ลองหยุดการใช้งานโค้ดส่วนนี้โดยแก้เป็นแบบนี้ค่ะ


--- โค้ด: --- // 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>';
}
}*/
--- ปิดโค้ด ---

เราไม่ได้ทดสอบโค้ดก่อนน่ะค่ะ  ถ้าหากผิดพลาดก็ต้องขออภัยด้วยนะคะ

น้ำพริก:
เออเร่อครับ  ;D

นำร่อง

[0] ดัชนีข้อความ

[#] หน้าถัดไป

ไปที่เวอร์ชันเต็ม