หมวด บอร์ดทั่วไป
> สารพันความรู้ - เทคโนโลยี

ใส่แถบเครื่องมือ pdf ที่บอร์ด smf พร้อมขยายให้เต็มจอ

(1/1)

ลุงเปี๊ยก ที-เน็ตเวิร์ค (อ.สากเหล็ก):

ใส่แถบเครื่องมือ pdf ที่บอร์ด smf พร้อมขยายให้เต็มจอ
http://custom.simplemachines.org/mods/index.php?mod=1468


smf 2.0.7
ตัวอย่างนี้ ผมทำใส่เว็บพิจิตรบ้านเราดอทคอม



เข้าไปที่...
./Sources/Subs.php

ค้นหาคำว่า...

--- โค๊ด: --- array(
'tag' => 'pre',
'before' => '<pre>',
'after' => '</pre>',
),
--- ปิดโค้ด ---


แล้วเอาโค้ดนี้ วางก่อนหน้า
อย่าลืมแก้ขนาดที่จะไปแสดงผล width="500" height="400"
ให้เป็นขนาดตามต้องการเช่น width="900" height="600" จะทำให้การแสดงผลเต็มจอเด้อ (โค้ดด้านล่างผมใส่ให้แล้ว)

--- โค๊ด: --- // 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="900" height="600" /><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>',
         ),
--- ปิดโค้ด ---



จากนั้น เข้าไปที่...
./Sources/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']
),
--- ปิดโค้ด ---




จากนั้นไปที่...
./Themes /default /languages /Modifications.english.php

ค้นหาคำว่า...

--- โค๊ด: ---?>
--- ปิดโค้ด ---


แล้วเอาโค้ดนี้ วางก่อนหน้า

--- โค๊ด: ---$txt['pdf'] = 'add PDF';
--- ปิดโค้ด ---



สุดท้าย ให้เอาภาพนี้ (ชื่อนี้-นามสกุลนี้) pdf.gif
ไปวางที่ ./Themes/default/images/bbc
เพื่อให้มันดึงเอาภาพนี้ไปวางที่แถบเครื่องมือ Editor
พูดง่ายๆคือ เอาภาพนี้  ไปวางก็ได้เลยครับท่าน



ตัวอย่างครับท่านhttp://www.trustmarkthai.com/ecm/forms/form008.pdf

นำร่อง

[0] ดัชนีข้อความ

ไปที่เวอร์ชันเต็ม
Powered by SMFPacks Social Login Mod