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: https://develop.svn.wordpress.org/trunk@1100 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2004-04-19 08:09:27 +00:00
parent a80d2cdd3b
commit 637f6f3b8a
19 changed files with 321 additions and 275 deletions

View File

@ -1,5 +1,9 @@
<?php
function wp_admin_head() {
do_action('wp_head', '');
}
function url_shorten ($url) {
$short_url = str_replace('http://', '', stripslashes($url));
$short_url = str_replace('www.', '', $short_url);

View File

@ -133,6 +133,8 @@ function blurry() {
window.onload = blurry;
//]]>
</script>
<?php wp_admin_head(); ?>
</head>
<body>
<h1 id="wphead"><a href="http://wordpress.org" rel="external" title="Visit WordPress.org">WordPress</a></h1>

View File

@ -113,9 +113,7 @@ if ('view' == $mode) {
<th scope="col">Email</th>
<th scope="col">IP</th>
<th scope="col">Comment Excerpt</th>
<th scope="col">View</th>
<th scope="col">Edit</th>
<th scope="col">Delete</th>
<th scope="col" colspan="3">Actions</th>
</tr>';
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) {
?>
<tr style='background-color: <?php echo $bgcolor; ?>'>
<td><?php if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) { ?><input type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" /><?php } ?></td>
<th scope="row"><?php comment_author_link() ?></th>
<td><?php comment_author_link() ?></td>
<td><?php comment_author_email_link() ?></td>
<td><a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP() ?>"><?php comment_author_IP() ?></a></td>
<td><?php comment_excerpt(); ?></td>

View File

@ -2,7 +2,7 @@
$allowed_users = explode(" ", trim(get_settings('fileupload_allowedusers')));
$submitbutton_text = 'Edit this!';
$submitbutton_text = 'Edit Comment &raquo;';
$toprow_title = 'Editing Comment # '.$commentdata['comment_ID'];
$form_action = 'editedcomment';
$form_extra = "' />\n<input type='hidden' name='comment_ID' value='$comment' />\n<input type='hidden' name='comment_post_ID' value='".$commentdata["comment_post_ID"];
@ -70,7 +70,7 @@ edCanvas = document.getElementById('content');
}
?>
<p><?php echo $saveasdraft; ?> <input type="submit" name="submit" value="<?php echo $submitbutton_text ?>" style="font-weight: bold;" tabindex="6" />
<p class="submit"><input type="submit" name="submit" value="<?php echo $submitbutton_text ?>" style="font-weight: bold;" tabindex="6" />
<input name="referredby" type="hidden" id="referredby" value="<?php echo $HTTP_SERVER_VARS['HTTP_REFERER']; ?>" />
</p>
@ -86,5 +86,5 @@ if ($user_level > 4) {
?>
</form>
<p><a href="post.php?action=deletecomment&amp;noredir=true&amp;comment=<?php echo $commentdata['comment_ID']; ?>&amp;p=<?php echo $commentdata['comment_post_ID']; ?>">Delete this comment</a>.</p>
<p><a class="delete" href="post.php?action=deletecomment&amp;noredir=true&amp;comment=<?php echo $commentdata['comment_ID']; ?>&amp;p=<?php echo $commentdata['comment_post_ID']; ?>">Delete comment</a></p>
</div>

View File

@ -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)",

View File

@ -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; }
<td><input type="text" name="name" value="<?php echo urldecode($_GET['name']); ?>" style="width: 95%" /></td>
</tr>
<tr>
<th scope="row">Description:</th>
<th scope="row">Short description:</th>
<td><input type="text" name="description" value="" style="width: 95%" /></td>
</tr>
<tr>
@ -93,7 +94,7 @@ th { text-align: right; }
</table>
</fieldset>
<p class="submit">
<input type="submit" name="submit" value="Add Link &raquo;" >
<input type="submit" name="submit" value="Add Link &raquo;" />
</p>
<fieldset class="options">
<legend>Link Relationship (XFN)</legend>
@ -188,26 +189,22 @@ th { text-align: right; }
</table>
</fieldset>
<p class="submit">
<input type="submit" name="submit" value="Add Link &raquo;" >
<input type="submit" name="submit" value="Add Link &raquo;" />
</p>
<fieldset class="options">
<legend>Advanced</legend>
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
<tr>
<th width="33%" scope="row">Image:</th>
<td width="67%"><input type="text" name="image" size="50" value=""></td>
<th width="33%" scope="row">Image URI:</th>
<td width="67%"><input type="text" name="image" size="50" value="" style="width: 95%" /></td>
</tr>
<tr>
<th scope="row">RSS URI: </th>
<td><input name="rss_uri" type="text" id="rss_uri" value="" size="50"></td>
</tr>
<tr>
<th scope="row">Description</th>
<td>&nbsp;</td>
<td><input name="rss_uri" type="text" id="rss_uri" value="" size="50" style="width: 95%" /></td>
</tr>
<tr>
<th scope="row">Notes:</th>
<td><textarea name="notes" cols="50" rows="10"></textarea></td>
<td><textarea name="notes" cols="50" rows="10" style="width: 95%"></textarea></td>
</tr>
<tr>
<th scope="row">Rating:</th>
@ -223,33 +220,29 @@ th { text-align: right; }
<tr>
<th scope="row">Target</th>
<td><label>
<input type="radio" name="target" value="_blank">
<input type="radio" name="target" value="_blank" />
<code>_blank</code></label>
&nbsp;
<label>
<br>
<input type="radio" name="target" value="_top">
<br />
<label><input type="radio" name="target" value="_top" />
<code>_top</code></label>
&nbsp;
<label>
<br>
<input type="radio" name="target" value="" checked="checked">
<br />
<label><input type="radio" name="target" value="" checked="checked" />
none</label>
(Note that the <code>target</code> attribute is illegal in XHTML 1.1 and 1.0 Strict.)</td>
</tr>
<tr>
<th scope="row">Visible:</th>
<td><label>
<input type="radio" name="visible" checked="checked" value="Y">
Yes</label><label><br>
<input type="radio" name="visible" value="N"> <input type="hidden" name="action" value="Add" />
<input type="radio" name="visible" checked="checked" value="Y" />
Yes</label><br />
<label><input type="radio" name="visible" value="N"> <input type="hidden" name="action" value="Add" />
No</label></td>
</tr>
</table>
</fieldset>
<p class="submit">
<input type="submit" name="submit" value="Add Link &raquo;" >
<input type="submit" name="submit" value="Add Link &raquo;" />
</p>
</form>
</div>

View File

@ -10,14 +10,14 @@ $wpvarstoreset = array('action','standalone','cat', 'auto_toggle');
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
if (empty($HTTP_POST_VARS["$wpvar"])) {
if (empty($HTTP_GET_VARS["$wpvar"])) {
if (empty($_POST["$wpvar"])) {
if (empty($_GET["$wpvar"])) {
$$wpvar = '';
} else {
$$wpvar = $HTTP_GET_VARS["$wpvar"];
$$wpvar = $_GET["$wpvar"];
}
} else {
$$wpvar = $HTTP_POST_VARS["$wpvar"];
$$wpvar = $_POST["$wpvar"];
}
}
}
@ -31,43 +31,43 @@ switch ($action) {
if ($user_level < get_settings('links_minadminlevel'))
die ("Cheatin' uh ?");
$cat_name = addslashes($HTTP_POST_VARS['cat_name']);
$auto_toggle = $HTTP_POST_VARS['auto_toggle'];
$cat_name = addslashes($_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;
@ -85,7 +85,7 @@ switch ($action) {
$standalone = 1;
include_once('admin-header.php');
$cat_id = $HTTP_GET_VARS['cat_id'];
$cat_id = $_GET['cat_id'];
$cat_name=get_linkcatname($cat_id);
$cat_name=addslashes($cat_name);
@ -104,7 +104,7 @@ switch ($action) {
case 'Edit':
{
include_once ('admin-header.php');
$cat_id = $HTTP_GET_VARS['cat_id'];
$cat_id = $_GET['cat_id'];
$row = $wpdb->get_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) {
</ul>
<div class="wrap">
<h3>Edit Link Category &#8220;<?php echo $row->cat_name?>&#8221;</h3>
<p>
<h2>Edit &#8220;<?php echo $row->cat_name?>&#8221; Category </h2>
<form name="editcat" method="post">
<input type="hidden" name="action" value="editedcat" />
<input type="hidden" name="cat_id" value="<?php echo $row->cat_id ?>" />
<table border="0">
<tr>
<td align="right">Name:</td>
<td><input type="text" name="cat_name" size="25" value="<?php echo stripslashes($row->cat_name)?>" />&nbsp;&nbsp;&nbsp;
<label for="auto_toggle">
<input type="checkbox" name="auto_toggle" id="auto_toggle" <?php echo ($row->auto_toggle == 'Y') ? 'checked' : '';?> value="Y" />
auto-toggle?</label></td>
</tr>
<tr>
<td align="right">Show:</td>
<fieldset class="options">
<legend>Category Options</legend>
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
<tr>
<th width="33%" scope="row">Name:</th>
<td width="67%"><input name="cat_name" type="text" value="<?php echo stripslashes($row->cat_name)?>" size="30" /></td>
</tr>
<tr>
<th scope="row">Show:</th>
<td>
<label for="show_images">
<input type="checkbox" name="show_images" id="show_images" <?php echo ($row->show_images == 'Y') ? 'checked' : '';?> value="Y" />
images</label>&nbsp;
<label for="show_description">
<input type="checkbox" name="show_description" id="show_description" <?php echo ($row->show_description == 'Y') ? 'checked' : '';?> value="Y" />
description</label> &nbsp;
<label for="show_rating">
<input type="checkbox" name="show_rating" id="show_rating" <?php echo ($row->show_rating == 'Y') ? 'checked' : '';?> value="Y" />
rating</label> &nbsp;
<label for="show_updated">
<input type="checkbox" name="show_updated" id="show_updated" <?php echo ($row->show_updated == 'Y') ? 'checked' : '';?> value="Y" />
updated</label>
</td>
</tr>
<tr>
<td align="right">Sort by:</td>
<td>
<select name="sort_order" size="1">
<label>
<input type="checkbox" name="show_images" value="Y" <?php checked('Y', $row->show_images); ?> />
Image</label> <br />
<label>
<input type="checkbox" name="show_description" value="Y" <?php checked('Y', $row->show_description); ?> />
Description</label>
(shown in <code>title</code> regardless)<br />
<label>
<input type="checkbox" name="show_rating" value="Y" <?php checked('Y', $row->show_rating); ?> />
Rating</label> <br />
<label>
<input type="checkbox" name="show_updated" value="Y" <?php checked('Y', $row->show_updated); ?> />
Updated</label>
(shown in <code>title</code> regardless)</td>
</tr>
<tr>
<th scope="row">Sort order:</th>
<td>
<select name="sort_order" size="1">
<option value="name" <?php echo ($row->sort_order == 'name') ? 'selected' : ''?>>Name</option>
<option value="id" <?php echo ($row->sort_order == 'id') ? 'selected' : ''?>>Id</option>
<option value="url" <?php echo ($row->sort_order == 'url') ? 'selected' : ''?>>URL</option>
@ -163,39 +163,48 @@ updated</label>
<option value="updated" <?php echo ($row->sort_order == 'updated') ? 'selected' : ''?>>Updated</option>
<option value="rand" <?php echo ($row->sort_order == 'rand') ? 'selected' : ''?>>Random</option>
<option value="length" <?php echo ($row->sort_order == 'length') ? 'selected' : ''?>>Name Length</option>
</select>&nbsp;&nbsp;
<input type="checkbox" name="sort_desc" <?php echo ($row->sort_desc == 'Y') ? 'checked' : '';?> value="Y" /> Descending?<br />
</td>
</tr>
<tr>
<td align="center">Text/HTML</td>
<td>&nbsp;</td>
</tr>
<tr>
<td align="right">Before:</td>
<td><input type="text" name="text_before_link" size="45" value="<?php echo stripslashes($row->text_before_link)?>" /></td>
</tr>
<tr>
<td align="right">Between:</td>
<td><input type="text" name="text_after_link" size="45" value="<?php echo stripslashes($row->text_after_link)?>" /></td>
</tr>
<tr>
<td align="right">After:</td>
<td><input type="text" name="text_after_all" size="45" value="<?php echo stripslashes($row->text_after_all)?>" /></td>
</tr>
<tr>
<td align="right">Limit:</td>
<td><input type="text" name="list_limit" size="5" value="<?php echo $row->list_limit?>"/> (How many links are shown. Empty for unlimited.)</td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="submit" name="submit" value="Save" class="search" />&nbsp;
<input type="submit" name="submit" value="Cancel" class="search">
</td>
</tr>
</table>
</form>
</p>
</select>
<label>
<input type="checkbox" name="sort_desc" value="Y" <?php checked('Y', $row->sort_desc); ?> />
Descending</label>
</td>
</tr>
<tr>
<th scope="row">Limit:</th>
<td>
<input type="text" name="list_limit" size="5" value="<?php echo $row->list_limit ?>" />
(Leave empty for no limit to number of links shown)
</td>
</tr>
<tr>
<th scope="row">Toggle:</th>
<td><label>
<input type="checkbox" name="auto_toggle" value="Y" <?php checked('Y', $row->auto_toggle); ?> />
When new link is added toggle all others to be invisible</label></td>
</tr>
</table>
</fieldset>
<fieldset class="options">
<legend>Formatting</legend>
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
<tr>
<th width="33%" scope="row">Before Link:</th>
<td width="67%"><input type="text" name="text_before_link" size="45" value="<?php echo stripslashes($row->text_before_link)?>" /></td>
</tr>
<tr>
<th scope="row">Between Link and Description:</th>
<td><input type="text" name="text_after_link" size="45" value="<?php echo stripslashes($row->text_after_link)?>" /></td>
</tr>
<tr>
<th scope="row">After Link:</th>
<td><input type="text" name="text_after_all" size="45" value="<?php echo stripslashes($row->text_after_all)?>"/></td>
</tr>
</table>
</fieldset>
<p class="submit"><input type="submit" name="submit" value="Save Category Settings &raquo;" /></p>
</form>
</div>
<?php
} // end if row
@ -209,48 +218,48 @@ updated</label>
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</label>
<li class="last"><a href="link-import.php">Import Blogroll</a></li>
</ul>
<div class="wrap">
<form name="cats" method="post" action="link-categories.php">
<strong>Edit</strong> a link category:<?php echo gethelp_link($this_file,'edit_link_category');?><br />
<h2>Link Categories:<?php echo gethelp_link($this_file,'edit_link_category');?></h2>
<table width="100%" cellpadding="5" cellspacing="0" border="0">
<tr>
<th rowspan="2" valign="bottom">Name</th>
<th rowspan="2" valign="bottom">Id</th>
<th rowspan="2" valign="bottom">Auto<br />Toggle?</th>
<th rowspan="2" valign="bottom">ID</th>
<th rowspan="2" valign="bottom">Toggle?</th>
<th colspan="4" valign="bottom">Show</th>
<th rowspan="2" valign="bottom">Sort Order</th>
<th rowspan="2" valign="bottom">Desc?</th>
<th colspan="3" valign="bottom">Text/HTML</th>
<th colspan="3" valign="bottom">Formatting</th>
<th rowspan="2" valign="bottom">Limit</th>
<th rowspan="2" colspan="2">&nbsp;</th>
</tr>
<tr>
<th valign="top">images?</th>
<th valign="top">desc?</th>
<th valign="top">rating?</th>
<th valign="top">updated?</th>
<th valign="top">before</th>
<th valign="top">between</th>
<th valign="top">after</th>
<th valign="top">Images</th>
<th valign="top">Desc.</th>
<th valign="top">Rating</th>
<th valign="top">Updated</th>
<th valign="top">Before</th>
<th valign="top">Between</th>
<th valign="top">After</th>
</tr>
<input type="hidden" name="cat_id" value="" />
<input type="hidden" name="action" value="" />
<?php
$results = $wpdb->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) {
}
?>
</table>
</form>
<p>These are the defaults for when you call a link category with no additional arguments. All of these settings may be overwritten.</p>
</div>
<div class="wrap">
<form name="addcat" method="post">
<input type="hidden" name="action" value="addcat" />
<h3>Add a Link Category:<?php echo gethelp_link($this_file,'add_link_category');?></h3>
<table width="100%" cellpadding="5" cellspacing="0" border="0">
<tr>
<td align="right">Name:</td>
<td><input type="text" name="cat_name" size="25" />&nbsp;&nbsp;&nbsp;
<input type="checkbox" name="auto_toggle" value="Y" /> auto-toggle?</td>
</tr>
<tr>
<td align="right">Show:</td>
<h2>Add a Link Category:<?php echo gethelp_link($this_file,'add_link_category');?></h2>
<fieldset class="options">
<legend>Category Options</legend>
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
<tr>
<th width="33%" scope="row">Name:</th>
<td width="67%"><input type="text" name="cat_name" size="30" /></td>
</tr>
<tr>
<th scope="row">Show:</th>
<td>
<input type="checkbox" name="show_images" value="Y" /> images&nbsp;&nbsp;
<input type="checkbox" name="show_description" value="Y" /> description&nbsp;&nbsp;
<input type="checkbox" name="show_rating" value="Y" /> rating&nbsp;&nbsp;
<input type="checkbox" name="show_updated" value="Y" /> updated</td>
</tr>
<tr>
<td align="right">Sort order:</td>
<td>
<select name="sort_order" size="1">
<option value="name">Name</option>
<option value="id">Id</option>
<option value="url">URL</option>
<option value="rating">Rating</option>
<option value="updated">Updated</option>
<option value="rand">Random</option>
</select>&nbsp;&nbsp;
<input type="checkbox" name="sort_desc" value="N" /> Descending?<br />
</td>
</tr>
<tr>
<td align="center">Text/HTML</td>
<td>&nbsp;</td>
</tr>
<tr>
<td align="right">before:</td>
<td><input type="text" name="text_before_link" size="45" value="&lt;li&gt;"/></td>
</tr>
<tr>
<td align="right">between:</td>
<td><input type="text" name="text_after_link" size="45" value="&lt;br /&gt;" /></td>
</tr>
<tr>
<td align="right">after:</td>
<td><input type="text" name="text_after_all" size="45" value="&lt;/li&gt;"/></td>
</tr>
<tr>
<td align="right">limit:</td>
<td><input type="text" name="list_limit" size="5" value=""/> (leave empty for no limit)</td>
</tr>
<tr>
<td align="center" colspan="2"><input type="submit" name="submit" value="Add Category!" class="search" /></td>
</tr>
</table>
<label>
<input type="checkbox" name="show_images" value="Y" />
Image</label> <br />
<label>
<input type="checkbox" name="show_description" value="Y" />
Description</label>
(shown in <code>title</code> regardless)<br />
<label>
<input type="checkbox" name="show_rating" value="Y" />
Rating</label> <br />
<label>
<input type="checkbox" name="show_updated" value="Y" />
Updated</label>
(shown in <code>title</code> regardless)</td>
</tr>
<tr>
<th scope="row">Sort order:</th>
<td>
<select name="sort_order" size="1">
<option value="name">Name</option>
<option value="id">Id</option>
<option value="url">URL</option>
<option value="rating">Rating</option>
<option value="updated">Updated</option>
<option value="rand">Random</option>
</select>
<label>
<input type="checkbox" name="sort_desc" value="Y" />
Descending</label>
</td>
</tr>
<tr>
<th scope="row">Limit:</th>
<td>
<input type="text" name="list_limit" size="5" value="" /> (Leave empty for no limit to number of links shown)
</td>
</tr>
<tr>
<th scope="row">Toggle:</th>
<td><label>
<input type="checkbox" name="auto_toggle" value="Y" />
When new link is added toggle all others to be invisible</label></td>
</tr>
</table>
</fieldset>
<fieldset class="options">
<legend>Formatting</legend>
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
<tr>
<th width="33%" scope="row">Before Link:</th>
<td width="67%"><input type="text" name="text_before_link" size="45" value="&lt;li&gt;" /></td>
</tr>
<tr>
<th scope="row">Between Link and Description:</th>
<td><input type="text" name="text_after_link" size="45" value="&lt;br /&gt;" /></td>
</tr>
<tr>
<th scope="row">After Link:</th>
<td><input type="text" name="text_after_all" size="45" value="&lt;/li&gt;"/></td>
</tr>
</table>
</fieldset>
<p class="submit"><input type="submit" name="submit" value="Add Category &raquo;" /></p>
</form>
</div>
<div class="wrap">

View File

@ -323,35 +323,41 @@ th { text-align: right; }
</style>
<div class="wrap">
<form action="" method="post" name="editlink" id="editlink">
<h3>Edit a link:</h3>
<table width="100%" border="0" cellspacing="5" cellpadding="3">
<tr>
<th scope="row">URI:</th>
<td><input type="text" name="linkurl" size="80" value="<?php echo $link_url; ?>" /></td>
</tr>
<tr>
<th scope="row">Link Name: </th>
<td><input type="text" name="name" size="80" value="<?php echo $link_name; ?>" /></td>
</tr>
<tr>
<th scope="row">RSS URI: </th>
<td><input name="rss_uri" type="text" id="rss_uri" value="<?php echo $link_rss_uri; ?>" size="80"></td>
</tr>
<tr>
<th scope="row">Image:</th>
<td><input type="text" name="image" size="80" value="<?php echo $link_image; ?>" /></td>
</tr>
<tr>
<th scope="row">Description:</th>
<td><input type="text" name="description" size="80" value="<?php echo $link_description; ?>" /></td>
</tr>
<tr>
<th scope="row">rel:</th>
<td><input type="text" name="rel" id="rel" size="80" value="<?php echo $link_rel; ?>" /></td>
</tr>
<tr>
<th scope="row"><a href="http://gmpg.org/xfn/">XFN</a>:</th>
<td><table cellpadding="3" cellspacing="5">
<h2>Edit a link:</h2>
<fieldset class="options">
<legend>Basics</legend>
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
<tr>
<th width="33%" scope="row">URI:</th>
<td width="67%"><input type="text" name="linkurl" value="<?php echo $link_url; ?>" style="width: 95%; /"></td>
</tr>
<tr>
<th scope="row">Link Name:</th>
<td><input type="text" name="name" value="<?php echo $link_name; ?>" style="width: 95%" /></td>
</tr>
<tr>
<th scope="row">Short description:</th>
<td><input type="text" name="description" value="<?php echo $link_description; ?>" style="width: 95%" /></td>
</tr>
<tr>
<th scope="row">Category:</th>
<td><?php category_dropdown('category'); ?></td>
</tr>
</table>
</fieldset>
<p class="submit">
<input type="submit" name="submit" value="Save Changes &raquo;" />
</p>
<fieldset class="options">
<legend>Link Relationship (XFN)</legend>
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
<tr>
<th width="33%" scope="row">rel:</th>
<td width="67%"><input type="text" name="rel" id="rel" size="50" value="<?php echo $link_rel; ?>"></td>
</tr>
<tr>
<th scope="row"><a href="http://gmpg.org/xfn/">XFN</a> Creator:</th>
<td><table cellpadding="3" cellspacing="5">
<tr>
<th scope="row"> friendship </th>
<td>
@ -435,15 +441,31 @@ th { text-align: right; }
</td>
</tr>
</table></td>
</tr>
<tr>
<th scope="row">Notes:</th>
<td><textarea name="notes" cols="80" rows="10"><?php echo $link_notes; ?></textarea></td>
</tr>
<tr>
<th scope="row">Rating:</th>
<td><select name="rating" size="1">
<?php
</tr>
</table>
</fieldset>
<p class="submit">
<input type="submit" name="submit" value="Save Changes &raquo;" />
</p>
<fieldset class="options">
<legend>Advanced</legend>
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
<tr>
<th width="33%" scope="row">Image URI:</th>
<td width="67%"><input type="text" name="image" size="50" value="<?php echo $link_image; ?>" style="width: 95%" /></td>
</tr>
<tr>
<th scope="row">RSS URI: </th>
<td><input name="rss_uri" type="text" id="rss_uri" value="<?php echo $link_rss_uri; ?>" size="50" style="width: 95%" /></td>
</tr>
<tr>
<th scope="row">Notes:</th>
<td><textarea name="notes" cols="50" rows="10" style="width: 95%"><?php echo $link_notes; ?></textarea></td>
</tr>
<tr>
<th scope="row">Rating:</th>
<td><select name="rating" size="1">
<?php
for ($r = 0; $r < 10; $r++) {
echo(' <option value="'.$r.'" ');
if ($link_rating == $r)
@ -451,45 +473,37 @@ th { text-align: right; }
echo('>'.$r.'</option>');
}
?>
</select> (Leave at 0 for no rating.) </td>
</tr>
<tr>
<th scope="row">Target:</th>
<td><label>
</select>
&nbsp;(Leave at 0 for no rating.) </td>
</tr>
<tr>
<th scope="row">Target</th>
<td><label>
<input type="radio" name="target" value="_blank" <?php echo(($link_target == '_blank') ? 'checked="checked"' : ''); ?> />
<code>_blank</code></label>
&nbsp;<label>
<code>_blank</code></label><br />
<label>
<input type="radio" name="target" value="_top" <?php echo(($link_target == '_top') ? 'checked="checked"' : ''); ?> />
<code>_top</code></label>
&nbsp;
<code>_top</code></label><br />
<label>
<input type="radio" name="target" value="" <?php echo(($link_target == '') ? 'checked="checked"' : ''); ?> />
none (Note that the <code>target</code> attribute is illegal in XHTML 1.1 and 1.0 Strict.)</label></td>
</tr>
<tr>
<th scope="row">Visible:</th>
<td><label>
<input type="radio" name="visible" <?php if ($link_visible == 'Y') echo "checked"; ?> value="Y" />
Yes</label>
&nbsp;
<label>
<input type="radio" name="visible" <?php if ($link_visible == 'N') echo "checked"; ?> value="N" />
none</label><br />
(Note that the <code>target</code> attribute is illegal in XHTML 1.1 and 1.0 Strict.)</td>
</tr>
<tr>
<th scope="row">Visible:</th>
<td><label>
<input type="radio" name="visible" <?php if ($link_visible == 'Y') echo "checked='checked'"; ?> value="Y" />
Yes</label><br /><label>
<input type="radio" name="visible" <?php if ($link_visible == 'N') echo "checked='checked'"; ?> value="N" />
No</label></td>
</tr>
<tr>
<th scope="row">Category:</th>
<td><?php category_dropdown('category', $link_category); ?></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="submit" value="Save Changes" class="search" />
&nbsp;
<input type="submit" name="submit" value="Cancel" class="search" />
</tr>
</table>
</fieldset>
<p class="submit"><input type="submit" name="submit" value="Save Changes &raquo;" />
<input type="hidden" name="action" value="editlink" />
<input type="hidden" name="link_id" value="<?php echo $link_id; ?>" />
<input type="hidden" name="order_by" value="<?php echo $order_by ?>" />
<input type="hidden" name="cat_id" value="<?php echo $cat_id ?>" /></td>
</tr>
</table>
<input type="hidden" name="cat_id" value="<?php echo $cat_id ?>" /></p>
</form>
</div>
<?php

View File

@ -21,7 +21,7 @@ foreach ($menu as $item) {
}
?>
<li><a href="<?php echo get_settings('siteurl') . '/' . get_settings('blogfilename'); ?>" title="View your site">View site</a></li>
<li><a href="<?php echo get_settings('siteurl') . '/' . get_settings('blogfilename'); ?>" title="View your site">View site &raquo;</a></li>
<li class="last"><a href="<?php echo get_settings('siteurl')
?>/wp-login.php?action=logout" title="Logout of this account">Logout (<?php echo stripslashes($user_nickname) ?>)</a></li>
?>/wp-login.php?action=logout" title="Log out of this account">Logout (<?php echo stripslashes($user_nickname) ?>)</a></li>
</ul>

View File

@ -1,5 +1,6 @@
<?php
$title = 'Discussion Options';
$parent_file = 'options-general.php';
function add_magic_quotes($array) {
foreach ($array as $k => $v) {

View File

@ -29,6 +29,7 @@ $submenu = <<<END
END;
$sublines = split("\n", $submenu);
$_SERVER['REQUEST_URI'] = str_replace('?updated=true', '', $_SERVER['REQUEST_URI']);
foreach ($sublines as $subline) {
preg_match('/href="([^"]+)"/', $subline, $url);
if (substr($_SERVER['REQUEST_URI'], -8) == substr($url[1], -8)) {

View File

@ -1,5 +1,6 @@
<?php
$title = 'Miscellaneous Options';
$parent_file = 'options-general.php';
function add_magic_quotes($array) {
foreach ($array as $k => $v) {

View File

@ -1,6 +1,6 @@
<?php
$title = 'Permalink Options';
$this_file = 'options.php';
$parent_file = 'options-general.php';
function add_magic_quotes($array) {
foreach ($array as $k => $v) {
@ -77,8 +77,8 @@ default:
<p>
<input name="permalink_structure" type="text" style="width: 100%;" value="<?php echo $permalink_structure; ?>" />
</p>
<p>
<input type="submit" name="Submit" value="Update">
<p class="submit">
<input type="submit" name="Submit" value="Update Permalink Structure">
</p>
</form>
<?php

View File

@ -1,5 +1,6 @@
<?php
$title = 'Reading Options';
$parent_file = 'options-general.php';
function add_magic_quotes($array) {
foreach ($array as $k => $v) {

View File

@ -1,5 +1,6 @@
<?php
$title = 'Writing Options';
$parent_file = 'options-general.php';
function add_magic_quotes($array) {
foreach ($array as $k => $v) {

View File

@ -1,6 +1,7 @@
<?php
$title = 'Options';
$this_file = 'options.php';
$parent_file = 'options-general.php';
function add_magic_quotes($array) {
foreach ($array as $k => $v) {

View File

@ -222,7 +222,7 @@ default:
?>
<?php if ($updated) { ?>
<div class="wrap">
<div class="updated">
<p><strong>Profile updated.</strong></p>
</div>
<?php } ?>

View File

@ -121,7 +121,7 @@ default:
if (!$error) {
?>
<form name="template" action="templates.php" method="post">
<textarea cols="80" rows="20" style="width:100%; font-family: 'Courier New', Courier, monopace; font-size:small;" name="newcontent" tabindex="1"><?php echo $content ?></textarea>
<textarea cols="80" rows="21" style="width:100%; font-family: 'Courier New', Courier, monopace; font-size:small;" name="newcontent" tabindex="1"><?php echo $content ?></textarea>
<input type="hidden" name="action" value="update" />
<input type="hidden" name="file" value="<?php echo $file ?>" />
<p class="submit">
@ -141,12 +141,12 @@ default:
?>
</div>
<div class="wrap">
<p>To edit a file, type its name here. You can edit any file writable by the server, e.g. CHMOD 766.</p>
<p>To edit a file, type its name here. You can edit any file <a href="http://wiki.wordpress.org/index.php/MakeWritable" title="Read more about making files writable">writable by the server</a>, e.g. CHMOD 666.</p>
<form name="file" action="templates.php" method="get">
<input type="text" name="file" />
<input type="submit" name="submit" class="search" value="go" />
<input type="submit" name="submit" value="Edit file &raquo;" />
</form>
<p>Common files:</p>
<p>Common files: (click to edit)</p>
<ul>
<li><a href="templates.php?file=index.php">Main Index </a></li>
<li><a href="templates.php?file=wp-comments.php">Comments</a></li>

View File

@ -249,6 +249,7 @@ textarea, input, select {
padding: 0;
border-bottom: none;
background-color: #707070;
height: 20px;
}
#adminmenu2 li {
line-height: 1.7em;