Trick วิธีการทำรูปประจำบอร์ดไม่ซ้ำกันเพื่อเพิ่มความสวยงามตะการตามากขึ้น สำหรับเว็บของเราโดยการแยก Board Icon แต่ละหมวด ให้แตกต่างกัน หลีกหนีความจำเจแบบบอร์ดเดิมๆ
ทำได้ดังนี้ครับ
ค้นหาโค้ดชุดนี้ครับ จากไฟล์ ./Themes/default/BoardIndex.template.php
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// This board doesn't have new posts, but its children do.
elseif ($board['children_new'])
echo '<img src="', $settings['images_url'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';
แทนที่ด้วยโค้ดนี้ครับ // If the board is new, show a strong indicator. : แก้รูปประจำบอร์ด
if ($board['new'])
echo '<img src="', $settings['images_url'], '/board_icon/on_', $board['id'], '.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// This board doesn't have new posts, but its children do.
elseif ($board['children_new'])
echo '<img src="', $settings['images_url'], '/board_icon/on2_', $board['id'], '.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/board_icon/off_', $board['id'], '.gif" alt="', $txt[334], '" title="', $txt[334], '" />';
จากนั้นให้ก๊อบไฟล์รูปของเราไปไว้ในโฟลเดอร์นี้ครับ ./Themes/default/images/board_icon/
โดยแยกเป็น 3 ไฟล์ จะใช้รูปต่างกันหรือรูปเดียวกันก็ได้ครับ ถ้าไม่เข้าใจโหลดไฟล์นี้ไปดูครับ
board_icon.zip[/url]on_ตามด้วยเลขไอดีประจำบอร์ด.gif , on2_ตามด้วยเลขไอดีประจำบอร์ด.gif ,off_ตามด้วยเลขไอดีประจำบอร์ด.gif
on_3.gif
on2_3.gif
off_3.gif
ถ้าอ่านแล้วงงตรงไหนถามไว้ได้คับ