Moderation is cleaner, returns feedback, and correct feedback.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-04-15 08:28:53 +00:00
parent 4f909d4cc5
commit c954c9ee4a
2 changed files with 34 additions and 51 deletions

View File

@ -101,37 +101,37 @@ default:
<li class="last"><a href="moderation.php" class="current">Awaiting Moderation</a></li> <li class="last"><a href="moderation.php" class="current">Awaiting Moderation</a></li>
</ul> </ul>
<?php <?php
$ignored = $_GET['ignored'];
$deleted = $_GET['deleted'];
$approved = $_GET['approved'];
// if we come here after deleting/approving comments we give if (($deleted) || ($approved) || ($ignored)) {
// a short overview what has been done echo "<div class='updated'>\n<p>";
if (($deleted) || ($approved) || ($ignored)) {
echo "<div class=\"wrap\">\n";
if ($approved) { if ($approved) {
if ($approved == "1") { if ('1' == $approved) {
echo "1 comment approved <br />\n"; echo "1 comment approved <br />\n";
} else { } else {
echo "$approved comments approved <br />\n"; echo "$approved comments approved <br />\n";
} }
} }
if ($deleted) { if ($deleted) {
if ($deleted == "1") { if ('1' == $deleted) {
echo "1 comment deleted <br />\n"; echo "1 comment deleted <br />\n";
} else { } else {
echo "$approved comments deleted <br />\n"; echo "$deleted comments deleted <br />\n";
} }
} }
if ($ignored) { if ($ignored) {
if ($deleted == "1") { if ('1' == $ignored) {
echo "1 comment unchanged <br />\n"; echo "1 comment unchanged <br />\n";
} else { } else {
echo "$approved comments unchanged <br />\n"; echo "$ignored comments unchanged <br />\n";
} }
}
echo "</p></div>\n";
}
} ?>
echo "</div>\n";
}
?>
<div class="wrap"> <div class="wrap">
<?php <?php
@ -141,7 +141,7 @@ if ($comments) {
// list all comments that are waiting for approval // list all comments that are waiting for approval
$file = basename(__FILE__); $file = basename(__FILE__);
?> ?>
<p>The following comments wait for approval:</p> <p>The following comments are in the moderation queue:</p>
<form name="approval" action="moderation.php" method="post"> <form name="approval" action="moderation.php" method="post">
<input type="hidden" name="action" value="update" /> <input type="hidden" name="action" value="update" />
<ol id="comments"> <ol id="comments">
@ -166,39 +166,18 @@ echo "<a href=\"post.php?action=editcomment&amp;comment=".$comment->comment_ID."
} }
?> ?>
</ol> </ol>
<input type="submit" name="submit" value="Moderate Comments" /> <p class="submit"><input type="submit" name="submit" value="Moderate Comments &raquo;" /></p>
</form> </form>
<?php <?php
} else { } else {
// nothing to approve // nothing to approve
echo "Currently there are no comments to be approved.\n"; echo "<p>Currently there are no comments to be approved.</p>\n";
} }
?> ?>
</div> </div>
<?php <?php
if ($comments) {
// show this help text only if there are comments waiting
?>
<div class="wrap">
<p>For each comment you have to choose either <em>approve</em>, <em>delete</em> or <em>later</em>:</p>
<p><em>approve</em>: approves comment, so that it will be publically visible
<?php
if ('1' == get_settings('comments_notify')) {
echo "; the author of the post will be notified about the new comment on his post.</p>\n";
} else {
echo ".</p>\n";
}
?>
<p><em>delete</em>: remove the content from your blog (note: you won't be asked again, so you should double-check
that you really want to delete the comment - once deleted you can&#8242;t bring them back!)</p>
<p><em>later</em>: don&#8242;t change the comment&#8242;s status at all now.</p>
</div>
<?php
} // if comments
break; break;
} }

View File

@ -155,6 +155,10 @@ textarea, input, select {
font: 12px Georgia, "Times New Roman", Times, serif; font: 12px Georgia, "Times New Roman", Times, serif;
} }
.submit {
text-align: right;
}
.updated { .updated {
background-color: #f0f8ff; background-color: #f0f8ff;
border: 1px solid #69c; border: 1px solid #69c;