ขั้นตอนแรกให้เราก็ต้องติดตั้ง mod ตัวนี้ก่อนนะครับ
วิธีติดตั้งให้เราเปิดไฟล์
./Sources/Subs.phpหาโค๊ด array(
'tag' => 'pre',
'before' => '',
'after' => '
',
),
เติมโค๊ดนี้ก่อนที่หา// PDF [pdf]example.pdf[/pdf]
array(
'tag' => 'pdf',
'type' => 'unparsed_content',
'content' => ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'] ? '<object type="application/pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" data="$1" width="800" height="600"><param name="src" value="$1"><embed src="$1" width="500" height="400" /><noembed><a href="$1" target="_blank">$1[/url]</noembed></object>' : '<embed type="application/pdf" src="$1" width="500" height="400" /><noembed><a href="$1" target="_blank">$1[/url]</noembed>'),
'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled[\'url\']))
$tag[\'content\'] = \'$1\';'),
'disabled_content' => '<a href="$1" target="_blank">$1[/url]',
),
เปิดไฟล์
./Sources/Subs-Editor.phpหาโค๊ด
เปิดไฟล์./Sources/Subs-Editor.php
หาโค๊ด
ลบออกและแทนที่ด้วยโค๊ดนี้ $allowed_tags = array('b', 'u', 'i', 's', 'hr', 'list', 'li', 'font', 'size', 'color', 'pdf', 'img', 'left', 'center', 'right', 'url', 'email', 'ftp', 'sub', 'sup');
หาโค๊ด array(
'image' => 'img',
'code' => 'img',
'before' => '[img]',
'after' => '[/img]',
'description' => $txt['image']
),
เติมโค๊ดนี้ต่อจากที่หา array(
'image' => 'pdf',
'code' => 'pdf',
'before' => '[pdf]',
'after' => '[/pdf]',
'description' => $txt['pdf']
),
เปิดไฟล์ .
/Themes/default/languages/Modifications.english.phpหาโค๊ด?>
เติมโค๊ดนี้ก่อนจากที่หา$txt['pdf'] = 'add PDF';
จากนั้นให้อัพโหลดไฟล์ "pdf.gif" ไปไว้ที่
"./Themes/default/images/bbc". (ดาวน์โหลดได้ที่ไฟล์แนบ)
วิธีใช้งานตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง
สมัครสมาชิก หรือ
ลงชื่อเข้าระบบเมื่อวางไฟล์ pdf เสร็จแล้วก็จะได้แบบนี้ครับ
มาจากกระทู้นี้
http://www.sslest.com/index.php/topic,1184.0.html