Changeset 658
- Timestamp:
- 12/28/2003 11:44:05 AM (22 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 added
- 4 edited
-
edit-form-advanced.php (added)
-
edit-form-comment.php (added)
-
edit-form.php (modified) (6 diffs)
-
link-manager.php (modified) (7 diffs)
-
post.php (modified) (6 diffs)
-
wp-admin.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form.php
r639 r658 13 13 } 14 14 15 switch($action) { 16 case 'post': 17 $submitbutton_text = 'Blog this!'; 18 $toprow_title = 'New Post'; 19 $form_action = 'post'; 20 $form_extra = ''; 21 if ($use_pingback) { 22 $form_pingback = '<input type="checkbox" class="checkbox" name="post_pingback" value="1" '; 23 if ($post_pingback) $form_pingback .= 'checked="checked" '; 24 $form_pingback .= 'tabindex="7" id="pingback" /> <label for="pingback"><strong>PingBack</strong> the <acronym title="Uniform Resource Locators">URL</acronym>s in this post</label> <a href="http://wordpress.org/docs/reference/post/#pingback" title="Help on Pingbacks">?</a><br />'; 25 } else { 26 $form_pingback = ''; 15 $submitbutton_text = 'Blog this!'; 16 $toprow_title = 'New Post'; 17 $form_action = 'post'; 18 $form_extra = ''; 19 if ($use_pingback) { 20 $form_pingback = '<input type="checkbox" class="checkbox" name="post_pingback" value="1" '; 21 if ($post_pingback) $form_pingback .= 'checked="checked" '; 22 $form_pingback .= 'tabindex="7" id="pingback" /> <label for="pingback"><strong>PingBack</strong> the <acronym title="Uniform Resource Locators">URL</acronym>s in this post</label> <a href="http://wordpress.org/docs/reference/post/#pingback" title="Help on Pingbacks">?</a><br />'; 23 } else { 24 $form_pingback = ''; 25 } 26 if ($use_trackback) { 27 $form_trackback = '<p><label for="trackback"><a href="http://wordpress.org/docs/reference/post/#trackback" title="Help on trackbacks"><strong>TrackBack</strong> an <acronym title="Uniform Resource Locator">URL</acronym></a>:</label> (Separate multiple <acronym title="Uniform Resource Locator">URL</acronym>s with spaces.)<br /> 28 <input type="text" name="trackback_url" style="width: 415px" id="trackback" tabindex="7" /></p>'; 29 if ('' != $pinged) { 30 $form_trackback .= '<p>Already pinged:</p><ul>'; 31 $already_pinged = explode("\n", trim($pinged)); 32 foreach ($already_pinged as $pinged_url) { 33 $form_trackback .= "\n\t<li>$pinged_url</li>"; 27 34 } 28 if ($use_trackback) { 29 $form_trackback = '<p><label for="trackback"><a href="http://wordpress.org/docs/reference/post/#trackback" title="Help on trackbacks"><strong>TrackBack</strong> an <acronym title="Uniform Resource Locator">URL</acronym></a>:</label> (Separate multiple <acronym title="Uniform Resource Locator">URL</acronym>s with spaces.)<br /> 30 <input type="text" name="trackback_url" style="width: 415px" id="trackback" tabindex="7" /></p>'; 31 if ('' != $pinged) { 32 $form_trackback .= '<p>Already pinged:</p><ul>'; 33 $already_pinged = explode("\n", trim($pinged)); 34 foreach ($already_pinged as $pinged_url) { 35 $form_trackback .= "\n\t<li>$pinged_url</li>"; 36 } 37 $form_trackback .= '</ul>'; 38 } 39 } else { 40 $form_trackback = ''; 41 } 42 $colspan = 3; 43 $saveasdraft = '<input name="save" type="submit" id="save" tabindex="6" value="Save and Continue Editing" />'; 44 break; 45 case "edit": 46 $submitbutton_text = 'Edit this!'; 47 $toprow_title = 'Editing Post #' . $postdata['ID']; 48 $form_action = 'editpost'; 49 $form_extra = "' />\n<input type='hidden' name='post_ID' value='$post->ID"; 50 $colspan = 2; 51 $form_pingback = '<input type="hidden" name="post_pingback" value="0" />'; 52 $form_prevstatus = '<input type="hidden" name="prev_status" value="'.$post_status.'" />'; 53 if ($use_trackback) { 54 $form_trackback = '<p><label for="trackback"><a href="http://wordpress.org/docs/reference/post/#trackback" title="Help on trackbacks"><strong>TrackBack</strong> an <acronym title="Uniform Resource Locator">URL</acronym></a></label> 55 (Separate multiple <acronym title="Uniform Resource Locator">URL</acronym>s with spaces.)<br /> 56 <input type="text" name="trackback_url" style="width: 415px" id="trackback" tabindex="7" value="'. str_replace("\n", ' ', $to_ping) .'" /></p>'; 57 if ('' != $pinged) { 58 $form_trackback .= '<p>Already pinged:</p><ul>'; 59 $already_pinged = explode("\n", trim($pinged)); 60 foreach ($already_pinged as $pinged_url) { 61 $form_trackback .= "\n\t<li>$pinged_url</li>"; 62 } 63 $form_trackback .= '</ul>'; 64 } 65 } else { 66 $form_trackback = ''; 67 } 68 $saveasdraft = '<input name="save" type="submit" id="save" tabindex="6" value="Save and Continue Editing" />'; 69 break; 70 case "editcomment": 71 $submitbutton_text = 'Edit this!'; 72 $toprow_title = 'Editing Comment # '.$commentdata['comment_ID']; 73 $form_action = 'editedcomment'; 74 $form_extra = "' />\n<input type='hidden' name='comment_ID' value='$comment' />\n<input type='hidden' name='comment_post_ID' value='".$commentdata["comment_post_ID"]; 75 $colspan = 3; 76 $form_pingback = '<input type="hidden" name="post_pingback" value="0" />'; 77 $form_trackback = ''; 78 break; 35 $form_trackback .= '</ul>'; 36 } 37 } else { 38 $form_trackback = ''; 79 39 } 40 $colspan = 3; 41 $saveasdraft = ''; 42 80 43 81 44 ?> … … 85 48 <input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' /> 86 49 87 <?php if ($action != 'editcomment') {88 // this is for everything but comment editing89 ?>90 50 <script type="text/javascript"> 91 51 <!-- … … 97 57 //--> 98 58 </script> 99 59 <style media="screen" type="text/css"> 60 #titlediv, #postpassworddiv { 61 height: 3.5em; 62 } 63 </style> 100 64 <div id="poststuff"> 101 65 <fieldset id="titlediv"> … … 108 72 <div><?php dropdown_categories($default_post_cat); ?></div> 109 73 </fieldset> 110 111 <fieldset id="poststatusdiv">112 <legend><a href="http://wordpress.org/docs/reference/post/#post_status" title="Help on post status">Post Status</a></legend>113 <div><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>114 <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>115 <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></div>116 </fieldset>117 <fieldset id="commentstatusdiv">118 <legend><a href="http://wordpress.org/docs/reference/post/#comments" title="Help on comment status">Comments</a></legend>119 <div><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>120 <label for="comment_status_closed" class="selectit"><input id="comment_status_closed" name="comment_status" type="radio" value="closed" <?php checked($comment_status, 'closed'); ?> /> Closed</label></div>121 </fieldset>122 <fieldset id="pingstatusdiv">123 <legend><a href="http://wordpress.org/docs/reference/post/#pings" title="Help on ping status">Pings</a></legend>124 <div><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>125 <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></div>126 </fieldset>127 74 <fieldset id="postpassworddiv"> 128 75 <legend><a href="http://wordpress.org/docs/reference/post/#post_password" title="Help on post password">Post Password</a></legend> 129 <div><input name="post_password" type="text" size="18" id="post_password" value="<?php echo $post_password ?>" /></div>76 <div><input name="post_password" type="text" size="18" tabindex="3" id="post_password" value="<?php echo $post_password ?>" /></div> 130 77 </fieldset> 131 78 132 <?php133 } else {134 135 // this is for comment editing136 ?>137 <script type="text/javascript">138 function focusit() {139 // focus on first input field140 document.post.name.focus();141 }142 window.onload = focusit;143 </script>144 <table>145 <tr>146 <td>147 <label for="name">Name:</label><br />148 <input type="text" name="newcomment_author" size="22" value="<?php echo format_to_edit($commentdata['comment_author']) ?>" tabindex="1" id="name" /></td>149 <td>150 <label for="email">E-mail:</label><br />151 <input type="text" name="newcomment_author_email" size="30" value="<?php echo format_to_edit($commentdata['comment_author_email']) ?>" tabindex="2" id="email" />152 </td>153 <td>154 <label for="URL">URL:</label><br />155 <input type="text" name="newcomment_author_url" size="35" value="<?php echo format_to_edit($commentdata['comment_author_url']) ?>" tabindex="3" id="URL" />156 </td>157 </tr>158 </table>159 <?php160 161 } // end else comment editing162 163 ?>164 165 <?php166 if ($action != 'editcomment') {167 ?>168 79 <br /> 169 80 <fieldset style="clear:both"> 170 <legend><a href="http://wordpress.org/docs/reference/post/#excerpt" title="Help with excerpts">Excerpt</a></legend> 171 <div><textarea rows="2" cols="40" name="excerpt" tabindex="4" id="excerpt"><?php echo $excerpt ?></textarea></div> 172 </fieldset> 173 <?php 174 } // if not a comment 175 ?> 176 <fieldset> 177 <?php 178 if ($action != 'editcomment') { 179 echo '<legend><a href="http://wordpress.org/docs/reference/post/#post" title="Help with post field">Post</a></legend>'; 180 } else { 181 echo '<legend>Comment</legend>'; 182 } 183 ?> 81 <legend><a href="http://wordpress.org/docs/reference/post/#post" title="Help with post field">Post</a></legend> 184 82 <div id="quicktags"> 185 83 <?php … … 207 105 //--> 208 106 </script> 209 <?php 210 } 211 if ($action != 'editcomment') { 212 if (get_settings('use_geo_positions')) { 213 if (empty($edited_lat)) { 214 if (get_settings('use_default_geourl')) { 215 $edited_lat = get_settings('default_geourl_lat'); 216 $edited_lon = get_settings('default_geourl_lon'); 217 } 218 } 219 ?> 220 <label for="post_latf">Latitude:</label><input size="8" type="text" value="<?php echo $edited_lat; ?>" name="post_latf"> 221 <label for="post_lonf">Longitude:</label><input size="8" type="text" value="<?php echo $edited_lon; ?>" name="post_lonf"> <a href="http://www.geourl.org/resources.html" rel="external" >click for Geo Info</a> 222 <br> 223 <?php 224 } 225 } 226 ?> 107 <?php } ?> 227 108 228 109 <?php echo $form_pingback ?> 229 110 <?php echo $form_prevstatus ?> 230 111 231 <p><?php echo $saveasdraft; ?> <input type="submit" name="submit" value="<?php echo $submitbutton_text ?>" style="font-weight: bold;" tabindex="6" /> 112 <p><input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" value="Save as Draft" /> 113 <input name="saveasprivate" type="submit" id="saveasprivate" tabindex="10" value="Save as Private" /> 114 <input name="publish" type="submit" id="publish" tabindex="6" style="font-weight: bold;" value="Publish" /> 115 <input name="advanced" type="submit" id="advancededit" tabindex="7" value="Advanced Editing »" /> 232 116 <input name="referredby" type="hidden" id="referredby" value="<?php echo $HTTP_SERVER_VARS['HTTP_REFERER']; ?>" /> 233 117 </p> … … 235 119 236 120 <?php 237 if ($action != 'editcomment') {238 if ( ($use_fileupload) && ($user_level >= $fileupload_minlevel)239 && (in_array($user_login, $allowed_users) || (trim($fileupload_allowedusers)=="")) ) { ?>240 <input type="button" value="upload a file/image" onclick="launchupload();" class="search" tabindex="10" />241 <?php }242 }243 121 244 122 echo $form_trackback; 245 246 // if the level is 5+, allow user to edit the timestamp - not on 'new post' screen though247 // if (($user_level > 4) && ($action != "post"))248 if ($user_level > 4) {249 touch_time(($action == 'edit'));250 }251 if ('edit' == $action) echo "252 <p><a href='post.php?action=delete&post=$post->ID' onclick=\"return confirm('You are about to delete this post \'".addslashes($edited_post_title)."\'\\n \'Cancel\' to stop, \'OK\' to delete.')\">Delete this post</a></p>";253 123 ?> 254 124 -
trunk/wp-admin/link-manager.php
r656 r658 341 341 echo(' <option value="'.$r.'" '); 342 342 if ($link_rating == $r) 343 echo ('selected');343 echo 'selected="selected"'; 344 344 echo('>'.$r.'</option>'); 345 345 } … … 469 469 </ul> 470 470 <div class="wrap"> 471 <form name="cats" method="post" >471 <form name="cats" method="post" action=""> 472 472 <table width="75%" cellpadding="3" cellspacing="3"> 473 473 <tr> … … 487 487 echo " <option value=\"All\""; 488 488 if ($cat_id == 'All') 489 echo " selected ";489 echo " selected='selected'"; 490 490 echo "> All</option>\n"; 491 491 foreach ($results as $row) { 492 492 echo " <option value=\"".$row->cat_id."\""; 493 493 if ($row->cat_id == $cat_id) 494 echo " selected ";494 echo " selected='selected'"; 495 495 echo ">".$row->cat_id.": ".$row->cat_name; 496 496 if ($row->auto_toggle == 'Y') … … 503 503 <td> 504 504 <select name="order_by"> 505 <option value="order_id" <?php if ($order_by == 'order_id') echo " selected ";?>>Id</option>506 <option value="order_name" <?php if ($order_by == 'order_name') echo " selected ";?>>Name</option>507 <option value="order_url" <?php if ($order_by == 'order_url') echo " selected ";?>>URL</option>508 <option value="order_desc" <?php if ($order_by == 'order_desc') echo " selected ";?>>Description</option>509 <option value="order_owner" <?php if ($order_by == 'order_owner') echo " selected ";?>>Owner</option>510 <option value="order_rating" <?php if ($order_by == 'order_rating') echo " selected ";?>>Rating</option>505 <option value="order_id" <?php if ($order_by == 'order_id') echo " selected='selected'";?>>Link ID</option> 506 <option value="order_name" <?php if ($order_by == 'order_name') echo " selected='selected'";?>>Name</option> 507 <option value="order_url" <?php if ($order_by == 'order_url') echo " selected='selected'";?>>URI</option> 508 <option value="order_desc" <?php if ($order_by == 'order_desc') echo " selected='selected'";?>>Description</option> 509 <option value="order_owner" <?php if ($order_by == 'order_owner') echo " selected='selected'";?>>Owner</option> 510 <option value="order_rating" <?php if ($order_by == 'order_rating') echo " selected='selected'";?>>Rating</option> 511 511 </select> 512 512 </td> … … 522 522 <div class="wrap"> 523 523 524 <form name="links" id="links" method="post" >524 <form name="links" id="links" method="post" action=""> 525 525 <input type="hidden" name="link_id" value="" /> 526 526 <input type="hidden" name="action" value="" /> … … 592 592 <td><a href="link-manager.php?link_id=$link->link_id&action=linkedit" class="edit">Edit</a></td> 593 593 <td><a href="link-manager.php?link_id=$link->link_id&action=Delete" onclick="return confirm('You are about to delete this link.\\n \'Cancel\' to stop, \'OK\' to delete.');" class="delete">Delete</a></td> 594 <td><input type="checkbox" name="linkcheck[]" value="$link->link_id" />< td>594 <td><input type="checkbox" name="linkcheck[]" value="$link->link_id" /></td> 595 595 LINKS; 596 596 } else { … … 635 635 </tr> 636 636 </table> 637 </form> 637 638 638 <?php 639 639 } // end if !popup 640 640 ?> 641 </form> 641 642 </div> 642 643 -
trunk/wp-admin/post.php
r639 r658 85 85 $now = date('Y-m-d H:i:s', (time() + ($time_difference * 3600))); 86 86 } 87 88 if ('' != $HTTP_POST_VARS['save']) $post_status = 'draft'; 87 88 if (!empty($HTTP_POST_VARS['mode'])) { 89 switch($HTTP_POST_VARS['mode']) { 90 case 'bookmarklet': 91 $location = 'bookmarklet.php?a=b'; 92 break; 93 case 'sidebar': 94 $location = 'sidebar.php?a=b'; 95 break; 96 default: 97 $location = 'post.php'; 98 break; 99 } 100 } else { 101 $location = 'post.php'; 102 } 103 104 // What to do based on which button they pressed 105 if ('' != $HTTP_POST_VARS['saveasdraft']) $post_status = 'draft'; 106 if ('' != $HTTP_POST_VARS['saveasprivate']) $post_status = 'private'; 107 if ('' != $HTTP_POST_VARS['publish']) $post_status = 'publish'; 108 if ('' != $HTTP_POST_VARS['advanced']) $post_status = 'draft'; 109 89 110 90 111 if((get_settings('use_geo_positions')) && (strlen($latstr) > 2) && (strlen($lonstr) > 2) ) { … … 106 127 $post_ID = $wpdb->get_var("SELECT ID FROM $tableposts ORDER BY ID DESC LIMIT 1"); 107 128 129 if ('' != $HTTP_POST_VARS['advanced']) 130 $location = "post.php?action=edit&post=$post_ID"; 131 132 108 133 // Insert categories 109 134 // Check to make sure there is a category, if not just set it to some default … … 127 152 } 128 153 129 if (!empty($HTTP_POST_VARS['mode'])) {130 switch($HTTP_POST_VARS['mode']) {131 case 'bookmarklet':132 $location = 'bookmarklet.php?a=b';133 break;134 case 'sidebar':135 $location = 'sidebar.php?a=b';136 break;137 default:138 $location = 'post.php';139 break;140 }141 } else {142 $location = 'post.php';143 }144 145 if ('' != $HTTP_POST_VARS['save']) $location = "post.php?action=edit&post=$post_ID";146 154 147 155 header("Location: $location"); … … 210 218 $pinged = $postdata['pinged']; 211 219 212 include('edit-form .php');220 include('edit-form-advanced.php'); 213 221 } else { 214 222 ?> … … 262 270 // Format trackbacks 263 271 $trackback = preg_replace('|\s+|', '\n', $trackback); 272 273 if ('' != $HTTP_POST_VARS['publish']) $post_status = 'publish'; 264 274 265 275 if (($user_level > 4) && (!empty($HTTP_POST_VARS['edit_date']))) { … … 408 418 $content = format_to_edit($content); 409 419 410 include('edit-form .php');420 include('edit-form-comment.php'); 411 421 412 422 break; -
trunk/wp-admin/wp-admin.css
r654 r658 302 302 } 303 303 304 #titlediv, #poststatusdiv, #commentstatusdiv, #pingstatusdiv, #postpassworddiv {304 #titlediv, #poststatusdiv, #commentstatusdiv, #pingstatusdiv, #postpassworddiv, #namediv, #uridiv, #emaildiv { 305 305 float: left; 306 306 height: 6em;
Note: See TracChangeset
for help on using the changeset viewer.