giggock
23 พฤศจิกายน พ.ศ. 2550, 03:46:36


color.js
ก่อนอื่นต้องอับโหลดไฟล์ color.js ไปที่ /forums/Themes/default/
ก็จะได้ชื่อเป็น http://xxxx.com/forums/Themes/default/color.js
อย่าลืม เซ็ตค่า CHOMD ไฟล์นั้นๆเป็น 777 ไว้ จากนั้นเริ่มแก้โค๊ด
ไปที่
Themes/default/Display.template.php
หา
<tr id="quickReplyOptions">
<td class="windowbg" width="25%" valign="top">this function<u>quick reply</u> you can use code and emotion more faster</td>
<td class="windowbg" width="75%" align="center">
<form action="http://xxxxx.com/forums/index.php?PHPSESSID=???????&action=post" method="post" accept-charset="tis-620" name="postmodify" id="postmodify" onsubmit="submitonce(this);" style="margin: 0;">
<input type="hidden" name="topic" value="1348" />
<input type="hidden" name="subject" value="Re: ???" />
<input type="hidden" name="icon" value="xx" />
<input type="hidden" name="notify" value="0" />
<input type="hidden" name="goback" value="1" />
<input type="hidden" name="num_replies" value="1" />
เอาโค้ดด้านล่างไปวางเพิ่ม บรรทัดทัดไป
<script language="javascript" type="text/javascript">
function bbc_highlight(something, mode)
{
something.style.backgroundImage = "url(" + smf_images_url + (mode ? "/bbc/bbc_hoverbg.gif)" : "/bbc/bbc_bg.gif)");
}
var cbid = "http://xxxx.com/forums/Themes/default/images/bbc/";
var usecolor = 1;
var usebgcolor = 1;
var yourtexthere = "Your Text Here";
var insert = "Insert";
var changetoinsertcolor = "put Color Tags";
var changetoinsertbgcolor = "put BgColor Tags";
var switchbetween = "click to fill Color Tags/Bgcolor Tags";
var insertlastclicked = "Finishing Color";
var insertlasthovered = "Choosing Color";
</script>
<script language="javascript" src="http://xxxx.com/forums/Themes/default/color.js" type="text/javascript"></script>
อย่าลืมแก้ให้เป็นชื่อเวปท่านก่อนหล่ะhttp://xxxx.com/forums/
ก่อนแก้ไข ให้สำรองไฟล์ที่จะแก้ไขไว้ก่อนนะครับกันผิดพลาด
ผมเอามาทดสอบแล้วใช่ได้ก็เลยนำมาฝาก กันนะครับ
ohwohw
23 พฤศจิกายน พ.ศ. 2550, 05:49:17
มีวิธีใช้ได้กับธีมอื่นป่าวครับ มันใช้ได้แต่ธีมปกติ ต้องไปแก้ตรงไหน
sniffer
23 พฤศจิกายน พ.ศ. 2550, 07:58:27
ถ้าเป็นเว็บโซนคงไม่ทำหลอกครับเพราะว่าหนักเว็บ
เพราะว่าตอบแบบสมบูรณ์ก็มีแล้วไม่ควรเพิ่มสีที่ตอบด่วนครับ
fujidora
24 พฤศจิกายน พ.ศ. 2550, 20:29:33
มีวิธีใช้ได้กับธีมอื่นป่าวครับ มันใช้ได้แต่ธีมปกติ ต้องไปแก้ตรงไหน
ได้ครับ ถ้าจะใช้กับธีมอื่นต้องดัดแปลงนิดหน่อยอ่ะครับ
1. ไฟล์ color.js อัพไว้ที่โฟลเดอร์ของธีมที่จะลงครับ
2. จากที่แก้ไฟล์ที่ Themes/default/Display.template.php ก็ไปแก้ไฟล์ที่ Themes/ชื่อโฟลเดอร์ธีม/Display.template.php
หาโค้ด
<tr id="quickReplyOptions"', $options['display_quick_reply'] == 2 ? '' : ' style="display: none"', '>
<td class="windowbg" width="25%" valign="top">', $txt['quick_reply_2'], $context['is_locked'] ? '<br /><br /><b>' . $txt['quick_reply_warning'] . '</b>' : '', '</td>
<td class="windowbg" width="75%" align="center">
<form action="', $scripturl, '?action=post2" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="submitonce(this);" style="margin: 0;">
<input type="hidden" name="topic" value="' . $context['current_topic'] . '" />
<input type="hidden" name="subject" value="' . $context['response_prefix'] . $context['subject'] . '" />
<input type="hidden" name="icon" value="xx" />
<input type="hidden" name="notify" value="', $context['is_marked_notify'] || !empty($options['auto_notify']) ? '1' : '0', '" />
<input type="hidden" name="goback" value="', empty($options['return_to_post']) ? '0' : '1', '" />
<input type="hidden" name="num_replies" value="', $context['num_replies'], '" />
วางโค้ดนี้ต่อจากโค้ดข้างบนนะครับ
<script language="javascript" type="text/javascript">
function bbc_highlight(something, mode)
{
something.style.backgroundImage = "url(" + smf_images_url + (mode ? "/bbc/bbc_hoverbg.gif)" : "/bbc/bbc_bg.gif)");
}
var cbid = "http://xxxx.com/forums/Themes/โฟลเดอร์ของธีม/images/bbc/";
var usecolor = 1;
var usebgcolor = 1;
var yourtexthere = "Your Text Here";
var insert = "Insert";
var changetoinsertcolor = "put Color Tags";
var changetoinsertbgcolor = "put BgColor Tags";
var switchbetween = "click to fill Color Tags/Bgcolor Tags";
var insertlastclicked = "Finishing Color";
var insertlasthovered = "Choosing Color";
</script>
<script language="javascript" src="http://xxxx.com/forums/Themes/โฟลเดอร์ของธีม/color.js" type="text/javascript"></script>
หมายเหตุ : ตรง xxx.com ให้แก้เป็นเว็บของท่านนะครับ
knok
21 ธันวาคม พ.ศ. 2550, 20:15:03
แล้วถ้าผมต้องการเพิ่มแถบสีนี้ในหน้าตอบปกติละครับ จะต้องแก้โค๊ดยังไง
bggaro
24 พฤษภาคม พ.ศ. 2551, 16:28:29
แล้วถ้าผมต้องการเพิ่มแถบสีนี้ในหน้าตอบปกติละครับ จะต้องแก้โค๊ดยังไง
ตอบให้ครับ...
ค้าหา ใน code นี้ใน Post.template.php
// Finally the most important bit - the actual text box to write in!
echo '
<tr>
<td valign="top" align="right"></td>
<td>
จากนั้นก็เอา code นี่ไปใส่ต่อจาก <td>
<script language="javascript" type="text/javascript">
function bbc_highlight(something, mode)
{
something.style.backgroundImage = "url(" + smf_images_url + (mode ? "/bbc/bbc_hoverbg.gif)" : "/bbc/bbc_bg.gif)");
}
var cbid = "http://xxxx.com/forums/Themes/โฟลเดอร์ของธีม/images/bbc/";
var usecolor = 1;
var usebgcolor = 1;
var yourtexthere = "Your Text Here";
var insert = "Insert";
var changetoinsertcolor = "ชื่อไฟล์ภาพ";
var changetoinsertbgcolor = "ชื่อไฟล์ภาพ";
var switchbetween = "ชื่อไฟล์ภาพ/Bgcolor Tags";
var insertlastclicked = "Finishing Color";
var insertlasthovered = "Choosing Color";
</script>
<script language="javascript" src="http://xxxx.com/forums/Themes/โฟลเดอร์ของธีม/color.js" type="text/javascript"></script>
ก็ได้แล้วครับผม..
ปล. อันนี้คือที่ผมลองทำดู...
NongAt
21 มิถุนายน พ.ศ. 2551, 11:43:31
ไม่ได้ครับ