I'm trying out the two comment reporting plugins that I know about in a multisite installation.
Both don't work - various javascript errors and (I assume) not taking into account the differences between single and multisite WP.
Does anyone know of a working comment reporting plugin for Multisite, or has anyone run into issues with the above plugins before?
[Update]
Using Ajax Report Comments
- Clicking on the "Report comment" link correctly opens a textbox.
Clicking on the "Report comment" button (which should fire off the report) raises the following error in chrome's javascript console
Uncaught SyntaxError: Unexpected token mysack.onCompletion runAJAX.xmlhttp.onreadystatechange
The inserted javascript is as follows:
<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>
wp-content/mu-plugins
(auto-run) or justwp-content/plugins
, then activated in admin?safe-report-comments/js/ajax.js
is loaded in the<head />
(applies to Safe Report).