เป็น Mod ที่ใช้เปลี่ยน icon ของบอร์ดให้เป็นรูปภาพสื่อความหมายของบอร์ดนั้นๆ ใช้ได้หลายเวอร์ชั่น ดูรูปภาพตัวอย่างที่ไฟล์แนบ
Mod Name: cbi v0.5 (Custom Board Icons)
Created By: Bigguy
Latest Version: cbi175
Compatible With: 1.1 RC2, 1.1 RC3, 1.1, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.12, 1.1.14, 2.0 Beta 3 Public, 2.0 Beta 3.1 Public, 2.0 RC1-1, 2.0 RC2, 2.0 RC4, 2.0 RC5, 2.0, 2.0.1, 2.0.2
ดาวน์โหลดได้ที่
http://custom.simplemachines.org/mods/index.php?mod=511ติดตั้งแล้วให้ไปสร้างโฟล์เดอร์ของบอร์ด
webboard & forum/Themes/defaultธีมที่ใช้ปัจจุบัน/images/icons/1/on.png
1 คือโฟลเดอร์ของบอร์ด ให้เอาเมาท์ไปชี้ที่ icon board จะเห็นพาธไฟล์ของบอร์ด
หรือคลิกเข้าไปที่บอร์ดก็จะเห็น number ของบอร์ด
ตัวอย่าง คลิกที่บอร์ด We Love The King จะได้พาธไฟล์ของบอร์ดดังนี้
http://www.welovethailand.com/webboard/index.php/board,10.0.htmlboard,10.0.html << เอาเลข 10 ไปสร้างเป็นชื่อของโฟล์เดอร์ แล้วสร้างภาพชื่อ on.png ,off.png ,on2.png
(on2.png คือ บอร์ดย่อย) ใส่ไปในโฟล์เดอร์นั้น
forum/Themes/default/images/icons/board_id/on.png
forum/Themes/default/images/icons/board_id/on2.png
forum/Themes/default/images/icons/board_id/off.png
***board_id*** คือ number ของบอร์ด
ถ้าติดตั้ง mod และใส่โฟล์เดอร์รวมทั้งรูปแล้วไม่มีอะไรเกิดขึ้นให้ไปดูไฟล์ BoardIndex.template.php ที่ธีมปัจจุบันว่ามีโค้ดเติมเข้ามาถูกต้องหรือไม่
ส่วนใหญ่ BoardIndex.template.php จะถูกติดตั้งเฉพาะธีม default
ติดตั้งแบบแมนวล SMF 2.0.2เปิดไฟล์
./Themes/default/BoardIndex.template.phpFind: ค้นหา /* Each board in each category's boards has:
new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
children (see below.), link_children (easier to use.), children_new (are they new?),
topics (# of), posts (# of), link, href, and last_post. (see below.) */
foreach ($category['boards'] as $board)
{
echo '
<tr id="board_', $board['id'], '" class="windowbg2">
<td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
[/url]
</td>
Replace With: แทนที่ด้วย /* Each board in each category's boards has:
new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
children (see below.), link_children (easier to use.), children_new (are they new?),
topics (# of), posts (# of), link, href, and last_post. (see below.) */
foreach ($category['boards'] as $board)
{
echo '
<tr id="board_', $board['id'], '" class="windowbg2">
<td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'on.png'))
$board_new_img = '/icons/' . $board['id'];
else
$board_new_img = '';
echo '
<img src="', $settings['images_url'], $board_new_img, '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
}
// Is it a redirection board?
elseif ($board['is_redirect'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'redirect.png'))
$board_redirect_img = '/icons/' . $board['id'];
else
$board_redirect_img = '';
echo '
<img src="', $settings['images_url'], $board_redirect_img, '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
}
// No new posts at all! The agony!!
else
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'off.png'))
$board_nonew_img = '/icons/' . $board['id'];
else
$board_nonew_img = '';
echo '
<img src="', $settings['images_url'], $board_nonew_img, '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
}
echo '
[/url]
</td>
เปิดไฟล์
./Themes/default/MessageIndex.template.phpFind: ค้นหา // If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<img src="', $settings['images_url'], '/' .$context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/' .$context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/' .$context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
[/url]
</td>
<td class="info">
<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '[/url]';
Replace With: แทนที่ทั้งหมด // If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'on.png'))
$board_new_img = '/icons/' . $board['id'];
else
$board_new_img = '';
echo '
<img src="', $settings['images_url'], $board_new_img, '/' .$context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
}
// Is it a redirection board?
elseif ($board['is_redirect'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'redirect.png'))
$board_redirect_img = '/icons/' . $board['id'];
else
$board_redirect_img = '';
echo '
<img src="', $settings['images_url'], $board_redirect_img, '/' .$context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
}
// No new posts at all! The agony!!
else
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'off.png'))
$board_nonew_img = '/icons/' . $board['id'];
else
$board_nonew_img = '';
echo '
<img src="', $settings['images_url'], $board_nonew_img, '/' .$context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
}
echo '
[/url]
</td>
<td class="info">
<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '[/url]';
นำมาถ่ายทอดอีกที โดย
ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง
สมัครสมาชิก หรือ
ลงชื่อเข้าระบบขอบคุณเจ้าของบทความต้นฉบับ และเพื่อนสมาชิกเว็บ
www.auto-nkp.com ทุกท่านครับ