Changeset 4259

Show
Ignore:
Timestamp:
09/28/06 17:35:59 (2 years ago)
Author:
ryan
Message:

Add support for RTL in install.php, upgrade.php and inline-uploading.php. Props Sewar. #3136

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/readme.html

    r3517 r4259  
    22<html xmlns="http://www.w3.org/1999/xhtml"> 
    33<head> 
    4 <title>WordPress &rsaquo; ReadMe</title> 
    5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    6 <style type="text/css" media="screen"> 
    7     <!-- 
    8     html { 
    9         background: #eee; 
    10     } 
    11     body { 
    12         background: #fff; 
    13         color: #000; 
    14         font-family: Georgia, "Times New Roman", Times, serif; 
    15         margin-left: 25%; 
    16         margin-right: 25%; 
    17         padding: .2em 2em; 
    18     } 
    19  
    20     h1 { 
    21         color: #006; 
    22         font-size: 18px; 
    23         font-weight: lighter; 
    24     } 
    25  
    26     h2 { 
    27         font-size: 16px; 
    28     } 
    29  
    30     p, li, dt { 
    31         line-height: 140%; 
    32         padding-bottom: 2px; 
    33     } 
    34  
    35     ul, ol { 
    36         padding: 5px 5px 5px 20px; 
    37     } 
    38     --> 
    39     </style> 
     4    <title>WordPress &rsaquo; ReadMe</title> 
     5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
     6    <link rel="stylesheet" href="wp-admin/install.css" type="text/css" /> 
    407</head> 
    418<body> 
    42 <h1 style="text-align: center"><img alt="WordPress" src="http://wordpress.org/images/wordpress.gif" /> <br /> 
    43     Version 2.0</h1> 
    44 <p style="text-align: center"> Semantic Personal Publishing Platform </p> 
     9<h1 id="logo" style="text-align: center"> 
     10    <img alt="WordPress" src="wp-admin/images/wordpress-logo.png" /> 
     11    <br /> Version 2.1-ALPHA 
     12</h1> 
     13<p style="text-align: center">Semantic Personal Publishing Platform</p> 
     14 
    4515<h1>First Things First</h1> 
    4616<p>Welcome. WordPress is a very special project to me. Every developer and contributor adds something unique to the mix, and together we create something beautiful that I'm proud to be a part of. Thousands of hours have gone into WordPress, and we're dedicated to making it better every day. Thank you for making it part of your world.</p> 
    4717<p style="text-align: right;">&#8212; Matt Mullenweg </p> 
    4818 
    49 <h1 id="installation">Installation: Famous 5-minute install</h1> 
     19<h1>Installation: Famous 5-minute install</h1> 
    5020<ol> 
    5121    <li>Unzip the package in an empty directory</li> 
     
    6939<h2>Template Changes</h2> 
    7040<p>If you have customized your templates you will probably have to make some changes to them. If you're converting your 1.2 or earlier templates, <a href="http://codex.wordpress.org/Upgrade_1.2_to_1.5">we've created a special guide for you</a>. </p> 
     41 
    7142<h1>Online Resources</h1> 
    7243<p>If you have any questions that aren't addressed in this document, please take advantage of WordPress' numerous online resources:</p> 
    7344<dl> 
    7445    <dt><a href="http://codex.wordpress.org/">The WordPress Codex </a></dt> 
    75     <dd>The Codex is the encyclopedia of all things WordPress. It is the most comprehensive source of information for WordPress available. </dd> 
     46       <dd>The Codex is the encyclopedia of all things WordPress. It is the most comprehensive source of information for WordPress available. </dd> 
    7647    <dt><a href="http://wordpress.org/development/">The Development Blog</a></dt> 
    77     <dd>This is where you'll find the latest updates and news related to WordPress. Bookmark and check often. </dd> 
     48       <dd>This is where you'll find the latest updates and news related to WordPress. Bookmark and check often. </dd> 
    7849    <dt><a href="http://planet.wordpress.org/">WordPress Planet </a></dt> 
    79     <dd>The WordPress Planet is a news aggregator that brings together posts from WordPress blogs around the web. </dd> 
     50       <dd>The WordPress Planet is a news aggregator that brings together posts from WordPress blogs around the web. </dd> 
    8051    <dt><a href="http://wordpress.org/support/">WordPress Support Forums</a></dt> 
    81     <dd>If you've looked everywhere and still can't find an answer, the support forums are very active and have a large community ready to help. To help them help you be sure to use a descriptive thread title and describe your question in as much detail as possible. </dd> 
     52       <dd>If you've looked everywhere and still can't find an answer, the support forums are very active and have a large community ready to help. To help them help you be sure to use a descriptive thread title and describe your question in as much detail as possible. </dd> 
    8253    <dt><a href="http://codex.wordpress.org/IRC">WordPress IRC Channel</a></dt> 
    83     <dd>Finally, there is an online chat channel that is used for discussion amoung people who use WordPress and occasionally support topics. The above wiki page should point you in the right direction. (irc.freenode.net #wordpresss) </dd> 
     54       <dd>Finally, there is an online chat channel that is used for discussion amoung people who use WordPress and occasionally support topics. The above wiki page should point you in the right direction. (irc.freenode.net #wordpresss) </dd> 
    8455</dl> 
    8556 
    86 <h1 id="requirements">System Recommendations</h1> 
     57<h1>System Recommendations</h1> 
    8758<ul> 
    8859    <li>PHP version <strong>4.1</strong> or higher</li> 
     
    9566<p>WordPress can <a href="http://codex.wordpress.org/Importing_from_other_blogging_software">import from a number of systems</a>. First you need to get WordPress installed and working as described above.</p> 
    9667 
    97 <h1 id="templates">XML-RPC Interface</h1> 
     68<h1>XML-RPC Interface</h1> 
    9869<p>You can now post to your WordPress blog with tools like <a href="http://ecto.kung-foo.tv/">Ecto</a>, <a href="http://blogbuddy.sourceforge.net">BlogBuddy</a>, <a href="http://bloggar.com/">Bloggar</a>, <a href="http://www.ubique.ch/wapblogger/">WapBlogger</a> (post from your Wap cellphone!), <a href="http://radio.userland.com">Radio Userland</a> (which means you can use Radio's email-to-blog feature), <a href="http://www.zempt.com/">Zempt</a>, <a href="http://www.newzcrawler.com/">NewzCrawler</a>, and other tools that support the Blogging APIs! :) You can read more about <a href="http://codex.wordpress.org/XML-RPC_Support">XML-RPC support on the Codex</a>.</p> 
    9970 
    10071<h1>Post via Email</h1> 
    101 <p>You can post from an email client! To set this up go to your &quot;Writing&quot; options screen and fill in the connection details for your secret POP3 account. Then you need to set up <code>wp-mail.php</code> to execute periodically to check the mailbox for new posts. You can do it with Cron-jobs, or if your host doesn't support it you can look into the various website-monitoring services, and make them check your <code>wp-mail.php</code> URL. </p> 
    102 <p> Posting is easy: Any email sent to the address you specify will be posted, with the subject as the title. It is best to keep the address dicrete. The script will <i>delete</i> emails that are successfully posted. </p> 
    103 <h1 id="roles">User Roles </h1> 
     72<p>You can post from an email client! To set this up go to your &quot;Writing&quot; options screen and fill in the connection details for your secret POP3 account. Then you need to set up <code>wp-mail.php</code> to execute periodically to check the mailbox for new posts. You can do it with Cron-jobs, or if your host doesn't support it you can look into the various website-monitoring services, and make them check your <code>wp-mail.php</code> URL.</p> 
     73<p>Posting is easy: Any email sent to the address you specify will be posted, with the subject as the title. It is best to keep the address dicrete. The script will <i>delete</i> emails that are successfully posted.</p> 
    10474 
     75<h1>User Roles</h1> 
    10576<p>We've eliminated user levels in order to make way for the much more flexible roles system introduced in 2.0. You can <a href="http://codex.wordpress.org/Roles_and_Capabilities">read more about Roles and Capabilities on the Codex</a>.</p> 
    10677 
  • trunk/wp-admin/admin-footer.php

    r3663 r4259  
    11 
    2 <div id="footer"><p><a href="http://wordpress.org/" id="wordpress-logo"><img src="images/wordpress-logo.png" alt="WordPress" /></a></p> 
    3 <p> 
    4 <a href="http://codex.wordpress.org/"><?php _e('Documentation'); ?></a> &#8212; <a href="http://wordpress.org/support/"><?php _e('Support Forums'); ?></a> <br /
    5 <?php bloginfo('version'); ?> &#8212; <?php printf(__('%s seconds'), number_format(timer_stop(), 2)); ?
    6 </p
    7  
     2<div id="footer"> 
     3   <p><a href="http://wordpress.org/" id="wordpress-logo"><img src="images/wordpress-logo.png" alt="WordPress" /></a></p> 
     4   <p
     5       <?php _e('<a href="http://codex.wordpress.org/">Documentation</a>'); ?> &#8212; <?php _e('<a href="http://wordpress.org/support/">Support Forums</a>'); ?> <br /
     6       <?php bloginfo('version'); ?> &#8212; <?php printf(__('%s seconds'), number_format(timer_stop(), 2)); ?
     7    </p> 
    88</div> 
    99<?php do_action('admin_footer', ''); ?> 
  • trunk/wp-admin/inline-uploading.php

    r4206 r4259  
    11<?php 
    2  
    32require_once('admin.php'); 
    4  
    5 header('Content-Type: text/html; charset=' . get_option('blog_charset')); 
     3@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); 
    64 
    75if (!current_user_can('upload_files')) 
     
    277275 
    278276default: 
    279 wp_die(__('This script was not meant to be called directly.')); 
     277   wp_die(__('This script was not meant to be called directly.')); 
    280278} 
    281279 
    282280?> 
    283281<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    284 <html xmlns="http://www.w3.org/1999/xhtml"
     282<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>
    285283<head> 
    286284<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 
     
    428426</script> 
    429427<style type="text/css"> 
    430 <?php if ( $action == 'links' ) : ?> 
    431 * html { overflow-x: hidden; } 
    432 <?php else : ?> 
    433 * html { overflow-y: hidden; } 
    434 <?php endif; ?> 
    435 body { 
    436     font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana; 
    437     border: none; 
    438     margin: 0px; 
    439     height: 150px; 
    440     background: #dfe8f1; 
    441 
    442 form { 
    443     margin: 3px 2px 0px 6px; 
    444 
    445 #wrap { 
    446     clear: both; 
    447     padding: 0px; 
    448     width: 100%; 
    449 
    450 #images { 
    451     position: absolute; 
    452     clear: both; 
    453     margin: 0px; 
    454     padding: 15px 15px; 
    455     width: <?php echo $images_width; ?>px; 
    456 
    457 #images img { 
    458     background-color: rgb(209, 226, 239); 
    459 
    460 <?php echo $style; ?> 
    461 .attwrap, .attwrap * { 
    462     margin: 0px; 
    463     padding: 0px; 
    464     border: 0px; 
    465 
    466 .imagewrap { 
    467     margin-right: 5px; 
    468     overflow: hidden; 
    469     width: 128px; 
    470 
    471 .otherwrap { 
    472     margin-right: 5px; 
    473     overflow: hidden; 
    474     background-color: #f9fcfe; 
    475 
    476 .otherwrap a { 
    477     display: block; 
    478 
    479 .otherwrap a, .otherwrap a:hover, .otherwrap a:active, .otherwrap a:visited { 
    480     color: blue; 
    481 
    482 .usingicon { 
    483     padding: 0px; 
    484     height: 96px; 
    485     text-align: center; 
    486     width: 128px; 
    487 
    488 .usingtext { 
    489     padding: 3px; 
    490     height: 90px; 
    491     text-align: left; 
    492     width: 122px; 
    493 
    494 .filetype { 
    495     font-size: 80%; 
    496     border-bottom: 3px double #89a 
    497 
    498 .imagewrap, .imagewrap img, .imagewrap a, .imagewrap a img, .imagewrap a:hover img, .imagewrap a:visited img, .imagewrap a:active img { 
    499     text-decoration: none; 
    500 
    501 #upload-menu { 
    502     background: #fff; 
    503     margin: 0px; 
    504     padding: 0; 
    505     list-style: none; 
    506     height: 2em; 
    507     border-bottom: 1px solid #448abd; 
    508     width: 100%; 
    509 
    510 #upload-menu li { 
    511     float: left; 
    512     margin: 0 0 0 .75em; 
    513 
    514 #upload-menu a { 
    515     display: block; 
    516     padding: 5px; 
    517     text-decoration: none; 
    518     color: #000; 
    519     border-top: 3px solid #fff; 
    520 
    521 #upload-menu .current a { 
    522     background: #dfe8f1; 
    523     border-right: 2px solid #448abd; 
    524 
    525 #upload-menu a:hover { 
    526     background: #dfe8f1; 
    527     color: #000; 
    528 
    529 .tip { 
    530     color: rgb(68, 138, 189); 
    531     padding: 2px 1em; 
    532 
    533 .inactive { 
    534     color: #fff; 
    535     padding: 1px 3px; 
    536 
    537 .left { 
    538     float: left; 
    539 
    540 .right { 
    541     float: right; 
    542 
    543 .center { 
    544     text-align: center; 
    545 
    546 #upload-menu li.spacer { 
    547     margin-left: 40px; 
    548 
    549 #title, #descr { 
    550     width: 99%; 
    551     margin-top: 1px; 
    552 
    553 th { 
    554     width: 4.5em; 
    555 
    556 #descr { 
    557     height: 36px; 
    558 
    559 #buttons { 
    560     margin-top: 2px; 
    561     text-align: right; 
    562 
    563 .popup { 
    564     margin: 4px 4px; 
    565     padding: 1px; 
    566     position: absolute; 
    567     width: 114px; 
    568     display: none; 
    569     background-color: rgb(240, 240, 238); 
    570     border-top: 2px solid #fff; 
    571     border-right: 2px solid #ddd; 
    572     border-bottom: 2px solid #ddd; 
    573     border-left: 2px solid #fff; 
    574     text-align: center; 
    575 
    576 .imagewrap .popup { 
    577     opacity: .90; 
    578     filter:alpha(opacity=90); 
    579 
    580 .otherwrap .popup { 
    581     padding-top: 20px; 
    582 
    583 .popup a, .popup a:visited, .popup a:active { 
    584     background-color: transparent; 
    585     display: block; 
    586     width: 100%; 
    587     text-decoration: none; 
    588     color: #246; 
    589 
    590 .popup a:hover { 
    591     background-color: #fff; 
    592     color: #000; 
    593 
    594 .caption { 
    595     text-align: center; 
    596 
    597 #submit { 
    598     margin: 1px; 
    599     width: 99%; 
    600 
    601 #submit input, #submit input:focus { 
    602     background: url( images/fade-butt.png ); 
    603     border: 3px double #999; 
    604     border-left-color: #ccc; 
    605     border-top-color: #ccc; 
    606     color: #333; 
    607     padding: 0.25em; 
    608 
    609 #submit input:active { 
    610     background: #f4f4f4; 
    611     border: 3px double #ccc; 
    612     border-left-color: #999; 
    613     border-top-color: #999; 
    614 
    615 .zerosize { 
    616     width: 0px; 
    617     height: 0px; 
    618     overflow: hidden; 
    619     position: absolute; 
    620 
    621 #links { 
    622     margin: 3px 8px; 
    623     line-height: 2em; 
    624 
    625 #links textarea { 
    626     width: 95%; 
    627     height: 4.5em; 
    628 
     428    <?php if ( $action == 'links' ) : ?> 
     429    * html { overflow-x: hidden; } 
     430    <?php else : ?> 
     431    * html { overflow-y: hidden; } 
     432    <?php endif; ?> 
     433 
     434    body { 
     435        font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana; 
     436        border: none; 
     437        margin: 0px; 
     438        height: 150px; 
     439        background: #dfe8f1; 
     440    } 
     441 
     442    form { margin: 3px 2px 0px 6px; } 
     443 
     444    #wrap { 
     445        clear: both; 
     446        padding: 0px; 
     447        width: 100%; 
     448    } 
     449 
     450    #images { 
     451        position: absolute; 
     452        clear: both; 
     453        margin: 0px; 
     454        padding: 15px 15px; 
     455        width: <?php echo $images_width; ?>px; 
     456    } 
     457 
     458    #images img { background-color: rgb(209, 226, 239); } 
     459 
     460    <?php echo $style; ?> 
     461 
     462    .attwrap, .attwrap * { 
     463        margin: 0px; 
     464        padding: 0px; 
     465        border: 0px; 
     466    } 
     467 
     468    .imagewrap { 
     469        margin-right: 5px; 
     470        overflow: hidden; 
     471        width: 128px; 
     472    } 
     473 
     474    .otherwrap { 
     475        margin-right: 5px; 
     476        overflow: hidden; 
     477        background-color: #f9fcfe; 
     478    } 
     479 
     480    .otherwrap a { display: block; } 
     481 
     482    .otherwrap a, .otherwrap a:hover, .otherwrap a:active, .otherwrap a:visited { color: blue; } 
     483 
     484    .usingicon { 
     485        padding: 0px; 
     486        height: 96px; 
     487        text-align: center; 
     488        width: 128px; 
     489    } 
     490 
     491    .usingtext { 
     492        padding: 3px; 
     493        height: 90px; 
     494        text-align: left; 
     495        width: 122px; 
     496    } 
     497 
     498    .filetype { 
     499        font-size: 80%; 
     500        border-bottom: 3px double #89a; 
     501    } 
     502 
     503    .imagewrap, .imagewrap img, .imagewrap a, .imagewrap a img, .imagewrap a:hover img, .imagewrap a:visited img, .imagewrap a:active img { text-decoration: none; } 
     504 
     505    #upload-menu { 
     506        background: #fff; 
     507        margin: 0px; 
     508        padding: 0; 
     509        list-style: none; 
     510        height: 2em; 
     511        border-bottom: 1px solid #448abd; 
     512        width: 100%; 
     513    } 
     514 
     515    #upload-menu li { 
     516        float: left; 
     517        margin: 0 0 0 .75em; 
     518    } 
     519 
     520    #upload-menu a { 
     521        display: block; 
     522        padding: 5px; 
     523        text-decoration: none; 
     524        color: #000; 
     525        border-top: 3px solid #fff; 
     526    } 
     527 
     528    #upload-menu .current a { 
     529        background: #dfe8f1; 
     530        border-right: 2px solid #448abd; 
     531    } 
     532 
     533    #upload-menu a:hover { 
     534        background: #dfe8f1; 
     535        color: #000; 
     536    } 
     537 
     538    .tip { 
     539        color: rgb(68, 138, 189); 
     540        padding: 2px 1em; 
     541    } 
     542 
     543    .inactive { 
     544        color: #fff; 
     545        padding: 1px 3px; 
     546    } 
     547 
     548    .left { float: left; } 
     549 
     550    .right { float: right; } 
     551 
     552    .center { text-align: center; } 
     553 
     554    #upload-menu li.spacer { margin-left: 40px; } 
     555 
     556    #title, #descr { 
     557        width: 99%; 
     558        margin-top: 1px; 
     559    } 
     560 
     561    th { 
     562        text-align: right; 
     563        width: 4.5em; 
     564    } 
     565 
     566    #descr { height: 36px; } 
     567 
     568    #buttons { 
     569        margin-top: 2px; 
     570        text-align: right; 
     571    } 
     572 
     573    .popup { 
     574        margin: 4px 4px; 
     575        padding: 1px; 
     576        position: absolute; 
     577        width: 114px; 
     578        display: none; 
     579        background-color: rgb(240, 240, 238); 
     580        border-top: 2px solid #fff; 
     581        border-right: 2px solid #ddd; 
     582        border-bottom: 2px solid #ddd; 
     583        border-left: 2px solid #fff; 
     584        text-align: center; 
     585    } 
     586 
     587    .imagewrap .popup { 
     588        opacity: .90; 
     589        filter:alpha(opacity=90); 
     590    } 
     591 
     592    .otherwrap .popup { padding-top: 20px; } 
     593 
     594    .popup a, .popup a:visited, .popup a:active { 
     595        background-color: transparent; 
     596        display: block; 
     597        width: 100%; 
     598        text-decoration: none; 
     599        color: #246; 
     600    } 
     601 
     602    .popup a:hover { 
     603        background-color: #fff; 
     604        color: #000; 
     605    } 
     606 
     607    .caption { text-align: center; } 
     608 
     609    #submit { 
     610        margin: 1px; 
     611        width: 99%; 
     612    } 
     613 
     614    #submit input, #submit input:focus { 
     615        background: url( images/fade-butt.png ); 
     616        border: 3px double #999; 
     617        border-left-color: #ccc; 
     618        border-top-color: #ccc; 
     619        color: #333; 
     620        padding: 0.25em; 
     621    } 
     622 
     623    #submit input:active { 
     624        background: #f4f4f4; 
     625        border: 3px double #ccc; 
     626        border-left-color: #999; 
     627        border-top-color: #999; 
     628    } 
     629 
     630    .zerosize { 
     631        width: 0px; 
     632        height: 0px; 
     633        overflow: hidden; 
     634        position: absolute; 
     635    } 
     636 
     637    #links { 
     638        margin: 3px 8px; 
     639        line-height: 2em; 
     640    } 
     641 
     642    #links textarea { 
     643        width: 95%; 
     644        height: 4.5em; 
     645    } 
    629646</style> 
     647<?php if ( ('rtl' == $wp_locale->text_direction) ): ?> 
     648<style type="text/css"> 
     649    body { font: 13px Tahoma, "Lucida Grande", "Lucida Sans Unicode", Verdana; } 
     650 
     651    .usingtext { text-align: right; } 
     652 
     653    th { text-align: left; } 
     654 
     655    .left, #upload-menu li { float: right; } 
     656 
     657    .right { float: left; } 
     658 
     659    .popup { 
     660        border-right: 2px solid #fff; 
     661        border-left: 2px solid #ddd; 
     662    } 
     663 
     664    #upload-menu .current a { 
     665        border-right: 0; 
     666        border-left: 2px solid #448abd; 
     667    } 
     668 
     669    #submit input, #submit input:focus { 
     670        border-left: 0; 
     671        border-right-color: #ccc; 
     672    } 
     673 
     674    #submit input:active { 
     675        border-left: 0; 
     676        border-right-color: #999; 
     677    } 
     678</style> 
     679<?php endif; ?>  
    630680</head> 
    631681<body> 
    632682<ul id="upload-menu"> 
    633 <li<?php echo $current_1; ?>><a href="<?php echo basename(__FILE__) . "?action=upload&amp;post=$post&amp;all=$all&amp;start=$start"; ?>"><?php _e('Upload'); ?></a></li> 
    634 <?php if ( $attachments = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE post_parent = '$post'") ) { ?> 
    635 <li<?php echo $current_2; ?>><a href="<?php echo basename(__FILE__) . "?action=view&amp;post=$post&amp;all=false"; ?>"><?php _e('Browse'); ?></a></li> 
    636 <?php } ?> 
    637 <?php if ($wpdb->get_var("SELECT count(ID) FROM $wpdb->posts WHERE post_type = 'attachment'")) { ?> 
    638 <li<?php echo $current_3; ?>><a href="<?php echo basename(__FILE__) . "?action=view&amp;post=$post&amp;all=true"; ?>"><?php _e('Browse All'); ?></a></li> 
    639 <?php } ?> 
    640 <li> </li> 
    641 <?php if ( $action == 'view' ) { ?> 
    642 <?php if ( false !== $back ) : ?> 
    643 <li class="spacer"><a href="<?php echo basename(__FILE__) . "?action=$action&amp;post=$post&amp;all=$all&amp;start=0"; ?>" title="<?php _e('First'); ?>">|&laquo;</a></li> 
    644 <li><a href="<?php echo basename(__FILE__) . "?action=$action&amp;post=$post&amp;all=$all&amp;start=$back"; ?>">&laquo; <?php _e('Back'); ?></a></li> 
    645 <?php else : ?> 
    646 <li class="inactive spacer">|&laquo;</li> 
    647 <li class="inactive">&laquo; <?php _e('Back'); ?></li> 
    648 <?php endif; ?> 
    649 <?php if ( false !== $next ) : ?> 
    650 <li><a href="<?php echo basename(__FILE__) . "?action=$action&amp;post=$post&amp;all=$all&amp;start=$next"; ?>"><?php _e('Next &raquo;'); ?></a></li> 
    651 <li><a href="<?php echo basename(__FILE__) . "?action=$action&amp;post=$post&amp;all=$all&amp;last=true"; ?>" title="<?php _e('Last'); ?>">&raquo;|</a></li> 
    652 <?php else : ?> 
    653 <li class="inactive"><?php _e('Next &raquo;'); ?></li> 
    654 <li class="inactive">&raquo;|</li> 
    655 <?php endif; ?> 
    656 <?php } // endif not upload?> 
     683    <li<?php echo $current_1; ?>><a href="<?php echo basename(__FILE__) . "?action=upload&amp;post=$post&amp;all=$all&amp;start=$start"; ?>"><?php _e('Upload'); ?></a></li> 
     684 
     685    <?php if ( $attachments = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE post_parent = '$post'") ): ?> 
     686        <li<?php echo $current_2; ?>><a href="<?php echo basename(__FILE__) . "?action=view&amp;post=$post&amp;all=false"; ?>"><?php _e('Browse'); ?></a></li> 
     687    <?php endif; ?> 
     688 
     689    <?php if ($wpdb->get_var("SELECT count(ID) FROM $wpdb->posts WHERE post_type = 'attachment'")): ?> 
     690        <li<?php echo $current_3; ?>><a href="<?php echo basename(__FILE__) . "?action=view&amp;post=$post&amp;all=true"; ?>"><?php _e('Browse All'); ?></a></li> 
     691    <?php endif; ?> 
     692 
     693    <li> </li> 
     694 
     695    <?php if ( $action == 'view' ): ?> 
     696        <?php if ( false !== $back ): ?> 
     697            <li class="spacer"><a href="<?php echo basename(__FILE__) . "?action=$action&amp;post=$post&amp;all=$all&amp;start=0"; ?>" title="<?php _e('First'); ?>">|&laquo;</a></li> 
     698            <li><a href="<?php echo basename(__FILE__) . "?action=$action&amp;post=$post&amp;all=$all&amp;start=$back"; ?>">&laquo; <?php _e('Back'); ?></a></li> 
     699        <?php else: ?> 
     700            <li class="inactive spacer">|&laquo;</li> 
     701            <li class="inactive">&laquo; <?php _e('Back'); ?></li> 
     702        <?php endif; ?> 
     703 
     704        <?php if ( false !== $next ): ?> 
     705            <li><a href="<?php echo basename(__FILE__) . "?action=$action&amp;post=$post&amp;all=$all&amp;start=$next"; ?>"><?php _e('Next &raquo;'); ?></a></li> 
     706            <li><a href="<?php echo basename(__FILE__) . "?action=$action&amp;post=$post&amp;all=$all&amp;last=true"; ?>" title="<?php _e('Last'); ?>">&raquo;|</a></li> 
     707        <?php else: ?> 
     708            <li class="inactive"><?php _e('Next &raquo;'); ?></li> 
     709            <li class="inactive">&raquo;|</li> 
     710        <?php endif; ?> 
     711    <?php endif; ?> 
    657712</ul> 
    658 <?php if ( $action == 'view' ) : ?> 
    659 <div id="wrap"> 
    660 <!--<div class="tip"><?php _e('You can drag and drop these items into your post. Click on one for more options.'); ?></div>--> 
    661 <div id="images"> 
    662 <?php echo $html; ?> 
    663 <?php echo $popups; ?> 
    664 </div> 
    665 </div> 
    666 <?php elseif ( $action == 'upload' ) : ?> 
    667 <div class="tip"></div> 
    668 <form enctype="multipart/form-data" id="uploadForm" method="post" action="<?php echo basename(__FILE__); ?>"> 
    669 <table style="width:99%;"> 
    670 <tr> 
    671 <th scope="row" align="right"><label for="upload"><?php _e('File:'); ?></label></th> 
    672 <td><input type="file" id="upload" name="image" /></td> 
    673 </tr> 
    674 <tr> 
    675 <th scope="row" align="right"><label for="title"><?php _e('Title:'); ?></label></th> 
    676 <td><input type="text" id="title" name="imgtitle" /></td> 
    677 </tr> 
    678 <tr> 
    679 <th scope="row" align="right"><label for="descr"><?php _e('Description:'); ?></label></th> 
    680 <td><input type="textarea" name="descr" id="descr" value="" /></td> 
    681 </tr> 
    682 <tr id="buttons"> 
    683 <th></th> 
    684 <td> 
    685 <input type="hidden" name="action" value="save" /> 
    686 <input type="hidden" name="post" value="<?php echo $post; ?>" /> 
    687 <input type="hidden" name="all" value="<?php echo $all; ?>" /> 
    688 <input type="hidden" name="start" value="<?php echo $start; ?>" /> 
    689 <?php wp_nonce_field( 'inlineuploading' ); ?> 
    690 <div id="submit"> 
    691 <input type="submit" value="<?php _e('Upload'); ?>" /> 
    692 <?php if ( !empty($all) ) : ?> 
    693 <input type="button" value="<?php _e('Cancel'); ?>" onclick="cancelUpload()" /> 
    694 <?php endif; ?> 
    695 </div> 
    696 </td> 
    697 </tr> 
    698 </table> 
    699 </form> 
    700 <?php elseif ( $action == 'links' ) : ?> 
    701 <div id="links"> 
    702 <?php the_attachment_links($attachment); ?> 
    703 </div> 
     713 
     714<?php if ( $action == 'view' ): ?> 
     715    <div id="wrap"> 
     716        <!--<div class="tip"><?php _e('You can drag and drop these items into your post. Click on one for more options.'); ?></div>--> 
     717        <div id="images"> 
     718            <?php echo $html; ?> 
     719            <?php echo $popups; ?> 
     720        </div> 
     721    </div> 
     722<?php elseif ( $action == 'upload' ): ?> 
     723    <div class="tip"></div> 
     724    <form enctype="multipart/form-data" id="uploadForm" method="post" action="<?php echo basename(__FILE__); ?>"> 
     725        <table style="width: 99%"> 
     726            <tr> 
     727                <th scope="row"><label for="upload"><?php _e('File:'); ?></label></th> 
     728                <td><input type="file" id="upload" name="image" /></td> 
     729            </tr> 
     730            <tr> 
     731                <th scope="row"><label for="title"><?php _e('Title:'); ?></label></th> 
     732                <td><input type="text" id="title" name="imgtitle" /></td> 
     733            </tr> 
     734            <tr> 
     735                <th scope="row"><label for="descr"><?php _e('Description:'); ?></label></th> 
     736                <td><input type="textarea" name="descr" id="descr" value="" /></td> 
     737            </tr> 
     738            <tr id="buttons"> 
     739                <th></th> 
     740                <td> 
     741                    <input type="hidden" name="action" value="save" /> 
     742                    <input type="hidden" name="post" value="<?php echo $post; ?>" /> 
     743                    <input type="hidden" name="all" value="<?php echo $all; ?>" /> 
     744                    <input type="hidden" name="start" value="<?php echo $start; ?>" /> 
     745                    <?php wp_nonce_field( 'inlineuploading' ); ?> 
     746                    <div id="submit"> 
     747                        <input type="submit" value="<?php _e('Upload'); ?>" /> 
     748                        <?php if ( !empty($all) ): ?> 
     749                            <input type="button" value="<?php _e('Cancel'); ?>" onclick="cancelUpload()" /> 
     750                        <?php endif; ?> 
     751                    </div> 
     752                </td> 
     753            </tr> 
     754        </table> 
     755    </form> 
     756<?php elseif ( $action == 'links' ): ?> 
     757    <div id="links"> 
     758        <?php the_attachment_links($attachment); ?> 
     759    </div> 
    704760<?php endif; ?> 
    705761</body> 
  • trunk/wp-admin/install.php

    r4006 r4259  
    22define('WP_INSTALLING', true); 
    33if (!file_exists('../wp-config.php'))  
    4     die("There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://wordpress.org/docs/faq/#wp-config'>We got it</a>. You can <a href='setup-config.php'>create a <code>wp-config.php</code> file through a web interface</a>, but this doesn't work for all server setups. The safest way is to manually create the file."); 
     4   die("There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://codex.wordpress.org/Installing_WordPress#Step_3:_Set_up_wp-config.php'>We got it</a>. You can <a href='setup-config.php'>create a <code>wp-config.php</code> file through a web interface</a>, but this doesn't work for all server setups. The safest way is to manually create the file."); 
    55 
    66require_once('../wp-config.php'); 
     
    1414?> 
    1515<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    16 <html xmlns="http://www.w3.org/1999/xhtml"
     16<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>
    1717<head> 
     18    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    1819    <title><?php _e('WordPress &rsaquo; Installation'); ?></title> 
    19     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    20     <style media="screen" type="text/css"> 
    21     <!-- 
    22     html { 
    23         background: #eee; 
    24     } 
    25     body { 
    26         background: #fff; 
    27         color: #000; 
    28         font-family: Georgia, "Times New Roman", Times, serif; 
    29         margin-left: 20%; 
    30         margin-right: 20%; 
    31         padding: .2em 2em; 
    32     } 
    33  
    34     h1 { 
    35         color: #006; 
    36         font-size: 18px; 
    37         font-weight: lighter; 
    38     } 
    39  
    40     h2 { 
    41         font-size: 16px; 
    42     } 
    43  
    44     p, li, dt { 
    45         line-height: 140%; 
    46         padding-bottom: 2px; 
    47     } 
    48  
    49     ul, ol { 
    50         padding: 5px 5px 5px 20px; 
    51     } 
    52     #logo { 
    53         margin-bottom: 2em; 
    54     } 
    55     .step a, .step input { 
    56         font-size: 2em; 
    57     } 
    58     td input { 
    59         font-size: 1.5em; 
    60     } 
    61     .step, th { 
    62         text-align: right; 
    63     } 
    64     #footer { 
    65         text-align: center;  
    66         border-top: 1px solid #ccc;  
    67         padding-top: 1em;  
    68         font-style: italic; 
    69     } 
    70     --> 
    71     </style> 
     20    <link rel="stylesheet" href="install.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
     21    <?php if ( ('rtl' == $wp_locale->text_direction) ) : ?> 
     22    <link rel="stylesheet" href="install-rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
     23    <?php endif; ?> 
    7224</head> 
    7325<body> 
     
    7830 
    7931switch($step) { 
    80  
    8132    case 0: 
    8233?> 
    8334<p><?php printf(__('Welcome to WordPress installation. We&#8217;re now going to go through a few steps to get you up and running with the latest in personal publishing platforms. You may want to peruse the <a href="%s">ReadMe documentation</a> at your leisure.'), '../readme.html'); ?></p> 
    84    <h2 class="step"><a href="install.php?step=1"><?php _e('First Step &raquo;'); ?></a></h2> 
     35<h2 class="step"><a href="install.php?step=1"><?php _e('First Step &raquo;'); ?></a></h2> 
    8536<?php 
    86     break; 
    87  
     37        break; 
    8838    case 1: 
    89  
    9039?> 
    9140<h1><?php _e('First Step'); ?></h1> 
     
    9342 
    9443<form id="setup" method="post" action="install.php?step=2"> 
    95 <table width="100%"> 
    96 <tr> 
    97 <th width="33%"><?php _e('Weblog title:'); ?></th> 
    98 <td><input name="weblog_title" type="text" id="weblog_title" size="25" /></td> 
    99 </tr> 
    100 <tr> 
    101 <th><?php _e('Your e-mail:'); ?></th> 
    102     <td><input name="admin_email" type="text" id="admin_email" size="25" /></td> 
    103 </tr> 
    104 <tr> 
    105 <th scope="row"  valign="top"> <?php __('Privacy:'); ?></th> 
    106 <td><label><input type="checkbox" name="blog_public" value="1" checked="checked" /> <?php _e('I would like my blog to appear in search engines like Google and Technorati.'); ?></label></td> 
    107 </tr>  
    108 </table> 
    109 <p><em><?php _e('Double-check that email address before continuing.'); ?></em></p> 
    110 <h2 class="step"> 
    111 <input type="submit" name="Submit" value="<?php _e('Continue to Second Step &raquo;'); ?>" /> 
    112 </h2> 
     44    <table width="100%"> 
     45        <tr> 
     46            <th width="33%"><?php _e('Weblog title:'); ?></th> 
     47            <td><input name="weblog_title" type="text" id="weblog_title" size="25" /></td> 
     48        </tr> 
     49        <tr> 
     50            <th><?php _e('Your e-mail:'); ?></th> 
     51            <td><input name="admin_email" type="text" id="admin_email" size="25" /></td> 
     52        </tr> 
     53        <tr> 
     54            <th scope="row"  valign="top"> <?php __('Privacy:'); ?></th> 
     55            <td><label><input type="checkbox" name="blog_public" value="1" checked="checked" /> <?php _e('I would like my blog to appear in search engines like Google and Technorati.'); ?></label></td> 
     56        </tr> 
     57    </table> 
     58    <p><em><?php _e('Double-check that email address before continuing.'); ?></em></p> 
     59    <h2 class="step"><input type="submit" name="Submit" value="<?php _e('Continue to Second Step &raquo;'); ?>" /></h2> 
    11360</form> 
    11461 
    11562<?php 
    116     break; 
     63       break; 
    11764    case 2: 
    118  
    119 // Fill in the data we gathered 
    120 $weblog_title = stripslashes($_POST['weblog_title']); 
    121 $admin_email = stripslashes($_POST['admin_email']); 
    122 $public = (int) $_POST['blog_public']; 
    123 // check e-mail address 
    124 if (empty($admin_email)) { 
    125     die (__("<strong>ERROR</strong>: please type your e-mail address")); 
    126 } else if (!is_email($admin_email)) { 
    127     die (__("<strong>ERROR</strong>: the e-mail address isn't correct")); 
    128 
     65        // Fill in the data we gathered 
     66        $weblog_title = stripslashes($_POST['weblog_title']); 
     67        $admin_email = stripslashes($_POST['admin_email']); 
     68        $public = (int) $_POST['blog_public']; 
     69        // check e-mail address 
     70        if (empty($admin_email)) { 
     71            die(__("<strong>ERROR</strong>: please type your e-mail address")); 
     72        } else if (!is_email($admin_email)) { 
     73            die(__("<strong>ERROR</strong>: the e-mail address isn't correct")); 
     74        } 
    12975 
    13076?> 
     
    13480 
    13581<?php 
    136  
    137 $result = wp_install($weblog_title, __('admin'), $admin_email, $public); 
    138 extract($result); 
     82    $result = wp_install($weblog_title, __('admin'), $admin_email, $public); 
     83    extract($result); 
    13984?> 
    14085 
     
    14287 
    14388<p><?php printf(__('Now you can <a href="%1$s">log in</a> with the <strong>username</strong> "<code>admin</code>" and <strong>password</strong> "<code>%2$s</code>".'), '../wp-login.php', $password); ?></p> 
    144 <p><?php _e('<strong><em>Note that password</em></strong> carefully! It is a <em>random</em> password that was generated just for you. If you lose it, you will have to delete the tables from the database yourself, and re-install WordPress. So to review:'); ?> 
    145 </p> 
     89<p><?php _e('<strong><em>Note that password</em></strong> carefully! It is a <em>random</em> password that was generated just for you. If you lose it, you will have to delete the tables from the database yourself, and re-install WordPress. So to review:'); ?></p> 
     90 
    14691<dl> 
    147 <dt><?php _e('Username'); ?></dt> 
    148 <dd><code><?php _e('admin') ?></code></dd> 
    149 <dt><?php _e('Password'); ?></dt> 
    150 <dd><code><?php echo $password; ?></code></dd> 
     92   <dt><?php _e('Username'); ?></dt> 
     93       <dd><code><?php _e('admin') ?></code></dd> 
     94   <dt><?php _e('Password'); ?></dt> 
     95       <dd><code><?php echo $password; ?></code></dd> 
    15196    <dt><?php _e('Login address'); ?></dt> 
    152 <dd><a href="../wp-login.php">wp-login.php</a></dd> 
     97       <dd><a href="../wp-login.php">wp-login.php</a></dd> 
    15398</dl> 
    15499<p><?php _e('Were you expecting more steps? Sorry to disappoint. All done! :)'); ?></p> 
     100 
    155101<?php 
    156     break; 
     102       break; 
    157103} 
    158104?> 
     105 
    159106<p id="footer"><?php _e('<a href="http://wordpress.org/">WordPress</a>, personal publishing platform.'); ?></p> 
    160107</body> 
  • trunk/wp-admin/upgrade.php

    r3918 r4259  
    11<?php 
    22define('WP_INSTALLING', true); 
    3 if (!file_exists('../wp-config.php')) die("There doesn't seem to be a wp-config.php file. Double check that you updated wp-config-sample.php with the proper database connection information and renamed it to wp-config.php."); 
     3if (!file_exists('../wp-config.php')) 
     4    die("There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://codex.wordpress.org/Installing_WordPress#Step_3:_Set_up_wp-config.php'>We got it</a>. You can <a href='setup-config.php'>create a <code>wp-config.php</code> file through a web interface</a>, but this doesn't work for all server setups. The safest way is to manually create the file."); 
     5 
    46require('../wp-config.php'); 
    57timer_start(); 
    68require_once(ABSPATH . '/wp-admin/upgrade-functions.php'); 
    79 
    8 $step = $_GET['step']; 
    9 if (!$step) $step = 0; 
    10 header( 'Content-Type: text/html; charset=utf-8' ); 
     10if (isset($_GET['step'])) 
     11    $step = $_GET['step']; 
     12else 
     13    $step = 0; 
     14@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); 
    1115?> 
    1216<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    13 <html xmlns="http://www.w3.org/1999/xhtml"
     17<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>
    1418<head> 
    15     <title>WordPress &rsaquo; Upgrade</title> 
    16     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    17     <style media="screen" type="text/css"> 
    18     <!-- 
    19     html { 
    20         background: #eee; 
    21     } 
    22     body { 
    23         background: #fff; 
    24         color: #000; 
    25         font-family: Georgia, "Times New Roman", Times, serif; 
    26         margin-left: 20%; 
    27         margin-right: 20%; 
    28         padding: .2em 2em; 
    29     } 
    30  
    31     h1 { 
    32         color: #006; 
    33         font-size: 18px; 
    34         font-weight: lighter; 
    35     } 
    36  
    37     h2 { 
    38         font-size: 16px; 
    39     } 
    40  
    41     p, li, dt { 
    42         line-height: 140%; 
    43         padding-bottom: 2px; 
    44     } 
    45  
    46     ul, ol { 
    47         padding: 5px 5px 5px 20px; 
    48     } 
    49     #logo { 
    50         margin-bottom: 2em; 
    51     } 
    52 .step a, .step input { 
    53     font-size: 2em; 
    54 
    55 .step, th { 
    56     text-align: right; 
    57 
    58 #footer { 
    59 text-align: center; border-top: 1px solid #ccc; padding-top: 1em; font-style: italic; 
    60 
    61     --> 
    62     </style> 
     19    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 
     20    <title><?php _e('WordPress &rsaquo; Upgrade'); ?></title> 
     21    <link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/install.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
     22    <?php if ( ('rtl' == $wp_locale->text_direction) ) : ?> 
     23    <link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/install-rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
     24    <?php endif; ?> 
    6325</head> 
    6426<body> 
     
    6628<?php 
    6729switch($step) { 
    68  
    6930    case 0: 
    70     $goback = wp_specialchars(wp_get_referer()); 
     31       $goback = wp_specialchars(wp_get_referer()); 
    7132?>  
    7233<p><?php _e('This file upgrades you from any previous version of WordPress to the latest. It may take a while though, so be patient.'); ?></p>  
    73    <h2 class="step"><a href="upgrade.php?step=1&amp;backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress &raquo;'); ?></a></h2> 
     34<h2 class="step"><a href="upgrade.php?step=1&amp;backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress &raquo;'); ?></a></h2> 
    7435<?php 
    75     break; 
     36        break; 
     37    case 1: 
     38        wp_upgrade(); 
    7639 
    77     case 1: 
    78     wp_upgrade(); 
    79  
    80     if ( empty( $_GET['backto'] ) ) 
    81         $backto = __get_option('home'); 
    82     else 
    83         $backto = wp_specialchars( $_GET['backto'] , 1 ); 
     40        if ( empty( $_GET['backto'] ) ) 
     41            $backto = __get_option('home'); 
     42        else 
     43            $backto = wp_specialchars( $_GET['backto'] , 1 ); 
    8444<