[wp-cvs] wordpress/wp-admin admin-functions.php, 1.44,
1.45 edit-page-form.php, 1.4, 1.5 edit-pages.php, 1.2,
1.3 post.php, 1.85, 1.86 upgrade-schema.php, 1.9,
1.10 wp-admin.css, 1.67, 1.68
Matthew Mullenweg
saxmatt at users.sourceforge.net
Tue Oct 5 08:27:15 UTC 2004
Update of /cvsroot/cafelog/wordpress/wp-admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21966/wp-admin
Modified Files:
admin-functions.php edit-page-form.php edit-pages.php post.php
upgrade-schema.php wp-admin.css
Log Message:
Pages update and tweaks.
Index: wp-admin.css
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/wp-admin.css,v
retrieving revision 1.67
retrieving revision 1.68
diff -C2 -d -r1.67 -r1.68
*** wp-admin.css 5 Oct 2004 07:13:51 -0000 1.67
--- wp-admin.css 5 Oct 2004 08:27:13 -0000 1.68
***************
*** 48,52 ****
fieldset {
border: 1px solid #ddd;
! padding: 2px;
}
--- 48,53 ----
fieldset {
border: 1px solid #ddd;
! padding: 3px;
! -moz-border-radius: 5px;
}
***************
*** 468,472 ****
}
! #titlediv, #poststatusdiv, #commentstatusdiv, #slugdiv, #postpassworddiv, #namediv, #uridiv, #emaildiv {
float: left;
height: 6em;
--- 469,473 ----
}
! #titlediv, #poststatusdiv, #commentstatusdiv, #slugdiv, #postpassworddiv, #namediv, #uridiv, #emaildiv, #pageparent {
float: left;
height: 6em;
Index: edit-page-form.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/edit-page-form.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** edit-page-form.php 10 Sep 2004 01:32:20 -0000 1.4
--- edit-page-form.php 5 Oct 2004 08:27:13 -0000 1.5
***************
*** 1,5 ****
<div class="wrap">
!
<?php
if (0 == $post_ID) {
--- 1,5 ----
<div class="wrap">
! <h2><?php _e('New Page'); ?></h2>
<?php
if (0 == $post_ID) {
***************
*** 33,46 ****
//-->
</script>
-
- <div id="poststuff">
<fieldset id="titlediv">
! <legend><a href="http://wordpress.org/docs/reference/post/#title" title="<?php _e('Help on titles') ?>"><?php _e('Title') ?></a></legend>
<div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo $edited_post_title; ?>" id="title" /></div>
</fieldset>
!
! <br />
<fieldset id="postdiv">
! <legend><a href="http://wordpress.org/docs/reference/post/#post" title="<?php _e('Help with page field') ?>"><?php _e('Page') ?></a></legend>
<?php the_quicktags(); ?>
<?php
--- 33,62 ----
//-->
</script>
<fieldset id="titlediv">
! <legend><?php _e('Page Title') ?></legend>
<div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo $edited_post_title; ?>" id="title" /></div>
</fieldset>
! <fieldset id="commentstatusdiv">
! <legend><?php _e('Discussion') ?></legend>
! <div><label for="comment_status" class="selectit">
! <input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($comment_status, 'open'); ?> />
! <?php _e('Allow Comments') ?></label>
! <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>
! </div>
! </fieldset>
! <fieldset id="postpassworddiv">
! <legend><?php _e('Page Password') ?></legend>
! <div><input name="post_password" type="text" size="13" id="post_password" value="<?php echo $post_password ?>" /></div>
! </fieldset>
! <fieldset id="pageparent">
! <legend><?php _e('Page Parent') ?></a></legend>
! <div><select name="parent_id">
! <option value='0'>Main Page (no parent)</option>
! <?php parent_dropdown(); ?>
! </select>
! </div>
! </fieldset>
<fieldset id="postdiv">
! <legend><?php _e('Page Content') ?></legend>
<?php the_quicktags(); ?>
<?php
***************
*** 61,69 ****
<p class="submit">
! <input name="savepage" type="submit" id="savepage" tabindex="6" style="font-weight: bold;" value="<?php _e('Save') ?>" />
<input name="referredby" type="hidden" id="referredby" value="<?php if (isset($_SERVER['HTTP_REFERER'])) echo htmlspecialchars($_SERVER['HTTP_REFERER']); ?>" />
</p>
<?php do_action('edit_page_form', ''); ?>
- </div>
</form>
--- 77,84 ----
<p class="submit">
! <input name="savepage" type="submit" id="savepage" tabindex="6" value="<?php _e('Create New Page') ?> »" />
<input name="referredby" type="hidden" id="referredby" value="<?php if (isset($_SERVER['HTTP_REFERER'])) echo htmlspecialchars($_SERVER['HTTP_REFERER']); ?>" />
</p>
<?php do_action('edit_page_form', ''); ?>
</form>
Index: admin-functions.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/admin-functions.php,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** admin-functions.php 27 Sep 2004 02:32:51 -0000 1.44
--- admin-functions.php 5 Oct 2004 08:27:12 -0000 1.45
***************
*** 708,710 ****
--- 708,729 ----
}
+ function parent_dropdown($parent = 0, $level = 0) {
+ global $wpdb;
+ $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");
+ if ($items) {
+ foreach ($items as $item) {
+ $pad = str_repeat(' ', $level * 3);
+ if ($item->ID == $current)
+ $current = ' selected="selected"';
+ else
+ $current = '';
+
+ echo "\n\t<option value='$item->ID'$current>$pad $item->post_title</a></option>";
+ parent_dropdown($item->ID, $level + 1);
+ }
+ } else {
+ return false;
+ }
+ }
+
?>
\ No newline at end of file
Index: upgrade-schema.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/upgrade-schema.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** upgrade-schema.php 4 Oct 2004 08:49:45 -0000 1.9
--- upgrade-schema.php 5 Oct 2004 08:27:13 -0000 1.10
***************
*** 118,125 ****
post_parent int(11) NOT NULL default '0',
guid varchar(255) NOT NULL default '',
PRIMARY KEY (ID),
- KEY post_date_gmt (post_date_gmt),
KEY post_name (post_name),
- KEY post_status (post_status)
);
CREATE TABLE $wpdb->users (
--- 118,124 ----
post_parent int(11) NOT NULL default '0',
guid varchar(255) NOT NULL default '',
+ menu_order int(11) NOT NULL default '0',
PRIMARY KEY (ID),
KEY post_name (post_name),
);
CREATE TABLE $wpdb->users (
Index: edit-pages.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/edit-pages.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** edit-pages.php 22 Aug 2004 23:24:50 -0000 1.2
--- edit-pages.php 5 Oct 2004 08:27:13 -0000 1.3
***************
*** 9,33 ****
?>
! <div class="wrap">
! <?php echo "<p> <a href='post.php?action=createpage' title='" . __('Create a new page') . "'>Create New Page</a></p>"; ?>
! </div>
!
! <div class="wrap">
! <form name="searchform" action="" method="get" style="float: left; width: 20em;">
! <fieldset>
! <legend><?php _e('Show Pages That Contain...') ?></legend>
! <input type="text" name="s" value="<?php if (isset($s)) echo $s; ?>" size="17" />
! <input type="submit" name="submit" value="<?php _e('Search') ?>" />
! </fieldset>
! </form>
! <br style="clear:both;" />
<table width="100%" cellpadding="3" cellspacing="3">
<tr>
<th scope="col"><?php _e('ID') ?></th>
- <th scope="col"><?php _e('When') ?></th>
<th scope="col"><?php _e('Title') ?></th>
! <th scope="col"><?php _e('Author') ?></th>
<th scope="col"></th>
<th scope="col"></th>
--- 9,30 ----
?>
! <div class="wrap">
! <h2><?php _e('Page Management'); ?></h2>
! <?php
! if (isset($user_ID) && ('' != intval($user_ID))) {
! $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_status = 'static' AND post_author = $user_ID");
! } else {
! $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_status = 'static'");
! }
+ if ($posts) {
+ ?>
<table width="100%" cellpadding="3" cellspacing="3">
<tr>
<th scope="col"><?php _e('ID') ?></th>
<th scope="col"><?php _e('Title') ?></th>
! <th scope="col"><?php _e('Owner') ?></th>
! <th scope="col"><?php _e('Updated') ?></th>
<th scope="col"></th>
<th scope="col"></th>
***************
*** 35,127 ****
</tr>
<?php
-
- include(ABSPATH.'wp-blog-header.php');
-
- if (isset($user_ID) && ('' != intval($user_ID))) {
- $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_status = 'static' AND post_author = $user_ID");
- } else {
- $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_status = 'static'");
- }
-
- if ($posts) {
$bgcolor = '';
! foreach ($posts as $post) { start_wp();
$class = ('alternate' == $class) ? '' : 'alternate';
?>
<tr class='<?php echo $class; ?>'>
<th scope="row"><?php echo $id ?></th>
- <td><?php the_time('Y-m-d \<\b\r \/\> g:i:s a'); ?></td>
<td>
<?php the_title() ?>
</td>
! <td><?php the_author() ?></td>
<td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit">View</a></td>
<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>
<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>
</tr>
<?php
- }
} else {
?>
! <tr style='background-color: <?php echo $bgcolor; ?>'>
! <td colspan="8"><?php _e('No pages found.') ?></td>
! </tr>
<?php
} // end if ($posts)
?>
- </table>
- <?php
- if ( 1 == count($posts) ) {
! $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id ORDER BY comment_date");
! if ($comments) {
! ?>
! <h3><?php _e('Comments') ?></h3>
! <ol id="comments">
<?php
! foreach ($comments as $comment) {
! $comment_status = wp_get_comment_status($comment->comment_ID);
! ?>
! <li <?php if ("unapproved" == $comment_status) echo "class='unapproved'"; ?> >
! <?php comment_date('Y-n-j') ?>
! @
! <?php comment_time('g:m:s a') ?>
! <?php
! if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) {
! echo "[ <a href=\"post.php?action=editcomment&comment=".$comment->comment_ID."\">" . __('Edit') . "</a>";
! 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> ";
! if ( ('none' != $comment_status) && ($user_level >= 3) ) {
! if ('approved' == wp_get_comment_status($comment->comment_ID)) {
! echo " - <a href=\"post.php?action=unapprovecomment&p=".$post->ID."&comment=".$comment->comment_ID."\">" . __('Unapprove') . "</a> ";
! } else {
! echo " - <a href=\"post.php?action=approvecomment&p=".$post->ID."&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() ?>
! </li>
! <!-- /comment -->
! <?php //end of the loop, don't delete
! } // end foreach
! echo '</ol>';
! }//end if comments
! ?>
! <?php } ?>
! </div>
! <?php
! include('admin-footer.php');
! ?>
--- 32,75 ----
</tr>
<?php
$bgcolor = '';
! foreach ($posts as $post) : start_wp();
$class = ('alternate' == $class) ? '' : 'alternate';
?>
<tr class='<?php echo $class; ?>'>
<th scope="row"><?php echo $id ?></th>
<td>
<?php the_title() ?>
</td>
! <td><?php the_author() ?></td>
! <td><?php the_time('Y-m-d g:i a'); ?></td>
<td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit">View</a></td>
<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>
<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>
</tr>
+ <?php endforeach; ?>
+ </table>
<?php
} else {
?>
! <p><?php _e('No pages yet.') ?></p>
<?php
} // end if ($posts)
?>
! </div>
!
<?php
! if ($user_level > 0) {
! $action = 'post';
! get_currentuserinfo();
! //set defaults
! $post_status = 'static';
! $comment_status = get_settings('default_comment_status');
! $ping_status = get_settings('default_ping_status');
! $post_pingback = get_settings('default_pingback_flag');
! include('edit-page-form.php');
! }
! ?>
! <?php include('admin-footer.php'); ?>
\ No newline at end of file
Index: post.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/post.php,v
retrieving revision 1.85
retrieving revision 1.86
diff -C2 -d -r1.85 -r1.86
*** post.php 18 Sep 2004 05:38:47 -0000 1.85
--- post.php 5 Oct 2004 08:27:13 -0000 1.86
***************
*** 693,725 ****
break;
- case 'createpage':
- $standalone = 0;
- $title = __('Create New Page');
- require_once ('./admin-header.php');
-
- if ($user_level > 0) {
- $action = 'post';
- get_currentuserinfo();
- //set defaults
- $post_status = 'static';
- $comment_status = get_settings('default_comment_status');
- $ping_status = get_settings('default_ping_status');
- $post_pingback = get_settings('default_pingback_flag');
-
- include('edit-page-form.php');
- } else {
- ?>
- <div class="wrap">
- <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 />
- You can also <a href="mailto:%s?subject=Promotion?">e-mail the admin</a> to ask for a promotion.<br />
- When you’re promoted, just reload this page and you’ll be able to blog. :)'), get_settings('admin_email')); ?>
- </p>
- </div>
- <?php
-
- }
-
- break;
-
default:
$standalone = 0;
--- 693,696 ----
More information about the cvs
mailing list