针对多站点的评论报道 时间:2011-05-16 作者:anu 我正在多站点安装中试用我知道的两个评论报告插件。AJAX Report CommentsSafe Report Comments两者都不起作用-各种javascript错误和(我假设)没有考虑到单个站点和多站点WP之间的差异。有没有人知道Multisite的评论报告插件可以正常工作,或者之前有没有人遇到过上述插件的问题?[Update]使用Ajax报告注释单击“报告注释”链接可正确打开文本框单击“报告注释”按钮(该按钮应触发报告)会在chrome的javascript控制台中引发以下错误Uncaught SyntaxError: Unexpected token mysack.onCompletion runAJAX.xmlhttp.onreadystatechange 插入的javascript如下所示:<script type="text/javascript"> //<![CDATA[ function reportComment( commentID ) { var reporter_comment = document.getElementById( \'reportcomment_comment_textarea_\' + commentID ).value; var mysack = new sack( \'http://test-staffblogs.nature.com/news/wp-content/plugins/report-comments/report.php?c=\'+commentID+\'&r=\'+escape(reporter_comment) ); mysack.method = \'POST\'; mysack.onError = function() { alert( "Error Error Error" ) }; mysack.onCompletion = function() { finishReport( commentID, eval( \'(\' + this.response + \')\' )); } mysack.runAJAX(); } function reportComment_AddTextArea( commentID ) { document.getElementById( \'reportcomment_results_div_\' + commentID ).innerHTML = "Why are you doing this?"; var textarea = "<textarea name=\\"reportcomment_comment_textarea_" + commentID + "\\" id=\\"reportcomment_comment_textarea_" + commentID + "\\" cols=\\"55\\" rows=\\"4\\" class=\\"reportcomment_textarea\\"></textarea><br /><input type=\\"button\\" name=\\"Report Comment\\" value=\\"Report Comment\\" onclick=\\"reportComment( " + commentID + " );\\" />"; document.getElementById( \'reportcomment_comment_div_\' + commentID ).innerHTML = textarea; } function finishReport( commentID, response ) { var message = \'<span class="reportedcomment_text">\'+response.message+\'</span>\'; document.getElementById( \'reportcomment_results_div_\' + commentID ).innerHTML = message; document.getElementById( \'reportcomment_comment_div_\' + commentID ).innerHTML = \'\'; } //]]> </script> 1 个回复 最合适的回答,由SO网友:fuxia 整理而成 (从评论中复制,使解决方案出现在我们的搜索结果中)使用Report Comments Plugin 来自Dagon Design。 文章导航