Changeset 560 for trunk/wp-admin/wp-moderation.php
- Timestamp:
- 11/30/2003 10:13:53 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/wp-moderation.php
r551 r560 51 51 // check if comment moderation is turned on in the settings 52 52 // if not, just give a short note and stop 53 if ('none' == get_settings( "comment_moderation")) {53 if ('none' == get_settings('comment_moderation')) { 54 54 echo '<div class="wrap"> 55 55 <p>Comment moderation has been turned off.</p> … … 99 99 die('<p>Your level is not high enough to moderate comments. Ask for a promotion from your <a href="mailto:$admin_email">blog admin</a>. :)</p>'); 100 100 } 101 101 ?> 102 <ul id="adminmenu2"> 103 <li><a href="edit.php">Latest Posts</a></li> 104 <li><a href="edit-comments.php">Latest Comments</a></li> 105 <li class="last"><a href="wp-moderation.php" class="current">Comments Awaiting Moderation</a></li> 106 </ul> 107 <?php 102 108 // check if comment moderation is turned on in the settings 103 109 // if not, just give a short note and stop … … 130 136 if ($ignored) { 131 137 if ($deleted == "1") { 132 echo "1 comment leftunchanged <br />\n";133 } else { 134 echo "$approved comments leftunchanged <br />\n";138 echo "1 comment unchanged <br />\n"; 139 } else { 140 echo "$approved comments unchanged <br />\n"; 135 141 } 136 142 … … 142 148 143 149 <div class="wrap"> 144 145 <?php 150 <?php 146 151 $comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_approved = '0'"); 147 152 … … 149 154 // list all comments that are waiting for approval 150 155 $file = basename(__FILE__); 151 echo "The following comments wait for approval:<br /><br />"; 152 echo "<form name=\"approval\" action=\"$file\" method=\"post\">"; 153 echo "<input type=\"hidden\" name=\"action\" value=\"update\" />\n"; 154 echo "<ol id=\"comments\">\n"; 155 156 ?> 157 <p>The following comments wait for approval:</p> 158 <form name="approval" action="" method="post"> 159 <input type="hidden" name="action" value="update" /> 160 <ol id="comments"> 161 <?php 156 162 foreach($comments as $comment) { 157 163 $comment_date = mysql2date(get_settings("date_format") . " @ " . get_settings("time_format"), $comment->comment_date); 158 164 $post_title = $wpdb->get_var("SELECT post_title FROM $tableposts WHERE ID='$comment->comment_post_ID'"); 159 $comment_text = stripslashes($comment->comment_content); 160 $comment_text = str_replace('<trackback />', '', $comment_text); 161 $comment_text = str_replace('<pingback />', '', $comment_text); 162 $comment_text = convert_chars($comment_text); 163 $comment_text = convert_bbcode($comment_text); 164 $comment_text = convert_gmcode($comment_text); 165 $comment_text = convert_smilies($comment_text); 166 $comment_text = make_clickable($comment_text); 167 $comment_text = balanceTags($comment_text,1); 168 $comment_text = apply_filters('comment_text', $comment_text); 169 170 echo "<li id=\"comment-$comment->comment_ID\">"; 171 echo "$comment_date -> $post_title<br />"; 172 echo "<strong>$comment->comment_author "; 173 echo "(<a href=\"mailto:$comment->comment_author_email\">$comment->comment_author_email</a> /"; 174 echo "<a href=\"$comment->comment_author_url\">$comment->comment_author_url</a>)</strong> "; 175 echo "(IP: <a href=\"http://ws.arin.net/cgi-bin/whois.pl?queryinput=$comment->comment_author_IP\">$comment->comment_author_IP</a>)<br />"; 176 echo $comment_text; 177 echo "<strong>Your action:</strong>"; 178 echo " <input type=\"radio\" name=\"comment[$comment->comment_ID]\" value=\"approve\" /> approve"; 179 echo " <input type=\"radio\" name=\"comment[$comment->comment_ID]\" value=\"delete\" /> delete"; 180 echo " <input type=\"radio\" name=\"comment[$comment->comment_ID]\" value=\"later\" checked=\"checked\" /> later"; 181 echo "<br /><br />"; 182 echo "</li>\n"; 165 166 echo "\n\t<li id='comment-$comment->comment_ID'>"; 167 ?> 168 <p><strong>Name:</strong> <?php comment_author() ?> <?php if ($comment->comment_author_email) { ?>| <strong>Email:</strong> <?php comment_author_email_link() ?> <?php } if ($comment->comment_author_email) { ?> | <strong>URI:</strong> <?php comment_author_url_link() ?> <?php } ?>| <strong>IP:</strong> <a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP() ?>"><?php comment_author_IP() ?></a></p> 169 <?php comment_text() ?> 170 <p><?php 171 echo "<a href=\"wp-post.php?action=editcomment&comment=".$comment->comment_ID."\">Edit</a>"; 172 echo " | <a href=\"wp-post.php?action=deletecomment&p=".$comment->comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return confirm('You are about to delete this comment by \'".$comment->comment_author."\'\\n \'Cancel\' to stop, \'OK\' to delete.')\">Delete just this comment</a> | "; ?>Bulk action: 173 <label><input type="radio" name="comment[$comment->comment_ID]" value="approve" /> Approve</label> 174 <label><input type="radio" name="comment[$comment->comment_ID]" value="delete" /> Delete</label> 175 <label><input type="radio" name="comment[$comment->comment_ID]" value="later" checked="checked" /> Do nothing</label> 176 177 </li> 178 <?php 183 179 } 184 185 echo "</ol>\n"; 186 echo "<input type=\"submit\" name=\"submit\" value=\"Continue!\" class=\"search\" style=\"font-weight: bold;\" />\n"; 187 echo "</form>\n"; 180 ?> 181 </ol> 182 <input type="submit" name="submit" value="Moderate Comments" class="search" /> 183 </form> 184 <?php 188 185 } else { 189 186 // nothing to approve 190 echo "Currently there are no comments to be approved.<br />\n"; 191 } 192 193 ?> 194 195 <br /> 187 echo "Currently there are no comments to be approved.\n"; 188 } 189 ?> 190 196 191 </div> 197 192 … … 205 200 <p><em>approve</em>: approves comment, so that it will be publically visible 206 201 <?php 207 if ( "1" == get_settings("comments_notify")) {202 if ('1' == get_settings('comments_notify')) { 208 203 echo "; the author of the post will be notified about the new comment on his post.</p>\n"; 209 204 } else {
Note: See TracChangeset
for help on using the changeset viewer.