Fix lỗi comment media library vbb4
by Phoenix Hoang - Sau khi cài đặt xong Media library, các webmaster thường gặp lỗi! Không comment (bình luận" được !!! Để Fix lỗi comment media library vbb4 các bạn làm như sau:
1. Vào 8WayRun.Com Media library templates: cụ thể là các templates sau:
8WR_media_comment
8WR_media_details
8WR_media_details_edit
8WR_media_submit
* Tìm đoạn:
.prepare_submit(this.inputname.value, {vb:raw vboptions.postminchars})
* Thay bằng:
.prepare_submit(0, {vb:raw vboptions.postminchars})
2. Mở file media_ajax_comment.js tìm đoạn sau (sửa sau đó upload đè hoặc sửa trực tiếp trên host);
function post_comment(mid)
{
if (!fetch_object('vB_Editor_QR_textarea').value)
{
return false;
++
fetch_object('commentsubmit').value = vbphrase['post_comment_wait'];
fetch_object('commentsubmit').disabled = true;
YAHOO.util.Connect.asyncRequest("POST", "media_ajax.php?do=comment", {
success: send_comment,
failure: vBulletin_AJAX_Error_Handler,
timeout: 15000
++, SESSIONURL + 'securitytoken=' + SECURITYTOKEN + "&mid=" + mid + "&message=" +PHP.urlencode(fetch_object('vB_Editor_QR_textarea').value));
return false;
* Xóa và thay thế bằng đoạn sau:
function post_comment(mid)
{
var inptval=vB_Editor['vB_Editor_QR'].get_editor_contents();
if(!vB_Editor['vB_Editor_QR'].prepare_submit(0, 0)) {
return false;
++
fetch_object('commentsubmit').value = vbphrase['post_comment_wait'];
fetch_object('commentsubmit').disabled = true;
YAHOO.util.Connect.asyncRequest("POST", "media_ajax.php?do=comment", {
success: send_comment,
failure: vBulletin_AJAX_Error_Handler,
timeout: 15000
++, SESSIONURL + 'securitytoken=' + SECURITYTOKEN + "&mid=" + mid + "&message=" + PHP.urlencode(inptval));
return false;
* Các bạn vào test thử là o.k rồi đó !!!