[Plugin: AJAX Report Comments] Formatting on 3.0 (7 posts)

  1. MartinPWPH
    Posted 6 years ago #

    Yes I see this problem on the Dashboard also. Plugin works fine thought.....

  2. shyuan
    Posted 6 years ago #

    i am having the same issue as well :)

  3. Fixed it. Part of this is because they changed the table calls for the right now section.

    To make it look better, go to report-comments.php and find the section for function rc_dashboard_status() (should be lines 94 through 133ish)

    Change that WHOLE section to this:

    function rc_dashboard_status() {
            $rc_approved_count = rc_comments_count('approved');
            $rc_pending_count = rc_comments_count('pending');
            $rc_all_report_count = rc_comments_count('all');
        echo '<tr><td class="first t" colspan="2" style="background: #fff; border-top: 1px solid #ececec; border-bottom: 1px solid #ececec;"><em>AJAX Report Comments</em></td></tr>';
                            $url = get_bloginfo('wpurl').'/wp-admin/admin.php?page=rc_moderation&show=all';
                            $num = number_format_i18n($rc_all_report_count);
                            $text = __ngettext( 'Reported Comments', 'Reported Comments', $rc_all_report_count );
                            echo '<tr class="first">';
                            echo '<td class="b b_comments"><a href="' . $url .'">' . $num . '</a></td>';
                            echo '<td class="last t"><a class="comments" href="' . $url .'">' . $text . '</a></td>';
                            echo '</tr>';
                            $url = get_bloginfo('wpurl').'/wp-admin/admin.php?page=rc_moderation&show=approved';
                            $num = number_format_i18n($rc_approved_count);
                            $text = __ngettext( 'Approved Comments', 'Approved Comments', $rc_approved_count );
                            echo '<tr><td class="b b_approved"><a class="approved" href="' . $url .'"><span class=\'pending-count\'>' . $num . '</span></a></td>';
                            echo '<td class="last t"><a class="approved" href="' . $url .'">' . $text . '</a></td></tr>';
                            $url = get_bloginfo('wpurl').'/wp-admin/admin.php?page=rc_moderation&show=pending';
                            $num = number_format_i18n($rc_pending_count);
                            $text = __ngettext( 'Reported Comments', 'Reported Comments', $rc_pending_count );
                            echo '<tr><td class="b b-waiting"><a class="waiting" href="' . $url .'"><span class=\'pending-count\'>' . $num . '</span></a></td>';
                            echo '<td class="last t"><a class="waiting" href="' . $url .'">' . $text . '</a></td></tr>';
                            echo '<tr><td class="last t" colspan="2" style="background: #fff;">&copy; Tierra Innovation, v2.0<br />&nbsp;</td></tr>';

    Notice too how I've changed the add_action below.

    The things I did was changing the action call to the correct side of the table, reformatted the text to fit more screens, cleaned up the HTML so table rows were called correctly, added in a line break after the copyright for a visual effect.

    Works for me on 3.0 :)

  4. For reference.

    The table call changes are mentioned here: http://core.trac.wordpress.org/ticket/12202

    The new layout looks like this: http://img822.imageshack.us/img822/8348/fixedb.jpg

    I am NOT marking this resolved till I hear back from the dev as to getting this fixed in the actual plugin :) Why? Cause any update will overwrite my changes!

  5. Arwin Holmes
    Posted 6 years ago #

    Thanks for the dashboard update. Looks good.

    Not sure if anyone else has experienced this but I also noticed some issues with WP 3.0 when POST-ing a comment report.

    1. a JS error occurs
    2. a 404 response is seen in firebug despite the proper POST response

    The JS error is due to a call to undefined die() JS function in report-comments.php. I've updated the function at this line from die() to alert().
    mysack.onError = function() { alert(

    For the 404 response, since the actual JSON POST response looks fine, I added the following to report.php just before the last echo statement to send a proper header response.

    The AJAX messages render properly after making these changes. Hope this helps someone else out. Would love to see the actual plugin updated too.

  6. skippybosco
    Posted 5 years ago #

    @aethus: Thank you for sharing your fixes. I was having the same issues and this sorted it out for me (specifically the status_header(200)..

    Love to get this back into the distributed copy of the plugin.

Topic Closed

This topic has been closed to new replies.

About this Topic