Make WordPress Core

Changeset 1074


Ignore:
Timestamp:
04/15/2004 07:53:45 AM (22 years ago)
Author:
saxmatt
Message:

The great option REMIX.

Location:
trunk/wp-admin
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options-general.php

    r1072 r1074  
    9292      <tr>
    9393        <th scope="row">&nbsp;</th>
    94         <td>The following use the same syntax as the <a href="http://php.net/date">PHP <code>date()</code> function</a>. </td>
     94        <td>The following use the same syntax as the <a href="http://php.net/date">PHP <code>date()</code> function</a>. Save option to update sample output. </td>
    9595        </tr>
    9696      <tr>
    9797        <th scope="row">Default date format:</th>
    98         <td><input name="date_format" type="text" id="date_format" size="30" value="<?php echo get_settings('date_format'); ?>" /></td>
     98        <td><input name="date_format" type="text" id="date_format" size="30" value="<?php echo get_settings('date_format'); ?>" /><br />
     99Output: <strong><?php echo date(get_settings('date_format'), current_time('timestamp')); ?></strong></td>
    99100        </tr>
    100101      <tr>
    101102        <th scope="row">Default time format:</th>
    102         <td><input name="time_format" type="text" id="time_format" size="30" value="<?php echo get_settings('time_format'); ?>" /></td>
     103        <td><input name="time_format" type="text" id="time_format" size="30" value="<?php echo get_settings('time_format'); ?>" /><br />
     104Output: <strong><?php echo date(get_settings('time_format'), current_time('timestamp')); ?></strong></td>
    103105        </tr>
    104106</table>
  • trunk/wp-admin/options-head.php

    r1058 r1074  
    2424    <li><a href="options-discussion.php">Discussion</a></li>
    2525    <li><a href="options-misc.php">Miscellaneous</a></li>
     26    <li><a href="options-permalink.php">Permalinks</a></li>
    2627    $groups
    27     <li class="last"><a href="options-permalink.php">Permalinks</a></li>
    2828</ul>
    2929END;
     
    3434    if (substr($_SERVER['REQUEST_URI'], -8) == substr($url[1], -8)) {
    3535        $subline = str_replace('a hr', 'a class="current" hr', $subline);
    36         if ($_SERVER["REQUEST_URI"] == $url[1]) {
     36        if (str_replace('/wp-admin/', '', $_SERVER["REQUEST_URI"]) == $url[1]) {
    3737            $subline = preg_replace('|href=".*?"|', '', $subline);
    3838        }
  • trunk/wp-admin/options-misc.php

    r1058 r1074  
    4545  <form name="form1" method="post" action="options.php">
    4646    <input type="hidden" name="action" value="update" />
    47     <input type="hidden" name="action" value="update" />        <input type="hidden" name="page_options" value="'hack_file' " />
     47    <input type="hidden" name="action" value="update" />        <input type="hidden" name="page_options" value="'hack_file','use_fileupload','fileupload_realpath','fileupload_url','fileupload_allowedtypes','fileupload_maxk','fileupload_maxk'" />
     48<fieldset class="options">
     49<legend>File Uploads</legend>
     50    <table width="100%" cellspacing="2" cellpadding="5" class="editform">
     51      <tr valign="top">
     52        <th scope="row"><label for="use_fileupload">Allow file uploads:</label></th>
     53        <td>
     54            <input name="use_fileupload" type="checkbox" id="use_fileupload" value="1" <?php checked('1', get_settings('use_fileupload')); ?> />
     55       </td>
     56      </tr>
     57      <tr valign="top">
     58        <th width="33%" scope="row"> Destination directory: </th>
     59        <td>
     60            <input name="fileupload_realpath" type="text" id="fileupload_realpath" value="<?php echo get_settings('fileupload_realpath'); ?>" size="50" /><br />
     61Recommended: <code><?php echo ABSPATH . 'wp-content'; ?></code>
     62 
     63            </td>
     64      </tr>
     65      <tr valign="top">
     66        <th scope="row">URI of this directory: </th>
     67        <td>         
     68            <input name="fileupload_url" type="text" id="fileupload_url" value="<?php echo get_settings('fileupload_url'); ?>" size="50" /><br />
     69Recommended: <code><?php echo get_settings('siteurl') . '/wp-content'; ?></code>
     70        </td>
     71      </tr>
     72      <tr valign="top">
     73        <th scope="row">Maximum size: </th>
     74        <td><input name="fileupload_maxk" type="text" id="fileupload_maxk" value="<?php echo get_settings('fileupload_maxk'); ?>" size="4">
     75            Kilobytes (KB)</td>
     76        </tr>
     77      <tr valign="top">
     78        <th scope="row">Allowed file extensions:</th>
     79        <td><input name="fileupload_allowedtypes" type="text" id="fileupload_allowedtypes" value="<?php echo get_settings('fileupload_allowedtypes'); ?>" size="40">
     80            <br>
     81            Recommended: <code>jpg jpeg png gif </code></td>
     82        </tr>
     83      <tr valign="top">
     84        <th scope="row">Minimum level to upload:</th>
     85        <td><select name="fileupload_minlevel" id="fileupload_minlevel">
     86<?php
     87for ($i = 0; $i < 11; $i++) {
     88if ($i == get_settings('fileupload_minlevel')) $selected = " selected='selected'";
     89else $selected = '';
     90    echo "\n\t<option value='$i' $selected>$i</option>";
     91}
     92?>
     93            </select></td>
     94        </tr>
     95    </table>
     96</fieldset>
    4897        <p>
    4998            <label>
  • trunk/wp-admin/options-permalink.php

    r1058 r1074  
    6666    <li><code>%post_id%</code> --- The unique ID # of the post, for example <code>423</code> <strong></strong></li>
    6767  </ul>
    68   <p>So for example a value like <code>/archives/%year%/%monthnum%/%day%/%postname%/</code> could give you a permalink like <code>/archives/2003/05/23/my-cheese-sandwich/</code> . For this to work you'll need mod_rewrite installed on your server for the rule generation rule to work below. In the future there may be other options. </p>
     68  <p>So for example a value like </p>
     69  <p><code>/archives/%year%/%monthnum%/%day%/%postname%/</code> </p>
     70  <p>would give you a permalink like </p>
     71  <p><code>/archives/2003/05/23/my-cheese-sandwich/</code> . </p>
     72  <p> In general for this you must use mod_rewrite, however if you put a filename at the beginning WordPress will attempt to use that to pass the arguments, example:</p>
     73  <p><code>/index.php/archives/%year%/%monthnum%/%day%/%postname%/</code> </p>
     74  <p>If you use this option you can ignore the mod_rewrite rules. </p>
    6975  <form name="form" action="options-permalink.php" method="post">
    7076    <p>Use the template tags above to create a virtual site structure:</p>
     
    8793?>
    8894<form action"">
    89   <textarea rows="5" style="width: 100%;">RewriteEngine On
     95    <p>
     96        <textarea rows="5" style="width: 100%;">RewriteEngine On
    9097RewriteBase <?php echo $site_root; ?>
    9198<?php
     
    94101    echo 'RewriteRule ^' . $match . ' ' . $site_root . $query . " [QSA]\n";
    95102}
    96 ?></textarea>
     103?>
     104    </textarea>
     105    </p>
     106    <p>If your <code>.htaccess</code> file is writable by WordPress, you can <a href="templates.php?file=.htaccess">edit it through your template interface</a>.</p>
    97107</form>
    98108</div>
  • trunk/wp-admin/options-writing.php

    r1072 r1074  
    4646  <form name="form1" method="post" action="options.php">
    4747    <input type="hidden" name="action" value="update" />
    48     <input type="hidden" name="page_options" value="'default_post_edit_rows','blog_charset','use_smilies','use_balanceTags','advanced_edit','ping_sites'" />
     48    <input type="hidden" name="page_options" value="'default_post_edit_rows','blog_charset','use_smilies','use_balanceTags','advanced_edit','ping_sites','mailserver_url', 'mailserver_port',mailserver_login','mailserver_pass','default_category'" />
    4949    <table width="100%" cellspacing="2" cellpadding="5" class="editform">
    5050      <tr valign="top">
     
    104104            <tr valign="top">
    105105                <th scope="row">Usual category:</th>
    106                 <td>&nbsp;</td>
     106                <td><select name="default_category" id="default_category">
     107<?php
     108$categories = $wpdb->get_results("SELECT * FROM $tablecategories ORDER BY cat_name");
     109foreach ($categories as $category) :
     110if ($category->cat_ID == get_settings('default_category')) $selected = " selected='selected'";
     111else $selected = '';
     112    echo "\n\t<option value='$category->cat_ID' $selected>$category->cat_name</option>";
     113endforeach;
     114?>
     115                </select></td>
    107116            </tr>
    108117            </table>
  • trunk/wp-admin/upgrade-functions.php

    r1063 r1074  
    711711    $wpdb->query("DELETE FROM $tableoptiongroups WHERE group_id = 2");
    712712    $wpdb->query("DELETE FROM $tableoptiongroups WHERE group_id = 3");
     713    $wpdb->query("DELETE FROM $tableoptiongroups WHERE group_id = 4");
     714    $wpdb->query("DELETE FROM $tableoptiongroups WHERE group_id = 5");
    713715    $wpdb->query("DELETE FROM $tableoptiongroups WHERE group_id = 6");
    714716    $wpdb->query("DELETE FROM $tableoptiongroups WHERE group_id = 7");
     717
     718    $wpdb->query("UPDATE $tableoptiongroups SET group_name = 'Link Manager' WHERE group_id = 8");
     719    $wpdb->query("UPDATE $tableoptiongroups SET group_name = 'Geo-data' WHERE group_id = 9");
    715720
    716721    // Add blog_charset option
Note: See TracChangeset for help on using the changeset viewer.