- ชื่อ: Custom Global html
- ผู้เขียน: UnclEo
- นำเสนอโดย: DexMoreGroup
- ประเภท: Feature Enhancement
- รองรับ: SMF 1.1.xx, 2.0.xx
- ปรับปรุงล่าสุด: 23 มิถุนายน 2553
รายละเอียด เพิ่มข่าว แบนเนอร์หรือรูปภาพอื่นๆ ไว้ด้านบนของบอร์ด
ตัวอย่าง ดูตัวอักษรวิ่งของเด็กมอร์
แก้ไขไฟล์:file $Themesdir/Settings.template.php
ค้นหา -->>
$context['theme_settings'] = array(
array(
'id' => 'header_logo_url',
'label' => $txt['header_logo_url'],
'description' => $txt['header_logo_url_desc'],
'type' => 'text',
),
เพิ่มไว้หลัง -->>
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Comfile file $Themesdir/index.template.php
ค้นหา -->>
// Show the menu here, according to the menu sub template.
template_menu();
เพิ่มไว้หลัง -->>
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Comส่วนนี้สามารถปรับแต่ง style ได้ตามชอบใจ หรือจะนำไปไว้ตำแหน่งอื่น ๆ ก็ได้ ตาม mod นี้จะอยู่ล่างเมนูบาร์ หากต้องการแสดงเพียงหน้าแรกเพิ่มใน BoardIndex.template.php ในตำแหน่งที่ต้องการ
file languagesdir/Settings.thai-utf8.php
ค้นหา -->>
?>
เพิ่มไว้ก่อน -->>
$txt['custom_global_html'] = 'ใช้ HTML แสดงประกาศ:';
$txt['custom_global_html_desc'] = 'แสดงประกาศ แบนเนอร์หรืออื่น ๆ ในรูปแบบ HTML (ปล่อยว่างไว้หากไม่ใช้งาน)';
file languagesdir/Settings.english.php
$txt['custom_global_html'] = 'HTML code to be displayed';
$txt['custom_global_html_desc'] = 'HTML code will be displayed over page content. You can use to add a banner, or make global announcements etc.';
การตั้งค่า: ผู้ดูแล --> ตั้งค่าธีมปัจจุบัน

ตัวอย่างที่นี่ จะสร้าง table สำเร็จรูปไว้ใน template เลย
if(!empty($settings['custom_global_html'])){
echo '
<div align="center" style="width: 930px; margin: 0 auto;">
', $settings['custom_global_html'], '
</div>';
}
แล้วเพิ่ม tag HTML โดยไม่ต้องสร้างตาราง แบบนี้..
<marquee width="100%" onmouseover="this.scrollAmount=0" onmouseout="this.scrollAmount=1" scrollamount="1" scrolldelay="27" truespeed="true" direction="left">ท่านจะใช้งานเว็บบอร์ดนี้ได้อย่างเต็มประสิทธิภาพ หากท่านใช้ <a href="http://th.www.mozilla.com/th/"><b>Firefox Bowser</b></a> ตัวอักษรจะดูเป็นระเบียบและอ่านง่ายยิ่งขึ้นเมื่อท่านปรับเป็นชนิด <a href="http://www.dexmore.com/forums/index.php?topic=3457.0"><b>ClearType</b></a></marquee>
ลิงค์หัวข้อ:
http://dexmore.com/topic/336