Make WordPress Core


Ignore:
Timestamp:
09/28/2006 05:35:59 PM (18 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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>
Note: See TracChangeset for help on using the changeset viewer.