Changeset 560
- Timestamp:
- 11/30/2003 10:13:53 PM (21 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-comments.php
r558 r560 39 39 <ul id="adminmenu2"> 40 40 <li><a href="edit.php">Latest Posts</a></li> 41 <li class="last"><a href="edit-comments.php" class="current">Latest Comments</a></li>42 <li ><a href="wp-moderation.php">Comments Awaiting Moderation</a></li>41 <li><a href="edit-comments.php" class="current">Latest Comments</a></li> 42 <li class="last"><a href="wp-moderation.php">Comments Awaiting Moderation</a></li> 43 43 </ul> 44 44 … … 144 144 echo '<ol>'; 145 145 foreach ($comments as $comment) { 146 $comment_status = wp_get_comment_status($comment->comment_ID); 147 if ('unapproved' == $comment_status) { 148 echo '<li class="unapproved" style="border-bottom: 1px solid #ccc;">'; 149 } else { 150 echo '<li style="border-bottom: 1px solid #ccc;">'; 151 } 146 152 ?> 147 <li style="border-bottom: 1px solid #ccc;"> 148 <?php 149 $comment_status = wp_get_comment_status($comment->comment_ID); 150 151 if ("unapproved" == $comment_status) { 152 echo "<span class=\"unapproved\">"; 153 } 154 ?> 155 <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> <?php comment_author_IP() ?></p> 153 <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> 156 154 157 155 <?php comment_text() ?> … … 161 159 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</a> | "; 162 160 } // end if any comments to show 163 ?> <a href="edit.php?p=<?php echo $comment->comment_post_ID; ?>">View Post</a></p> 164 <?php 165 if ("unapproved" == $comment_status) { 166 echo "</span>"; 167 } 168 ?> 161 ?> <a href="edit.php?p=<?php echo $comment->comment_post_ID; ?>">Edit Post</a></p> 169 162 </li> 170 163 -
trunk/wp-admin/edit.php
r558 r560 38 38 <ul id="adminmenu2"> 39 39 <li><a href="edit.php" class="current">Latest Posts</a></li> 40 <li class="last"><a href="edit-comments.php">Latest Comments</a></li>41 <li ><a href="wp-moderation.php">Comments Awaiting Moderation</a></li>40 <li><a href="edit-comments.php">Latest Comments</a></li> 41 <li class="last"><a href="wp-moderation.php">Comments Awaiting Moderation</a></li> 42 42 </ul> 43 43 -
trunk/wp-admin/wp-admin.css
r546 r560 36 36 37 37 label { 38 font-weight: bold;38 cursor: pointer; 39 39 } 40 40 … … 198 198 } 199 199 200 #post label.selectit { 201 background-color: #eee; 202 padding: 0 2px; 203 display: block; 204 margin-bottom: 1px; 205 border-bottom: 1px solid #666; 206 font-size: 11px; 207 } 208 209 #post label.selectit:hover { 210 background-color: #dadada; 211 } 212 213 label input { 214 padding: 0; 215 margin: 0; 216 } 217 200 218 #profile { 201 219 margin: 10px; -
trunk/wp-admin/wp-edit.form.php
r532 r560 7 7 function selected($selected, $current) { 8 8 if ($selected == $current) echo ' selected="selected"'; 9 } 10 11 function checked($checked, $current) { 12 if ($checked == $current) echo ' checked="checked"'; 9 13 } 10 14 … … 58 62 <input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' /> 59 63 60 <?php if ($action != "editcomment") {64 <?php if ($action != 'editcomment') { 61 65 // this is for everything but comment editing 62 66 ?> … … 80 84 </div> 81 85 <div id="poststatusdiv"> 82 <label for="post_status"><a href="http://wordpress.org/docs/reference/post/#post_status" title="Help on post status">Post 83 Status</a>:</label> 84 <br /> 85 <select name="post_status" id="post_status"> 86 <option value="publish"<?php selected($post_status, 'publish'); ?>>Publish</option> 87 <option value="draft"<?php selected($post_status, 'draft'); ?>>Draft</option> 88 <option value="private"<?php selected($post_status, 'private'); ?>>Private</option> 89 </select> 86 <a href="http://wordpress.org/docs/reference/post/#post_status" title="Help on post status">Post 87 Status</a>: 88 <label for="post_status_publish" class="selectit"><input id="post_status_publish" name="post_status" type="radio" value="publish" <?php checked($post_status, 'publish'); ?> /> Publish</label> 89 <label for="post_status_draft" class="selectit"><input id="post_status_draft" name="post_status" type="radio" value="draft" <?php checked($post_status, 'draft'); ?> /> Draft</label> 90 <label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="radio" value="private" <?php checked($post_status, 'private'); ?> /> Private</label> 90 91 </div> 91 92 <div id="commentstatusdiv"> 92 <label for="comment_status"><a href="http://wordpress.org/docs/reference/post/#comments" title="Help on comment status">Comments</a>:</label> 93 <br /> 94 <select name="comment_status" id="comment_status"> 95 <option value="open"<?php selected($comment_status, 'open'); ?>>Open</option> 96 <option value="closed"<?php selected($comment_status, 'closed'); ?>>Closed</option> 97 </select> 93 <a href="http://wordpress.org/docs/reference/post/#comments" title="Help on comment status">Comments</a>: 94 <label for="comment_status_open" class="selectit"><input id="comment_status_open" name="comment_status" type="radio" value="open" <?php checked($comment_status, 'open'); ?> /> Open</label> 95 <label for="comment_status_closed" class="selectit"><input id="comment_status_closed" name="comment_status" type="radio" value="closed" <?php checked($comment_status, 'closed'); ?> /> 96 Closed</label> 98 97 </div> 99 98 <div id="pingstatusdiv"> 100 <label for="ping_status"><a href="http://wordpress.org/docs/reference/post/#pings" title="Help on ping status">Pings</a>:</label> 101 <br /> 102 <select name="ping_status" id="ping_status"> 103 <option value="open"<?php selected($ping_status, 'open'); ?>>Open</option> 104 <option value="closed"<?php selected($ping_status, 'closed'); ?>>Closed</option> 105 </select> 99 <a href="http://wordpress.org/docs/reference/post/#pings" title="Help on ping status">Pings</a>: 100 <label for="ping_status_open" class="selectit"><input id="ping_status_open" name="ping_status" type="radio" value="open"<?php checked($ping_status, 'open'); ?> /> Open</label> 101 <label for="ping_status_closed" class="selectit"><input id="ping_status_closed" name="ping_status" type="radio" value="closed" <?php checked($ping_status, 'closed'); ?> /> Closed</label> 102 106 103 </div> 107 104 <div id="postpassworddiv"> … … 111 108 <input name="post_password" type="text" id="post_password" value="<?php echo $post_password ?>" /> 112 109 </div> 113 <br clear="all" />110 <br style="clear: both" /> 114 111 <?php 115 112 … … 149 146 if ($action != 'editcomment') { 150 147 ?> 151 <p>< label for="excerpt"><a href="http://wordpress.org/docs/reference/post/#excerpt" title="Help with excerpts">Excerpt</a>:</label>148 <p><a href="http://wordpress.org/docs/reference/post/#excerpt" title="Help with excerpts">Excerpt</a>: 152 149 <br /> 153 150 <textarea rows="3" cols="40" style="width:100%" name="excerpt" tabindex="4" wrap="virtual" id="excerpt"><?php echo $excerpt ?></textarea></p> -
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 { -
trunk/wp-admin/wp-post.php
r546 r560 322 322 323 323 // pingWeblogs($blog_ID); 324 325 header ('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']); 324 $sendback = $HTTP_SERVER_VARS['HTTP_REFERER']; 325 if (strstr($sendback, 'wp-post')) $sendback = $siteurl .'/wp-admin/wp-post.php'; 326 header ('Location: ' . $sendback); 326 327 327 328 break; … … 576 577 $draft->post_title = stripslashes($draft->post_title); 577 578 if ($draft->post_title == '') 578 $draft->post_title = ' post-'.$draft->ID;579 $draft->post_title = 'Post #'.$draft->ID; 579 580 echo "<a href='wp-post.php?action=edit&post=$draft->ID' title='Edit this draft'>$draft->post_title</a>"; 580 581 ++$i;
Note: See TracChangeset
for help on using the changeset viewer.