otaku42's comment moderation patches

git-svn-id: http://svn.automattic.com/wordpress/trunk@546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
emc3
2003-11-12 15:22:47 +00:00
parent b16ad38d3a
commit f49f11b3dd
16 changed files with 983 additions and 74 deletions
+23 -3
View File
@@ -243,7 +243,7 @@ if ($posts) {
foreach ($posts as $post) { start_b2();
?>
<p>
<strong><?php the_time('Y/m/d @ H:i:s'); ?></strong> [ <a href="edit.php?p=<?php echo $id ?>&c=1"><?php comments_number('no comments', '1 comment', "% comments") ?></a>
<strong><?php the_time('Y/m/d @ H:i:s'); ?></strong> [ <a href="edit.php?p=<?php echo $id ?>&c=1"><?php comments_number('no comments', '1 comment', "% comments", true) ?></a>
<?php
if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) {
echo " - <a href='wp-post.php?action=edit&amp;post=$id";
@@ -278,16 +278,36 @@ foreach ($posts as $post) { start_b2();
<!-- comment -->
<li>
<?php
$comment_status = wp_get_comment_status($comment->comment_ID);
if ("unapproved" == $comment_status) {
echo "<span class=\"unapproved\">";
}
?>
<?php comment_date('Y/m/d') ?> @ <?php comment_time() ?>
<?php
if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) {
echo "[ <a href=\"wp-post.php?action=editcomment&amp;comment=".$comment->comment_ID."\">Edit</a>";
echo " - <a href=\"wp-post.php?action=deletecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return confirm('You are about to delete this comment by \'".$comment->comment_author."\'\\n \'OK\' to delete, \'Cancel\' to stop.')\">Delete</a> ]";
echo " - <a href=\"wp-post.php?action=deletecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return confirm('You are about to delete this comment by \'".$comment->comment_author."\'\\n \'OK\' to delete, \'Cancel\' to stop.')\">Delete</a> ";
if ( ('none' != $comment_status) && ($user_level >= 3) ) {
if ('approved' == wp_get_comment_status($comment->comment_ID)) {
echo " - <a href=\"wp-post.php?action=unapprovecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\">Unapprove</a> ";
} else {
echo " - <a href=\"wp-post.php?action=approvecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\">Approve</a> ";
}
}
echo "]";
} // end if any comments to show
?>
<br />
<strong><?php comment_author() ?> ( <?php comment_author_email_link() ?> / <?php comment_author_url_link() ?> )</strong> (IP: <?php comment_author_IP() ?>)
<?php comment_text() ?>
<?php
if ("unapproved" == $comment_status) {
echo "</span>";
}
?>
</li>
<!-- /comment -->
@@ -342,4 +362,4 @@ foreach ($posts as $post) { start_b2();
// uncomment this to show the nav bar at the bottom as well
echo $posts_nav_bar;
include('b2footer.php');
?>
?>