[MOD] เพิ่มตอบกลับในโพสต์แรก
แก้ไขครั้งสุดท้ายโดย princekoong เมื่อ 2011-9-27 23:44== DEMO ==
หรือ
http://bbs.gnv3.net/thread-87303-1-1.html
1.เพิ่มโค้ดในไฟล์ Css.n2-firstpost{height:56px;padding:10px 10px 10px 25px;margin:10px 0px;background:#eaeaea;border:1px solid #ddd;}
.n2-firstposti{float:left;width:95%;height:30px;line-height:30px;font-size:14px;border:1px solid;border-color:#999 #CCC #CCC #999;padding:2px 5px;background:#fff;}
.n2-firstpostb{float:left;width:90px;height:36px;border:none;overflow:hidden;text-indent:-9999px;background:#317AC3 url({IMGDIR}/reply.png) no-repeat 0 0;cursor:pointer;}2.แก้ไขไฟล์/forum/viewthread_node.htm
ค้นหา</div>
<!--{/if}-->
<!--{/if}-->แก้ไขเป็น</div>
<!--{/if}-->
<!--{subtemplate forum/viewthread_fastpost_1}-->
<!--{/if}-->3.แก้ไขไฟล์ static/js/forum.js
ค้นหาtheform.message.value = parseurl(theform.message.value);
if(!noajaxpost) {
ajaxpost('fastpostform', 'fastpostreturn', 'fastpostreturn', 'onerror', $('fastpostsubmit'));
return false;
} else {
return true;
}
}เพิ่มโค้ดนี้ครับfunction postvalidate(theform, noajaxpost) {
if(postpt) {
return false;
}
postpt = 1;
setTimeout(function() {postpt = 0}, 2000);
noajaxpost = !noajaxpost ? 0 : noajaxpost;
s = '';
if(typeof postvalidateextra == 'function') {
var v = postvalidateextra();
if(!v) {
return false;
}
}
if(theform.message.value == '' && theform.subject.value == '') {
s = 'กรุณาใส่เนื้อหา';
theform.message.focus();
} else if(mb_strlen(theform.subject.value) > 80) {
s = 'เนื้อหาของคุณมีความยาวมากกว่า 80 ตัวอักษร';
theform.subject.focus();
}
if(!disablepostctrl && ((postminchars != 0 && mb_strlen(theform.message.value) < postminchars) || (postmaxchars != 0 && mb_strlen(theform.message.value) > postmaxchars))) {
s = 'คำเตือน\n\nความยาวเนื้อหาของคุณ: ' + mb_strlen(theform.message.value) + ' ' + 'ไบต์\nความยาวของเนื้อหาจะต้องอยู่ระหว่าง: ' + postminchars + ' ถึง ' + postmaxchars + ' ไบต์';
}
if(s) {
showError(s);
doane();
$('postsubmit').disabled = false;
return false;
}
$('postsubmit').disabled = true;
theform.message.value = parseurl(theform.message.value);
if(!noajaxpost) {
ajaxpost('postform', 'postreturn', 'postreturn', 'onerror', $('postsubmit'));
return false;
} else {
return true;
}
}4.อัพโหลดไฟล์ ไปวางไว้ที่ /สกินของคุณ/forum/
5.อัพโหลดรูป ไปวางไว้ที่ รูปภาพสกินของคุณ
6.อัพเดทแคชครับ ขอบคุณครับ ขอยคุณครับ เยี่ยมครับ ปุ่มก็สวย 555
ขอบคุณครับ ^^ ขอบคุณมากครับ
เวลาโพสต์ก็สะดวกดี ไม่ต้องเลื่อนลงไปข้างล่าง
แก้ไขครั้งสุดท้ายโดย lifegood เมื่อ 2011-9-28 14:24
ขอบคุณครับ
แต่ว่าลงรูปมันไม่แสดงอะครับ อืม ๆ เดี่ยวนี้เข้ามาบ่อยนะครับ คุณ พรินซ sm951dz
ยังไงก็ขอบคุณไว้ก่อน sm949dz เห้ยย สวยย ขอบคุณมากๆจ้าา ขอบคุณมากๆ ครับ
ชอบมากๆ เลย อิอิ
เอาไปติดเว็บเรียบร้อยครับ ขอบคุณครับ
หน้า:
[1]