0

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>
11
  • Are they in wp-content/mu-plugins (auto-run) or just wp-content/plugins, then activated in admin? May 16, 2011 at 10:34
  • @thedeadmedic The latter - ie in wp-content/plugins
    – anu
    May 16, 2011 at 10:38
  • Could you elaborate on the JS errors? Check the source and make sure safe-report-comments/js/ajax.js is loaded in the <head /> (applies to Safe Report). May 16, 2011 at 11:00
  • @thedeadmedic - updated with the javascript error from Ajax Report Comments
    – anu
    May 16, 2011 at 11:08
  • What happens with Safe Report? May 16, 2011 at 11:17

1 Answer 1

0

(Copy from comment to make the solution appear in our search results)

Use the Report Comments Plugin from Dagon Design.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.