From 5cc3f8d3e10efd4eef85a6dfd12fa644fe12481c Mon Sep 17 00:00:00 2001 From: saxmatt Date: Mon, 19 Apr 2004 08:09:27 +0000 Subject: [PATCH] Massive admin tweak commit. Improved consistency, numerous bug fixes, redesigned link forms, tweaked options more, left the ugly grey bar I didn't mean to add in the first place but tweaked it too. git-svn-id: http://svn.automattic.com/wordpress/trunk@1100 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-functions.php | 4 + wp-admin/admin-header.php | 2 + wp-admin/edit-comments.php | 6 +- wp-admin/edit-form-comment.php | 6 +- wp-admin/install.php | 2 +- wp-admin/link-add.php | 41 ++-- wp-admin/link-categories.php | 356 +++++++++++++++++--------------- wp-admin/link-manager.php | 152 +++++++------- wp-admin/menu.php | 4 +- wp-admin/options-discussion.php | 1 + wp-admin/options-head.php | 1 + wp-admin/options-misc.php | 1 + wp-admin/options-permalink.php | 6 +- wp-admin/options-reading.php | 1 + wp-admin/options-writing.php | 1 + wp-admin/options.php | 1 + wp-admin/profile.php | 2 +- wp-admin/templates.php | 8 +- wp-admin/wp-admin.css | 1 + 19 files changed, 321 insertions(+), 275 deletions(-) diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index cd09b7f553..face7ab3c7 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -1,5 +1,9 @@ + +

WordPress

diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index 8525173f1f..115784dcae 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -113,9 +113,7 @@ if ('view' == $mode) { Email IP Comment Excerpt - View - Edit - Delete + Actions '; foreach ($comments as $comment) { $authordata = get_userdata($wpdb->get_var("SELECT post_author FROM $tableposts WHERE ID = $comment->comment_post_ID")); @@ -123,7 +121,7 @@ if ('view' == $mode) { ?> $authordata->user_level) or ($user_login == $authordata->user_login)) { ?> - + diff --git a/wp-admin/edit-form-comment.php b/wp-admin/edit-form-comment.php index fc60a38a4d..78e51d5458 100644 --- a/wp-admin/edit-form-comment.php +++ b/wp-admin/edit-form-comment.php @@ -2,7 +2,7 @@ $allowed_users = explode(" ", trim(get_settings('fileupload_allowedusers'))); -$submitbutton_text = 'Edit this!'; +$submitbutton_text = 'Edit Comment »'; $toprow_title = 'Editing Comment # '.$commentdata['comment_ID']; $form_action = 'editedcomment'; $form_extra = "' />\n\n -

+

@@ -86,5 +86,5 @@ if ($user_level > 4) { ?> -

Delete this comment.

+

Delete comment

diff --git a/wp-admin/install.php b/wp-admin/install.php index 6fd3bb4f09..1e06b9717e 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -440,7 +440,7 @@ $option_data = array( "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(31,'use_fileupload', 2, '0', 'set this to false to disable file upload, or true to enable it', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(32,'fileupload_realpath', 3, '/home/your/site/wordpress/images', 'enter the real path of the directory where you\'ll upload the pictures \nif you\'re unsure about what your real path is, please ask your host\'s support staff \nnote that the directory must be writable by the webserver (chmod 766) \nnote for windows-servers users: use forwardslashes instead of backslashes', 8, 40)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(33,'fileupload_url', 3, 'http://example.com/images', 'enter the URL of that directory (it\'s used to generate the links to the uploded files)', 8, 40)", -"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(34,'fileupload_allowedtypes', 3, 'jpg gif png', 'accepted file types, separated by spaces. example: \'jpg gif png\'', 8, 20)", +"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(34,'fileupload_allowedtypes', 3, 'jpg jpeg gif png', 'accepted file types, separated by spaces. example: \'jpg gif png\'', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(35,'fileupload_maxk', 1, '96', 'by default, most servers limit the size of uploads to 2048 KB, if you want to set it to a lower value, here it is (you cannot set a higher value than your server limit)', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(36,'fileupload_minlevel', 1, '4', 'you may not want all users to upload pictures/files, so you can set a minimum level for this', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(37,'fileupload_allowedusers', 3, '', '...or you may authorize only some users. enter their logins here, separated by spaces. if you leave this variable blank, all users who have the minimum level are authorized to upload. example: \'barbara anne george\'', 8, 30)", diff --git a/wp-admin/link-add.php b/wp-admin/link-add.php index edb9b798b8..266ab20817 100644 --- a/wp-admin/link-add.php +++ b/wp-admin/link-add.php @@ -2,6 +2,7 @@ $title = 'Add Link'; $this_file = 'link-manager.php'; +$parent_file = 'link-manager.php'; function category_dropdown($fieldname, $selected = 0) { global $wpdb, $tablelinkcategories; @@ -83,7 +84,7 @@ th { text-align: right; } - Description: + Short description: @@ -93,7 +94,7 @@ th { text-align: right; }

- +

Link Relationship (XFN) @@ -188,26 +189,22 @@ th { text-align: right; }

- +

Advanced - - + + - - - - - + - + @@ -223,33 +220,29 @@ th { text-align: right; }
Image:Image URI:
RSS URI:
Description 
Notes:
Rating:
Target -  -
Visible:
+

- +

diff --git a/wp-admin/link-categories.php b/wp-admin/link-categories.php index dd5af66d49..d2b2ff1e54 100644 --- a/wp-admin/link-categories.php +++ b/wp-admin/link-categories.php @@ -10,14 +10,14 @@ $wpvarstoreset = array('action','standalone','cat', 'auto_toggle'); for ($i=0; $iget_row("SELECT cat_id, cat_name, auto_toggle, show_images, show_description, " . " show_rating, show_updated, sort_order, sort_desc, text_before_link, text_after_link, " . " text_after_all, list_limit FROM $tablelinkcategories WHERE cat_id=$cat_id"); @@ -122,40 +122,40 @@ switch ($action) {
-

Edit Link Category “cat_name?>”

-

+

Edit “cat_name?>” Category

+
- - - - - - - +
+Category Options +
Name:    -
Show:
+ + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - -
Name:
Show: -   -   -   - -
Sort by: - show_images); ?> /> + Image
+ + (shown in title regardless)
+
+ +(shown in title regardless)
Sort order: +    - sort_desc == 'Y') ? 'checked' : '';?> value="Y" /> Descending?
-
Text/HTML 
Before:
Between:
After:
Limit: (How many links are shown. Empty for unlimited.)
-   - -
-
-

+ + + + + + Limit: + + + (Leave empty for no limit to number of links shown) + + + + Toggle: + + + + + +
+Formatting + + + + + + + + + + + + + +
Before Link:
Between Link and Description:
After Link:
+
+

+ +
if ($user_level < get_settings('links_minadminlevel')) die ("Cheatin' uh ?"); - $submit=$HTTP_POST_VARS["submit"]; - if (isset($submit) && ($submit == "Save")) { + $submit=$_POST["submit"]; + if (isset($submit)) { - $cat_id=$HTTP_POST_VARS["cat_id"]; + $cat_id=$_POST["cat_id"]; - $cat_name=addslashes($HTTP_POST_VARS["cat_name"]); - $auto_toggle = $HTTP_POST_VARS["auto_toggle"]; + $cat_name=addslashes(stripslashes($_POST["cat_name"])); + $auto_toggle = $_POST["auto_toggle"]; if ($auto_toggle != 'Y') { $auto_toggle = 'N'; } - $show_images = $HTTP_POST_VARS["show_images"]; + $show_images = $_POST["show_images"]; if ($show_images != 'Y') { $show_images = 'N'; } - $show_description = $HTTP_POST_VARS["show_description"]; + $show_description = $_POST["show_description"]; if ($show_description != 'Y') { $show_description = 'N'; } - $show_rating = $HTTP_POST_VARS["show_rating"]; + $show_rating = $_POST["show_rating"]; if ($show_rating != 'Y') { $show_rating = 'N'; } - $show_updated = $HTTP_POST_VARS["show_updated"]; + $show_updated = $_POST["show_updated"]; if ($show_updated != 'Y') { $show_updated = 'N'; } - $sort_order = $HTTP_POST_VARS["sort_order"]; + $sort_order = $_POST["sort_order"]; - $sort_desc = $HTTP_POST_VARS["sort_desc"]; + $sort_desc = $_POST["sort_desc"]; if ($sort_desc != 'Y') { $sort_desc = 'N'; } - $text_before_link = addslashes($HTTP_POST_VARS["text_before_link"]); - $text_after_link = addslashes($HTTP_POST_VARS["text_after_link"]); - $text_after_all = addslashes($HTTP_POST_VARS["text_after_all"]); + $text_before_link = addslashes($_POST["text_before_link"]); + $text_after_link = addslashes($_POST["text_after_link"]); + $text_after_all = addslashes($_POST["text_after_all"]); - $list_limit = $HTTP_POST_VARS["list_limit"]; + $list_limit = $_POST["list_limit"]; if ($list_limit == '') $list_limit = -1; @@ -290,36 +299,33 @@ updated
  • Import Blogroll
  • - -
    - Edit a link category:
    +

    Link Categories:

    - - + + - + - - - - - - - + + + + + + + - - get_results("SELECT cat_id, cat_name, auto_toggle, show_images, show_description, " . " show_rating, show_updated, sort_order, sort_desc, text_before_link, text_after_link, " . " text_after_all, list_limit FROM $tablelinkcategories ORDER BY cat_id"); +$i = 1; foreach ($results as $row) { if ($row->list_limit == -1) { $row->list_limit = 'none'; @@ -348,66 +354,88 @@ foreach ($results as $row) { } ?>
    NameIdAuto
    Toggle?
    IDToggle? Show Sort Order Desc?Text/HTMLFormatting Limit  
    images?desc?rating?updated?beforebetweenafterImagesDesc.RatingUpdatedBeforeBetweenAfter
    -
    +

    These are the defaults for when you call a link category with no additional arguments. All of these settings may be overwritten.

    -

    Add a Link Category:

    - - - - - - - +

    Add a Link Category:

    +
    +Category Options +
    Name:    - auto-toggle?
    Show:
    + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Name:
    Show: - images   - description   - rating   - updated
    Sort order: -    - Descending?
    -
    Text/HTML 
    before:
    between:
    after:
    limit: (leave empty for no limit)
    +
    + + (shown in title regardless)
    +
    + +(shown in title regardless) + + + Sort order: + + + + + + + Limit: + + (Leave empty for no limit to number of links shown) + + + + Toggle: + + + + + +
    +Formatting + + + + + + + + + + + + + +
    Before Link:
    Between Link and Description:
    After Link:
    +
    +

    diff --git a/wp-admin/link-manager.php b/wp-admin/link-manager.php index b9e3731080..3b15e9dc44 100644 --- a/wp-admin/link-manager.php +++ b/wp-admin/link-manager.php @@ -323,35 +323,41 @@ th { text-align: right; }
    -
  • View site
  • +
  • View site »
  • Logout ()
  • + ?>/wp-login.php?action=logout" title="Log out of this account">Logout () diff --git a/wp-admin/options-discussion.php b/wp-admin/options-discussion.php index eb94f33387..d220369efb 100644 --- a/wp-admin/options-discussion.php +++ b/wp-admin/options-discussion.php @@ -1,5 +1,6 @@ $v) { diff --git a/wp-admin/options-head.php b/wp-admin/options-head.php index 721ec2bd72..73a3a38a07 100644 --- a/wp-admin/options-head.php +++ b/wp-admin/options-head.php @@ -29,6 +29,7 @@ $submenu = << $v) { diff --git a/wp-admin/options-permalink.php b/wp-admin/options-permalink.php index ee08aad87d..64f74d2d15 100644 --- a/wp-admin/options-permalink.php +++ b/wp-admin/options-permalink.php @@ -1,6 +1,6 @@ $v) { @@ -77,8 +77,8 @@ default:

    -

    - +

    +

    $v) { diff --git a/wp-admin/options-writing.php b/wp-admin/options-writing.php index 7ac6132232..fe374905c4 100644 --- a/wp-admin/options-writing.php +++ b/wp-admin/options-writing.php @@ -1,5 +1,6 @@ $v) { diff --git a/wp-admin/options.php b/wp-admin/options.php index edfcf0c768..99fca9bcc8 100644 --- a/wp-admin/options.php +++ b/wp-admin/options.php @@ -1,6 +1,7 @@ $v) { diff --git a/wp-admin/profile.php b/wp-admin/profile.php index 528c285685..728c67f924 100644 --- a/wp-admin/profile.php +++ b/wp-admin/profile.php @@ -222,7 +222,7 @@ default: ?> -
    +

    Profile updated.

    diff --git a/wp-admin/templates.php b/wp-admin/templates.php index 4cf87a6b62..7de237fb6f 100644 --- a/wp-admin/templates.php +++ b/wp-admin/templates.php @@ -121,7 +121,7 @@ default: if (!$error) { ?>
    - +

    @@ -141,12 +141,12 @@ default: ?>

    -

    To edit a file, type its name here. You can edit any file writable by the server, e.g. CHMOD 766.

    +

    To edit a file, type its name here. You can edit any file writable by the server, e.g. CHMOD 666.

    - + -

    Common files:

    +

    Common files: (click to edit)

    • Main Index
    • Comments
    • diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css index 52d3fe3a16..36a88be2c4 100644 --- a/wp-admin/wp-admin.css +++ b/wp-admin/wp-admin.css @@ -249,6 +249,7 @@ textarea, input, select { padding: 0; border-bottom: none; background-color: #707070; + height: 20px; } #adminmenu2 li { line-height: 1.7em;