ใส่ Spoil ให้กับบอร์ดกันเถอะ
แก้ไขครั้งสุดท้าย 2012-5-11 12:17 โดย Acer_Aspireแก้ไขครั้งสุดท้าย 2012-5-10 20:13 โดย Acer_Aspire
ปล.ใช้ได้กับ Signature ด้วยนะ !! // ถ้าจะใช้ในตั้งกระทู้แนะนำว่าอย่าใช้เพราะโค๊ดตีกันใช้ได้เฉพาะตอบกระทู้ .แป่วว...
::: Spoil ตัวนี้จะเป็นคนละแบบกับ Spoiler นะครับ :::
หน้าตาจะเป็นแบบนี้ http://upic.me/i/fn/6x2sp.png
เมื่อกดแล้วจะเป็นแบบนี้ http://upic.me/i/8w/1695h.png
เอาหล่ะเรามายำกันเลยดีกว่า
*คำเตือนก่อนแก้ไขไฟล์ใดๆ ให้ทำการสำรองไฟล์เก่าไว้ก่อน*
1. ไปยัง /source/function/function_discuzcode.php
แล้วหาโค๊ดดังต่อไปนี้if(strpos($msglower, '') !== FALSE) {
$message = preg_replace("/\+)@(+[.]+))?\](.+?)\[\/email\]/ies", "parseemail('\\1', '\\4')", $message);
}2.ให้นำโค๊ดดังต่อไปนี้ ไปวางข้างใต้if(strpos($msglower, '') !== FALSE) {
$message = str_replace(array('',''), array('<span onClick="jq(this).slideUp(\'fast\',function(){jq(this.nextSibling).slideDown(\'fast\')});"><img src="static/image/common/spoiler.gif"></span><span style="display:none;" onClick="jq(this).slideUp(\'fast\',function(){jq(this.previousSibling).slideDown(\'fast\')});">','</span>'), $message);
}3.นำภาพดังต่อไปนี้ อัพไปไว้ที่ static/image/common
http://upic.me/i/eb/spoiler.gif
เสร็จ ^^
สำหรับใครที่จะเอาไปใช้ใน แชท ของ 2th v1.3 ให้ทำดังต่อไปนี้
1.ไปยัง source/plugin/th_chat/template/discuz.htm + big.htm(แชทจอใหญ่)
ค้นหา {$chat['editor']}
แล้วเอาโค๊ดต่อไปนี้ไปว่างใต้ล่าง
<a href="javascript:void(0);" title="Spoiler" style="background: url(/static/image/common/spoil.png) no-repeat 0 0;" onclick="seditor_insertunit('nzchat', '', '')">Spoil</a>2.นำภาพต่อไปนี้อัพไปที่ static/image/common
http://upic.me/i/0g/bb_spoil.png
==============
สำหรับใครที่เอ๊ะมันทำยังไงอ่ะไรตรงไหนเราก่อมีไฟล์แบบสำเร็จมาให้เลย
**คำเตือนไฟล์นี้ได้รับการโมเพียงแค่ spoil ผู้ใดที่เคยแก้ไขเพิ่มให้ทำการสำรองไฟล์เก่าไว้ก่อน**
***เพิ่มเติม***
ใส่อันนี้ไว้ที่ header_common.htm<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
var jq = jQuery.noConflict();
</script>จาก New2th
เครดิตhttp://gdc.in.th/thread-4684-1-1.html&2th.me ขอบคุณครับ เอาไปลองก่อน sm913dz =[]= แบบไหนหว่านึกภาพไม่ออกขอ demo ดูหน่อยจิ sm949dz + ให้ แล้วเดอร์ มันกดคลิกแล้วไม่เปิดให้ครับ ผมใส่ข้อความลงไปแล้วsm910dz ขอบคุณครับ sm953dz ปล. ทำไมพอคลิกแล้วมันไม่เปิดหรอครับ
ช่วยหน่อยน่ะครับ ใส่อันนี้ไว้ที่ header_common.htm<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
var jq = jQuery.noConflict();
</script>ปล รูปและโค้ดขอเครดิตปมด้วยนะครับ อ้างอิงจาก New2th เมื่อ 2012-5-11 11:59 static/image/common/back.gif
ใส่อันนี้ไว้ที่ header_common.htmปล รูปและโค้ดขอเครดิตปมด้ว ...
ขอบคุณมากครับ ขอบคุณครับ แต่ว่ามันมีประโยชน ยังไงหรอครับ
หน้า:
[1]
2