สำหรับ SMF 2.0.xแก้ไขไฟล์:file $sourcedir/Subs.php
ค้นหา -->>
array(
'tag' => 'pre',
'before' => '<pre>',
'after' => '</pre>',
),
เพิ่มไว้ก่อน -->>
// 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</a></noembed></object>' : '<embed type="application/pdf" src="$1" width="500" height="400" /><noembed><a href="$1" target="_blank">$1</a></noembed>'),
'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled[\'url\']))
$tag[\'content\'] = \'$1\';'),
'disabled_content' => '<a href="$1" target="_blank">$1</a>',
),
file $sourcedir/Subs-Editor.php
ค้นหา -->>
$allowed_tags = array('b', 'u', 'i', 's', 'hr', 'list', 'li', 'font', 'size', 'color', 'img', 'left', 'center', 'right', 'url', 'email', 'ftp', 'sub', 'sup');
แก้เป็น -->>
$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']
),
file $languagedir/Modifications.thai-utf8.php
เพิ่ม -->>
$txt['pdf'] = 'แทรก PDF';
อัพโหลดไฟล์

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