Changeset 1747
- Timestamp:
- 10/05/2004 08:27:13 AM (20 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r1715 r1747 708 708 } 709 709 710 function parent_dropdown($parent = 0, $level = 0) { 711 global $wpdb; 712 $items = $wpdb->get_results("SELECT ID, post_parent, post_title FROM $wpdb->posts WHERE post_parent = $parent AND post_status = 'static' ORDER BY menu_order"); 713 if ($items) { 714 foreach ($items as $item) { 715 $pad = str_repeat(' ', $level * 3); 716 if ($item->ID == $current) 717 $current = ' selected="selected"'; 718 else 719 $current = ''; 720 721 echo "\n\t<option value='$item->ID'$current>$pad $item->post_title</a></option>"; 722 parent_dropdown($item->ID, $level + 1); 723 } 724 } else { 725 return false; 726 } 727 } 728 710 729 ?> -
trunk/wp-admin/edit-page-form.php
r1633 r1747 1 1 2 2 <div class="wrap"> 3 3 <h2><?php _e('New Page'); ?></h2> 4 4 <?php 5 5 if (0 == $post_ID) { … … 33 33 //--> 34 34 </script> 35 36 <div id="poststuff">37 35 <fieldset id="titlediv"> 38 <legend>< a href="http://wordpress.org/docs/reference/post/#title" title="<?php _e('Help on titles') ?>"><?php _e('Title') ?></a></legend>36 <legend><?php _e('Page Title') ?></legend> 39 37 <div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo $edited_post_title; ?>" id="title" /></div> 40 38 </fieldset> 41 42 <br /> 39 <fieldset id="commentstatusdiv"> 40 <legend><?php _e('Discussion') ?></legend> 41 <div><label for="comment_status" class="selectit"> 42 <input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($comment_status, 'open'); ?> /> 43 <?php _e('Allow Comments') ?></label> 44 <label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($ping_status, 'open'); ?> /> <?php _e('Allow Pings') ?></label> 45 </div> 46 </fieldset> 47 <fieldset id="postpassworddiv"> 48 <legend><?php _e('Page Password') ?></legend> 49 <div><input name="post_password" type="text" size="13" id="post_password" value="<?php echo $post_password ?>" /></div> 50 </fieldset> 51 <fieldset id="pageparent"> 52 <legend><?php _e('Page Parent') ?></a></legend> 53 <div><select name="parent_id"> 54 <option value='0'>Main Page (no parent)</option> 55 <?php parent_dropdown(); ?> 56 </select> 57 </div> 58 </fieldset> 43 59 <fieldset id="postdiv"> 44 <legend>< a href="http://wordpress.org/docs/reference/post/#post" title="<?php _e('Help with page field') ?>"><?php _e('Page') ?></a></legend>60 <legend><?php _e('Page Content') ?></legend> 45 61 <?php the_quicktags(); ?> 46 62 <?php … … 61 77 62 78 <p class="submit"> 63 <input name="savepage" type="submit" id="savepage" tabindex="6" style="font-weight: bold;" value="<?php _e('Save') ?>" />79 <input name="savepage" type="submit" id="savepage" tabindex="6" value="<?php _e('Create New Page') ?> »" /> 64 80 <input name="referredby" type="hidden" id="referredby" value="<?php if (isset($_SERVER['HTTP_REFERER'])) echo htmlspecialchars($_SERVER['HTTP_REFERER']); ?>" /> 65 81 </p> 66 82 <?php do_action('edit_page_form', ''); ?> 67 </div>68 83 </form> 69 84 -
trunk/wp-admin/edit-pages.php
r1551 r1747 9 9 ?> 10 10 11 <div class="wrap"> 12 <?php echo "<p> <a href='post.php?action=createpage' title='" . __('Create a new page') . "'>Create New Page</a></p>"; ?> 13 </div> 11 <div class="wrap"> 12 <h2><?php _e('Page Management'); ?></h2> 14 13 15 <div class="wrap">16 <form name="searchform" action="" method="get" style="float: left; width: 20em;">17 <fieldset>18 <legend><?php _e('Show Pages That Contain...') ?></legend>19 <input type="text" name="s" value="<?php if (isset($s)) echo $s; ?>" size="17" />20 <input type="submit" name="submit" value="<?php _e('Search') ?>" />21 </fieldset>22 </form>23 24 <br style="clear:both;" />25 26 <table width="100%" cellpadding="3" cellspacing="3">27 <tr>28 <th scope="col"><?php _e('ID') ?></th>29 <th scope="col"><?php _e('When') ?></th>30 <th scope="col"><?php _e('Title') ?></th>31 <th scope="col"><?php _e('Author') ?></th>32 <th scope="col"></th>33 <th scope="col"></th>34 <th scope="col"></th>35 </tr>36 14 <?php 37 38 include(ABSPATH.'wp-blog-header.php');39 40 15 if (isset($user_ID) && ('' != intval($user_ID))) { 41 16 $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_status = 'static' AND post_author = $user_ID"); … … 45 20 46 21 if ($posts) { 22 ?> 23 <table width="100%" cellpadding="3" cellspacing="3"> 24 <tr> 25 <th scope="col"><?php _e('ID') ?></th> 26 <th scope="col"><?php _e('Title') ?></th> 27 <th scope="col"><?php _e('Owner') ?></th> 28 <th scope="col"><?php _e('Updated') ?></th> 29 <th scope="col"></th> 30 <th scope="col"></th> 31 <th scope="col"></th> 32 </tr> 33 <?php 47 34 $bgcolor = ''; 48 foreach ($posts as $post) {start_wp();35 foreach ($posts as $post) : start_wp(); 49 36 $class = ('alternate' == $class) ? '' : 'alternate'; 50 37 ?> 51 38 <tr class='<?php echo $class; ?>'> 52 39 <th scope="row"><?php echo $id ?></th> 53 <td><?php the_time('Y-m-d \<\b\r \/\> g:i:s a'); ?></td>54 40 <td> 55 41 <?php the_title() ?> 56 42 </td> 57 <td><?php the_author() ?></td> 43 <td><?php the_author() ?></td> 44 <td><?php the_time('Y-m-d g:i a'); ?></td> 58 45 <td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit">View</a></td> 59 46 <td><?php if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) { echo "<a href='post.php?action=edit&post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td> 60 47 <td><?php if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) { echo "<a href='post.php?action=delete&post=$id' class='delete' onclick=\"return confirm('" . sprintf(__("You are about to delete this post \'%s\'\\n \'OK\' to delete, \'Cancel\' to stop."), the_title('','',0)) . "')\">" . __('Delete') . "</a>"; } ?></td> 61 48 </tr> 49 <?php endforeach; ?> 50 </table> 62 51 <?php 63 }64 52 } else { 65 53 ?> 66 <tr style='background-color: <?php echo $bgcolor; ?>'> 67 <td colspan="8"><?php _e('No pages found.') ?></td> 68 </tr> 54 <p><?php _e('No pages yet.') ?></p> 69 55 <?php 70 56 } // end if ($posts) 71 57 ?> 72 </table> 58 59 </div> 60 73 61 <?php 74 if ( 1 == count($posts) ) { 62 if ($user_level > 0) { 63 $action = 'post'; 64 get_currentuserinfo(); 65 //set defaults 66 $post_status = 'static'; 67 $comment_status = get_settings('default_comment_status'); 68 $ping_status = get_settings('default_ping_status'); 69 $post_pingback = get_settings('default_pingback_flag'); 75 70 76 $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id ORDER BY comment_date"); 77 if ($comments) { 78 ?> 79 <h3><?php _e('Comments') ?></h3> 80 <ol id="comments"> 81 <?php 82 foreach ($comments as $comment) { 83 $comment_status = wp_get_comment_status($comment->comment_ID); 84 ?> 71 include('edit-page-form.php'); 72 } 73 ?> 85 74 86 <li <?php if ("unapproved" == $comment_status) echo "class='unapproved'"; ?> > 87 <?php comment_date('Y-n-j') ?> 88 @ 89 <?php comment_time('g:m:s a') ?> 90 <?php 91 if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) { 92 echo "[ <a href=\"post.php?action=editcomment&comment=".$comment->comment_ID."\">" . __('Edit') . "</a>"; 93 echo " - <a href=\"post.php?action=deletecomment&p=".$post->ID."&comment=".$comment->comment_ID."\" onclick=\"return confirm('" . sprintf(__("You are about to delete this comment by \'%s\'\\n \'OK\' to delete, \'Cancel\' to stop."), $comment->comment_author) . "')\">" . __('Delete') . "</a> "; 94 if ( ('none' != $comment_status) && ($user_level >= 3) ) { 95 if ('approved' == wp_get_comment_status($comment->comment_ID)) { 96 echo " - <a href=\"post.php?action=unapprovecomment&p=".$post->ID."&comment=".$comment->comment_ID."\">" . __('Unapprove') . "</a> "; 97 } else { 98 echo " - <a href=\"post.php?action=approvecomment&p=".$post->ID."&comment=".$comment->comment_ID."\">" . __('Approve') . "</a> "; 99 } 100 } 101 echo "]"; 102 } // end if any comments to show 103 ?> 104 <br /> 105 <strong> 106 <?php comment_author() ?> 107 ( 108 <?php comment_author_email_link() ?> 109 / 110 <?php comment_author_url_link() ?> 111 )</strong> (IP: 112 <?php comment_author_IP() ?> 113 ) 114 <?php comment_text() ?> 115 116 </li> 117 <!-- /comment --> 118 <?php //end of the loop, don't delete 119 } // end foreach 120 echo '</ol>'; 121 }//end if comments 122 ?> 123 <?php } ?> 124 </div> 125 <?php 126 include('admin-footer.php'); 127 ?> 75 <?php include('admin-footer.php'); ?> -
trunk/wp-admin/post.php
r1688 r1747 692 692 do_action('edit_comment', $comment_ID); 693 693 break; 694 695 case 'createpage':696 $standalone = 0;697 $title = __('Create New Page');698 require_once ('./admin-header.php');699 700 if ($user_level > 0) {701 $action = 'post';702 get_currentuserinfo();703 //set defaults704 $post_status = 'static';705 $comment_status = get_settings('default_comment_status');706 $ping_status = get_settings('default_ping_status');707 $post_pingback = get_settings('default_pingback_flag');708 709 include('edit-page-form.php');710 } else {711 ?>712 <div class="wrap">713 <p><?php printf(__('Since you’re a newcomer, you’ll have to wait for an admin to raise your level to 1, in order to be authorized to post.<br />714 You can also <a href="mailto:%s?subject=Promotion?">e-mail the admin</a> to ask for a promotion.<br />715 When you’re promoted, just reload this page and you’ll be able to blog. :)'), get_settings('admin_email')); ?>716 </p>717 </div>718 <?php719 720 }721 722 break;723 694 724 695 default: -
trunk/wp-admin/upgrade-schema.php
r1737 r1747 118 118 post_parent int(11) NOT NULL default '0', 119 119 guid varchar(255) NOT NULL default '', 120 menu_order int(11) NOT NULL default '0', 120 121 PRIMARY KEY (ID), 121 KEY post_date_gmt (post_date_gmt),122 122 KEY post_name (post_name), 123 KEY post_status (post_status)124 123 ); 125 124 CREATE TABLE $wpdb->users ( -
trunk/wp-admin/wp-admin.css
r1744 r1747 48 48 fieldset { 49 49 border: 1px solid #ddd; 50 padding: 2px; 50 padding: 3px; 51 -moz-border-radius: 5px; 51 52 } 52 53 … … 468 469 } 469 470 470 #titlediv, #poststatusdiv, #commentstatusdiv, #slugdiv, #postpassworddiv, #namediv, #uridiv, #emaildiv {471 #titlediv, #poststatusdiv, #commentstatusdiv, #slugdiv, #postpassworddiv, #namediv, #uridiv, #emaildiv, #pageparent { 471 472 float: left; 472 473 height: 6em; -
trunk/wp-includes/version.php
r1600 r1747 3 3 // This just holds the version number, in a separate file so we can bump it without cluttering the CVS 4 4 5 $wp_version = '1.3-alpha- 3';5 $wp_version = '1.3-alpha-4'; 6 6 7 7 ?>
Note: See TracChangeset
for help on using the changeset viewer.