Cleaning out some errors and fixing some XHTML 1.1 problems.

git-svn-id: https://develop.svn.wordpress.org/trunk@1503 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2004-08-01 08:04:39 +00:00
parent 95db0a0d76
commit 3a96aef1f9
8 changed files with 25 additions and 36 deletions

View File

@ -4,16 +4,7 @@ require_once('../wp-config.php');
require_once(ABSPATH . '/wp-admin/auth.php'); require_once(ABSPATH . '/wp-admin/auth.php');
require(ABSPATH . '/wp-admin/admin-functions.php'); require(ABSPATH . '/wp-admin/admin-functions.php');
function gethelp_link($this_file, $helptag) { $dogs = $wpdb->get_results("SELECT * FROM $wpdb->categories");
$url = 'http://wordpress.org/docs/reference/links/#'.$helptag;
$s = ' <a href="'.$url.'" title="' . __('Click here for help') .'">?</a>';
return $s;
}
if (!isset($blogID)) $blog_ID=1;
if (!isset($debug)) $debug=0;
$dogs = $wpdb->get_results("SELECT * FROM $wpdb->categories WHERE 1=1");
foreach ($dogs as $catt) { foreach ($dogs as $catt) {
$cache_categories[$catt->cat_ID] = $catt; $cache_categories[$catt->cat_ID] = $catt;
} }
@ -23,12 +14,8 @@ get_currentuserinfo();
$posts_per_page = get_settings('posts_per_page'); $posts_per_page = get_settings('posts_per_page');
$what_to_show = get_settings('what_to_show'); $what_to_show = get_settings('what_to_show');
$archive_mode = get_settings('archive_mode'); $archive_mode = get_settings('archive_mode');
$date_format = stripslashes(get_settings('date_format')); $date_format = get_settings('date_format');
$time_format = stripslashes(get_settings('time_format')); $time_format = get_settings('time_format');
// let's deactivate quicktags on IE Mac and Lynx, because they don't work there.
if (($is_macIE) || ($is_lynx))
$use_quicktags = 0;
$wpvarstoreset = array('profile','standalone','redirect','redirect_url','a','popuptitle','popupurl','text', 'trackback', 'pingback'); $wpvarstoreset = array('profile','standalone','redirect','redirect_url','a','popuptitle','popupurl','text', 'trackback', 'pingback');
for ($i=0; $i<count($wpvarstoreset); $i += 1) { for ($i=0; $i<count($wpvarstoreset); $i += 1) {
@ -58,7 +45,7 @@ if ($standalone == 0) :
<?php <?php
if ($redirect==1) { if ($redirect==1) {
?> ?>
<script language="javascript" type="text/javascript"> <script type="text/javascript">
<!-- <!--
function redirect() { function redirect() {
window.location = "<?php echo $redirect_url; ?>"; window.location = "<?php echo $redirect_url; ?>";
@ -71,7 +58,7 @@ setTimeout("redirect();", 600);
?> ?>
<?php if (isset($xfn)) : ?> <?php if (isset($xfn)) : ?>
<script language="javascript" type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
function GetElementsWithClassName(elementName, className) { function GetElementsWithClassName(elementName, className) {
@ -132,6 +119,7 @@ window.onload = blurry;
<?php do_action('admin_head', ''); ?> <?php do_action('admin_head', ''); ?>
</head> </head>
<body> <body>
<div id="wphead"> <div id="wphead">
<h1><?php bloginfo('name') ?></h1> <h1><?php bloginfo('name') ?></h1>
</div> </div>

View File

@ -11,14 +11,13 @@ $messages[3] = __('Custom field deleted.');
$allowed_users = explode(" ", trim(get_settings('fileupload_allowedusers'))); $allowed_users = explode(" ", trim(get_settings('fileupload_allowedusers')));
$submitbutton_text = __('Save');
$toprow_title = sprintf(__('Editing Post #%s'), $post_ID);
if (0 == $post_ID) { if (0 == $post_ID) {
$form_action = 'post'; $form_action = 'post';
} else { } else {
$form_action = 'editpost'; $form_action = 'editpost';
$form_extra = "<input type='hidden' name='post_ID' value='$post_ID' />"; $form_extra = "<input type='hidden' name='post_ID' value='$post_ID' />";
} }
if (get_settings('use_pingback')) { if (get_settings('use_pingback')) {
$form_pingback = '<input type="checkbox" class="checkbox" name="post_pingback" value="1" '; $form_pingback = '<input type="checkbox" class="checkbox" name="post_pingback" value="1" ';
if ( get_settings('default_pingback_flag') ) $form_pingback .= 'checked="checked" '; if ( get_settings('default_pingback_flag') ) $form_pingback .= 'checked="checked" ';
@ -27,8 +26,8 @@ if (get_settings('use_pingback')) {
$form_pingback = ''; $form_pingback = '';
} }
$colspan = 2;
$form_prevstatus = '<input type="hidden" name="prev_status" value="'.$post_status.'" />'; $form_prevstatus = '<input type="hidden" name="prev_status" value="'.$post_status.'" />';
if (get_settings('use_trackback')) { if (get_settings('use_trackback')) {
$form_trackback = '<p><label for="trackback"><a href="http://wordpress.org/docs/reference/post/#trackback" title="' . __('Help on trackbacks') . '">' . __('<strong>TrackBack</strong> an <abbr title="Universal Resource Identifier">URI</abbr></a>') . '</label> ' . __('(Separate multiple <abbr title="Universal Resource Identifier">URI</abbr>s with spaces.)') . '<br /> $form_trackback = '<p><label for="trackback"><a href="http://wordpress.org/docs/reference/post/#trackback" title="' . __('Help on trackbacks') . '">' . __('<strong>TrackBack</strong> an <abbr title="Universal Resource Identifier">URI</abbr></a>') . '</label> ' . __('(Separate multiple <abbr title="Universal Resource Identifier">URI</abbr>s with spaces.)') . '<br />
<input type="text" name="trackback_url" style="width: 415px" id="trackback" tabindex="7" value="'. str_replace("\n", ' ', $to_ping) .'" /></p>'; <input type="text" name="trackback_url" style="width: 415px" id="trackback" tabindex="7" value="'. str_replace("\n", ' ', $to_ping) .'" /></p>';
@ -123,7 +122,7 @@ window.onload = focusit;
<?php <?php
?> ?>
<script type="text/javascript" language="JavaScript"> <script type="text/javascript">
<!-- <!--
edCanvas = document.getElementById('content'); edCanvas = document.getElementById('content');
//--> //-->
@ -189,6 +188,7 @@ if($metadata = has_meta($post_ID)) {
meta_form(); meta_form();
?> ?>
</fieldset> </fieldset>
<?php do_action('edit_form_advanced', ''); ?>
</div> </div>
</form> </form>
<?php if ('edit' == $action) echo " <?php if ('edit' == $action) echo "

View File

@ -56,7 +56,7 @@ window.onload = focusit;
<div><textarea rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="4" id="content" style="width: 99%"><?php echo $content ?></textarea></div> <div><textarea rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="4" id="content" style="width: 99%"><?php echo $content ?></textarea></div>
</fieldset> </fieldset>
<script type="text/javascript" language="JavaScript"> <script type="text/javascript">
<!-- <!--
edCanvas = document.getElementById('content'); edCanvas = document.getElementById('content');
//--> //-->

View File

@ -4,10 +4,9 @@
$allowed_users = explode(" ", trim(get_settings('fileupload_allowedusers'))); $allowed_users = explode(" ", trim(get_settings('fileupload_allowedusers')));
$submitbutton_text = __('Blog this!');
$toprow_title = __('New Post');
$form_action = 'post'; $form_action = 'post';
$form_extra = ''; $form_extra = '';
if (get_settings('use_pingback')) { if (get_settings('use_pingback')) {
$form_pingback = '<input type="checkbox" class="checkbox" name="post_pingback" value="1" '; $form_pingback = '<input type="checkbox" class="checkbox" name="post_pingback" value="1" ';
if ($post_pingback) $form_pingback .= 'checked="checked" '; if ($post_pingback) $form_pingback .= 'checked="checked" ';
@ -15,13 +14,14 @@ if (get_settings('use_pingback')) {
} else { } else {
$form_pingback = ''; $form_pingback = '';
} }
if (get_settings('use_trackback')) { if (get_settings('use_trackback')) {
$form_trackback = '<p><label for="trackback">' . sprintf(__('<a href="%s" title="Help on trackbacks"><strong>TrackBack</strong> a <acronym title="Uniform Resource Locator">URL</acronym></a>:</label> (Separate multiple <abbr title="Universal Resource Identifier">URI</abbr>s with spaces.)<br />'), 'http://wordpress.org/docs/reference/post/#trackback') . $form_trackback = '<p><label for="trackback">' . sprintf(__('<a href="%s" title="Help on trackbacks"><strong>TrackBack</strong> a <acronym title="Uniform Resource Locator">URL</acronym></a>:</label> (Separate multiple <abbr title="Universal Resource Identifier">URI</abbr>s with spaces.)<br />'), 'http://wordpress.org/docs/reference/post/#trackback') .
'<input type="text" name="trackback_url" style="width: 360px" id="trackback" tabindex="7" /></p>'; '<input type="text" name="trackback_url" style="width: 360px" id="trackback" tabindex="7" /></p>';
} else { } else {
$form_trackback = ''; $form_trackback = '';
} }
$colspan = 3;
$saveasdraft = ''; $saveasdraft = '';
@ -79,7 +79,7 @@ if ('bookmarklet' != $mode) {
</fieldset> </fieldset>
<script type="text/javascript" language="JavaScript"> <script type="text/javascript">
<!-- <!--
edCanvas = document.getElementById('content'); edCanvas = document.getElementById('content');
//--> //-->
@ -87,6 +87,7 @@ edCanvas = document.getElementById('content');
<?php echo $form_pingback ?> <?php echo $form_pingback ?>
<?php echo $form_trackback; ?> <?php echo $form_trackback; ?>
<p class="submit"><input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" value="<?php _e('Save as Draft') ?>" /> <p class="submit"><input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" value="<?php _e('Save as Draft') ?>" />
<input name="saveasprivate" type="submit" id="saveasprivate" tabindex="10" value="<?php _e('Save as Private') ?>" /> <input name="saveasprivate" type="submit" id="saveasprivate" tabindex="10" value="<?php _e('Save as Private') ?>" />
<input name="publish" type="submit" id="publish" tabindex="6" style="font-weight: bold;" value="<?php _e('Publish') ?>" /> <input name="publish" type="submit" id="publish" tabindex="6" style="font-weight: bold;" value="<?php _e('Publish') ?>" />
@ -95,7 +96,7 @@ edCanvas = document.getElementById('content');
} ?> } ?>
<input name="referredby" type="hidden" id="referredby" value="<?php if (isset($_SERVER['HTTP_REFERER'])) echo urlencode($_SERVER['HTTP_REFERER']); ?>" /> <input name="referredby" type="hidden" id="referredby" value="<?php if (isset($_SERVER['HTTP_REFERER'])) echo urlencode($_SERVER['HTTP_REFERER']); ?>" />
</p> </p>
<?php do_action('edit_form', ''); ?>
</div> </div>
</form> </form>

View File

@ -764,7 +764,7 @@ if ($is_NS4 || $is_gecko) {
} else if ($is_winIE) { } else if ($is_winIE) {
?> ?>
<a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(btw=window.open('<?php echo get_settings('siteurl') ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'<?php echo $bookmarklet_tbpb ?>&amp;popupurl='+escape(location.href)+'&amp;popuptitle='+escape(document.title),'bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a> <a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(btw=window.open('<?php echo get_settings('siteurl') ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'<?php echo $bookmarklet_tbpb ?>&amp;popupurl='+escape(location.href)+'&amp;popuptitle='+escape(document.title),'bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a>
<script type="text/javascript" language="JavaScript"> <script type="text/javascript">
<!-- <!--
function oneclickbookmarklet(blah) { function oneclickbookmarklet(blah) {
window.open ("profile.php?action=IErightclick", "oneclickbookmarklet", "width=500, height=450, location=0, menubar=0, resizable=0, scrollbars=1, status=1, titlebar=0, toolbar=0, screenX=120, left=120, screenY=120, top=120"); window.open ("profile.php?action=IErightclick", "oneclickbookmarklet", "width=500, height=450, location=0, menubar=0, resizable=0, scrollbars=1, status=1, titlebar=0, toolbar=0, screenX=120, left=120, screenY=120, top=120");

View File

@ -342,7 +342,7 @@ default:
<?php if ($is_gecko && $profiledata->user_level != 0) { ?> <?php if ($is_gecko && $profiledata->user_level != 0) { ?>
<div class="wrap"> <div class="wrap">
<script language="JavaScript" type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
function addPanel() function addPanel()
{ {

View File

@ -1,2 +1,2 @@
<script src="quicktags.js" language="JavaScript" type="text/javascript"></script> <script src="quicktags.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">edToolbar();</script> <script type="text/javascript">edToolbar();</script>

View File

@ -83,7 +83,7 @@ break;
default: default:
require_once('admin-header.php'); require_once('admin-header.php');
update_option('recently_edited', array(1, 2, 3) );
if ($user_level <= 5) { if ($user_level <= 5) {
die(__('<p>You have do not have sufficient permissions to edit templates for this blog.</p>')); die(__('<p>You have do not have sufficient permissions to edit templates for this blog.</p>'));
} }