Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

AjaxQuote

1235»

Comments

  • I have found what I think is a better solution to the fckeditor/quotations conflict. The solution proposed here of replacing the quote function does work. It allows you to quote posts if you are using fckeditor. However, users are able to go into their preferences and disable visual editing. Also, Safari users can not use fckeditor. If you replace the quote function, these users will also be prevented from using the quotations extension simply because they have not chosen to use the fckeditor. Here is a solution.

    Take the normal quotations extension. Replace the line function quote(commentId, authorId, authorName)withfunction normal_quote(commentId, authorId, authorName)
    Next, add the following function after the normal_quote function.function fck_quote(commentId, authorId, authorName) { var selText = getSel(); var commentText = ""; commentText = dumpCodeTree(document.getElementById("CommentBody_" + commentId)); if(selText != "") commentText = selText; var oEditor = FCKeditorAPI.GetInstance('Body') ; if ( oEditor.EditMode == FCK_EDITMODE_WYSIWYG ) { var FCKeditorquote = '<blockquote><cite>'+authorName+'</cite> '+ commentText+'</blockquote><br />'; oEditor.InsertHtml(FCKeditorquote ) ; } else alert( 'You must be on WYSIWYG mode!' ) ; }

    Lastly, place this function after the fck_quote function you just inserted. function quote ( commentId, authorId, authorName ){ if( typeof FCKeditorAPI != "undefined"){ fck_quote( commentId, authorId, authorName ); }else{ normal_quote( commentId, authorId, authorName ); } }

    So now when a user clicks on the quote button it will check to see if they are using FCKeditor or not. Then it will select the appropriate method of quoting depending on the editor the user has selected.
This discussion has been closed.