- ชื่อ: Guest and Member Tag
- ผู้เขียน: Robbo_
- นำเสนอโดย: DexMoreGroup
- ประเภท: BBC
- รองรับ: SMF 1.1.xx, 2.0.xx
- ปรับปรุงล่าสุด: 19 มีนาคม 2553
- ต้นฉบับ: Guest and Member Tag
รายละเอียด เป็น BBCode ไว้สำหรับคล่อมข้อความเพื่อกำหนดว่า "ข้อความนี้แสดงเฉพาะสมาชิก หรือบุคคลทั่วไป" เท่านั้น ถ้าหากไม่ใส่ก็เท่ากับว่าไม่กำหนดอะไรเลย ใช่ค่ามาตรฐานของฟอรั่ม
ตัวอย่าง- [guest] ข้อความนี้จะแสดงเฉพาะบุคคลทั่วไปเท่านั้น [/guest]
- [member] ข้อความนี้จะแสดงเฉพาะสมาชิกเท่านั้น [/member]
สำหรับ SMF 1.1.xxแก้ไขไฟล์:file $sourcesdir/Subs.php
ค้นหา -->>
array(
'tag' => 'hr',
เพิ่มไว้ก่อน -->>
array(
'tag' => 'guest',
'type' => 'unparsed_content',
'content' => '$1',
'validate' => create_function('&$tag, &$data, $disabled', 'global $context; if(!$context["user"]["is_guest"]) $data = ""; else $data = parse_bbc($data, ' . ($smileys ? 'true' : 'false') . ', \'' . $cache_id . '\');'),
),
ค้นหา -->>
array(
'tag' => 'move',
เพิ่มไว้ก่อน -->>
array(
'tag' => 'member',
'type' => 'unparsed_content',
'content' => '$1',
'validate' => create_function('&$tag, &$data, $disabled', 'global $context; if($context["user"]["is_guest"]) $data = ""; else $data = parse_bbc($data, ' . ($smileys ? 'true' : 'false') . ', \'' . $cache_id . '\');'),
),
file $themesdir/Post.template.php
ค้นหา -->>
'list' => array('code' => 'list', 'before' => '[list]\n[li]', 'after' => '[/li]\n[li][/li]\n[/list]', 'description' => $txt[261]),
เพิ่มไว้หลัง -->>
array(),
'guest' => array('code' => 'guest', 'before' => '[guest]', 'after' => '[/guest]', 'description' => $txt['bbc_code_guest']),
'member' => array('code' => 'member', 'before' => '[member]', 'after' => '[/member]', 'description' => $txt['bbc_code_member']),
file $languagesdir/Modifications.thai-utf8.php
เพิ่ม -->>
$txt['bbc_code_guest'] = 'แสดงเฉพาะบุคคลทั่วไป';
$txt['bbc_code_member'] = 'แสดงเฉพาะสมาชิก';
Upload file

file member.gif -->> $imagesdir/bbc
file guest.gif -->> $imagesdir/bbc
ลิงค์หัวข้อ:
http://dexmore.com/topic/6195