SMF Development > Portals, Bridges, and Integrations

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

<< < (3/7) > >>

HackPro:

--- อ้างจาก: ต่ำต้อย ที่ 10/01/06, 00:30:14 ---เรียบร้อยครับ ตามรูปเลย ???

--- ปิดอ้างถึง ---

ก้าก ๆ ๆ

ไม่ได้ลองอ่ะ เหอ ๆ ผมยังไม่ได้ลง rc2 เยย เอ้ก ๆ

ลองของพี่ Mr.Hackalot หรือยัง ลองดูให้ครบ อิอิ

TinaCat:
ลองเอาอีกบอร์ดของเรามาทดสอบแล้วได้แบบนี้

ก่อนแก้โค้ด  จะเห็นว่ามีโชว์บอร์ดย่อยอยู่



แก้โค้ดแล้วได้แบบนี้  บอร์ดย่อยไม่โชว์ที่หน้าเว็บแล้ว



คลิกเข้าไปที่บอร์ดแรกแล้วก็จะเห็นบอร์ดย่อยอยู่ข้างใน



ลิงค์เว็บที่ทดสอบ  ลองไปดูก่อนก็ได้นะ

http://www.tinacat.net/justmineforum/index.php?theme=1

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

if ($context['user']['is_logged'])
--- ปิดโค้ด ---


Replace


--- โค้ด: --- // Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
/* --------- Stop Code ----------
if (!empty($board['children']))
{
// Sort the links into an array with new boards bold so it can be imploded.
$children = array();
---------- End --------- */
/* Each child in each board's children has:
id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
/* ---------- Stop Code ----------
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>';
}
---------- End --------- */
}
echo '
</table>';
}
echo '
</div>';
}

if ($context['user']['is_logged'])
--- ปิดโค้ด ---


อันนี้เรายกโค้ดมาให้ทั้งชุดเลยน่ะ
ตั้งใจก็อปส่วนที่ไม่เกี่ยวข้องเกินมานิดหน่อยด้วย  จะได้แน่ใจว่าแก้โค้ดได้ถูกที่
(โค้ดอันนี้สำหรับ SMF 1.1 RC2 The Core Theme นะ  ถ้าเป็นธีมอื่นหรือเวอร์ชั่นอื่น  รู้สึกว่าโค้ดจะไม่เหมือนกัน)

ถ้าแก้โค้ดแล้วยังไม่ได้ตามแบบตัวอย่างในเว็บที่เราทำให้ดู
คงหมายถึงว่า  ไม่ได้แก้โค้ดตามที่เราบอก  เลยทำให้ผิดพลาด
ลองดูก่อนละกัน

(แต่ก็สงสัยนะ  เปิดบอร์ดย่อยมา  แล้วไม่โชว์
คนอื่นมองจากหน้าแรกจะรู้เหรอว่าห้องนี้มีบอร์ดย่อย)

น้ำพริก:
ขอบคุณครับที่ช่วยสละเวลาทำให้ผม
ผมจะลองแก้ดูนะครับ ได้หรือไม่อย่างไรจะบอกนะครับ
ปล.อยากรู้ว่ามีบอร์ดย่อยก้อกดเอา  ;D

น้ำพริก:
เรียบร้อยครับ ผลการทดสอบล่าสุด

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

นำร่อง

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

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

[*] หน้าที่แล้ว

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