PDA

View Full Version : Linebreaks disappearing in QuickEdit? SOLVED.


Sarteck
06-19-2011, 10:17 PM
If you are one of the forums that have the Live Topic hack on your vB4 forum, you've likely encountered this problem. Well, if you haven't figured out how to solve it, here's what you do!

Edit your clientscript/livetopic.js file, scroll down to about Line 680.

Inside this Else Block is where Live Topic saves your Quick Edit stuff. All I did was take out what was originally there, and replaced it with the [uncompressed] bit from clientscript/vbulletin_quick_edit.js.

Here's what that else block should now look like, if you're like me and want to keep the original stuff there but just commented out:


var newtext = a;
var newreason = c;
vB_Editor[this.editorid].uninitialize();
fetch_object(vB_QuickEditor.editorid + '_posting_msg').style.display = '';
document.body.style.cursor = 'wait';

pc_obj = fetch_object('postcount' + vB_QuickEditor.postid);

this.ajax_req = YAHOO.util.Connect.asyncRequest("POST", 'editpost.php?do=updatepost&postid=' + this.postid, {
success: vB_QuickEditor.update,
failure: vB_QuickEditor.handle_save_error,
timeout: vB_Default_Timeout,
scope: vB_QuickEditor
}, SESSIONURL + 'securitytoken=' + SECURITYTOKEN + '&do=updatepost&ajax=1&postid='
+ vB_QuickEditor.postid
+ '&posthash=' + vBulletin.attachinfo.posthash
+ '&poststarttime=' + vBulletin.attachinfo.poststarttime
+ '&message=' + PHP.urlencode(newtext)
+ '&reason=' + PHP.urlencode(fetch_object(vB_QuickEditor.editorid + '_edit_reason').value)
+ '&relpath=' + PHP.urlencode(RELPATH)
+ (pc_obj != null ? '&postcount=' + PHP.urlencode(pc_obj.name) : '')
+ ((typeof(pd) == "object" && typeof(pd[vB_QuickEditor.postid]) != 'undefined') ? '&displaymode=1' : '' )
);

vB_QuickEditor.pending = true;

/*
fetch_object(vB_QuickEditor.editorid + "_posting_msg").style.display = "";
document.body.style.cursor = "wait";
pc_obj = fetch_object("postcount" + vB_QuickEditor.postid);
this.ajax_req = YAHOO.util.Connect.asyncRequest("POST", "editpost.php?do=updatepost&postid=" + this.postid, {
success: vB_QuickEditor.update,
failure: vB_QuickEditor.handle_save_error,
timeout: vB_Default_Timeout,
scope: vB_QuickEditor
},
SESSIONURL + "securitytoken=" + SECURITYTOKEN + "&do=updatepost&ajax=1&postid=" + vB_QuickEditor.postid + "&wysiwyg=" + vB_Editor[vB_QuickEditor.editorid].wysiwyg_mode + "&message=" + PHP.urlencode(a) + "&reason=" + PHP.urlencode(fetch_object(vB_QuickEditor.editorid + "_edit_reason").value) + (pc_obj != null ? "&postcount=" + PHP.urlencode(pc_obj.name) : ""));
vB_QuickEditor.pending = true
*/