Hi,
One my old forum (version 4.45) I had changed (with help) the reply with just one blockquote added. See the example how it was on the old forum:
And below a sample on the new version now:
Change of code was done at the file sf-forum.js. See the code how we changed it.
Code OLD forum:
function sfjquotePost(postid, intro, editor, forumid, quoteUrl)
{
quoteUrl+=’&post=’+postid+’&editor=’+editor+’&forumid=’+forumid;
jQuery(‘#sfpostform’).show(function() {
jQuery(‘#postitem’).load(quoteUrl, function(content, b) {
//——————–
// Added 2010-08-13 by Arno Brinkman
//
// First remove/replace some horizontal breaks and whitspace
content=content.replace(/(</blockquote>)(s*)(((<p>s*</p>)s*(<hrs*/>))|((<hrs*/>)s*(<p>s*</p>)))/ig, ‘</blockquote>’);
/* all browsers */
document.getElementById(‘sfpostform’).scrollIntoView();
if(editor == 2 || editor == 4)
{
//——————–
// Added 2010-08-15 by Arno Brinkman
//
// Remove quote blocks
content=content.replace(/(<div>((.|n|r)*)</code>)((.|n|r)*)(<blockquote>((.|n|r)*)</blockquote>)/ig, ”);
//
//——————–
document.addpost.postitem.value = ‘<div><strong>’+intro+'</strong></div>rr’+'<blockquote>’+content+'</blockquote><hr />rr’;
document.addpost.postitem.focus();
}
if(editor == 3)
{
document.addpost.postitem.value = ‘
‘+intro+’rr
‘+content+’
rr’;
document.addpost.postitem.focus();
}
if(editor == 1)
{
//——————–
// Added 2010-08-15 by Arno Brinkman
//
// Remove quote blocks
//content=content.replace(/(<p><strong>((.|n|r)*)</strong></p>)((.|n|r)*)(<blockquote>((.|n|r)*)</blockquote>)/ig, ”);
content=content.replace(/(<div>((.|n|r)*)</div>)((.|n|r)*)(<blockquote>((.|n|r)*)</blockquote>)/ig, ”);
//
//——————–
if(jQuery.browser.mozilla || jQuery.browser.opera)
{
tinyMCE.activeEditor.selection.setContent(‘<div><strong>’+intro+'</strong></div><blockquote>’+content+'</blockquote><p><hr /><br /></p>’);
tinyMCE.activeEditor.focus();
}
if(jQuery.browser.safari || jQuery.browser.webkit)
{
tinyMCE.activeEditor.execCommand(“InsertHTML”, false, ‘<div><strong>’+intro+'</strong></div><blockquote>’+content+'</blockquote><p><hr /><br /></p>’);
}
if(jQuery.browser.msie)
{
tinyMCE.activeEditor.execCommand(“mceInsertRawHTML”, false, ‘<div><strong>’+intro+'</strong></div><blockquote>’+content+'</blockquote><p><hr /></p>’);
tinyMCE.activeEditor.focus();
}
}
});
});
}
Now the code is like below.
New forum code:
function spjQuotePost(postid, intro, forumid, quoteUrl) {
quoteUrl+=’&post=’+postid+’&forumid=’+forumid;
jQuery(‘#spPostForm’).show(‘normal’, function() {
spjOpenEditor(‘spPostForm’, ‘post’);
jQuery(‘#postitem’).load(quoteUrl, function(content, b) {
spjEdInsertContent(intro, content);
});
});
}
I tried to change it but it doesn’t work. Hopefully you can help me with this.