Make WordPress Core

Changeset 949


Ignore:
Timestamp:
02/27/2004 05:48:00 AM (21 years ago)
Author:
saxmatt
Message:

Some new options and an option cleanup.

Location:
trunk/wp-admin
Files:
3 edited

Legend:

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

    r939 r949  
    4545?>
    4646 <ul id="adminmenu2">
    47     <li><a href="options-general.php">General</a></li>
    48     <li><a class="current">Writing</a></li>
     47  <li><a href="options-general.php">General</a></li>
     48  <li><a class="current">Writing</a></li>
    4949  <?php
    5050    //we need to iterate through the available option groups.
     
    6666  <h2>Writing Options</h2>
    6767  <form name="form1" method="post" action="options.php">
    68     <input type="hidden" name="action" value="update" /> <input type="hidden" name="page_options" value="'default_post_edit_rows','blog_charset','use_smilies','use_balanceTags'" />
     68    <input type="hidden" name="action" value="update" />
     69    <input type="hidden" name="page_options" value="'default_post_edit_rows','blog_charset','use_smilies','use_balanceTags','advanced_edit','ping_sites'" />
    6970    <table width="100%" cellspacing="2" cellpadding="5" class="editform">
    7071      <tr valign="top">
    7172        <th width="33%" scope="row"> Size of the writing box:</th>
    7273        <td><input name="default_post_edit_rows" type="text" id="default_post_edit_rows" value="<?php echo get_settings('default_post_edit_rows'); ?>" size="2" style="width: 1.5em; " />
    73         lines </td>
    74       </tr>
    75       <tr valign="top">
    76         <th scope="row">Character Setting: </th>
    77         <td><input name="blog_charset" type="text" id="blog_charset" value="<?php echo get_settings('blog_charset'); ?>" size="20" class="code" />
    78             <br />
    79     The charset you write your blog in (UTF-8 recommended<a href="http://developer.apple.com/documentation/macos8/TextIntlSvcs/TextEncodingConversionManager/TEC1.5/TEC.b0.html"></a>)</td>
    80       </tr>
     74          lines </td>
     75      </tr> 
     76      <tr valign="top"> 
     77        <th scope="row">Character Setting: </th> 
     78        <td><input name="blog_charset" type="text" id="blog_charset" value="<?php echo get_settings('blog_charset'); ?>" size="20" class="code" /> 
     79          <br />
     80          The charset you write your blog in (UTF-8 recommended<a href="http://developer.apple.com/documentation/macos8/TextIntlSvcs/TextEncodingConversionManager/TEC1.5/TEC.b0.html"></a>)</td>
     81      </tr> 
    8182    </table>
    82     <p><label for="use_smilies"><input name="use_smilies" type="checkbox" id="use_smilies" value="1" <?php checked('1', get_settings('use_smilies')); ?> />
    83  Convert emoticons like <code>:-)</code> and <code>:-P</code> to graphics</label>
    84           <label for="new_users_can_blog"></label></p>
    85     <p>
    86       <label for="use_balanceTags">
     83    <p>
     84      <label for="use_smilies">
     85      <input name="use_smilies" type="checkbox" id="use_smilies" value="1" <?php checked('1', get_settings('use_smilies')); ?> />
     86      Convert emoticons like <code>:-)</code> and <code>:-P</code> to graphics.</label>
     87    </p>
     88    <p>
     89      <label for="use_balanceTags">
    8790      <input name="use_balanceTags" type="checkbox" id="use_balanceTags" value="1" <?php checked('1', get_settings('use_balanceTags')); ?> />
    88       WordPress should correct invalidly nested XHTML automatically </label>
    89     </p>
    90     <p style="text-align: right;">
    91       <input type="submit" name="Submit" value="Update Options" />
    92     </p>
     91      WordPress should correct invalidly nested XHTML automatically.</label>
     92    </p>
     93    <p>
     94      <label for="advanced_edit">
     95      <input name="advanced_edit" type="checkbox" id="advanced_edit" value="1" <?php checked('1', get_settings('advanced_edit')); ?> />
     96      Compose posts using the advanced interface by default.</label>
     97    </p>
     98    <fieldset>
     99    <legend>Update Services</legend>
     100    <p>Enter the sites that you would like to notify when you publish a new post. For a list of some recommended sites to ping please see [LINK TO SOMETHING]. Seperate multiple URIs by line breaks.</p>
     101   
     102    <textarea name="ping_sites" id="ping_sites" style="width: 98%;"><?php echo get_settings('ping_sites'); ?></textarea>
     103    </fieldset>
     104    <p style="text-align: right;">
     105      <input type="submit" name="Submit" value="Update Options" />
     106    </p>
    93107  </form>
    94108</div>
  • trunk/wp-admin/post.php

    r945 r949  
    694694                $post_pingback = get_settings('default_pingback_flag');
    695695                $default_post_cat = get_settings('default_post_category');
    696                 include('edit-form.php');
     696
     697                if (get_settings('advanced_edit')) {
     698                    include('edit-form-advanced.php');
     699                } else {
     700                    include('edit-form.php');
     701                }
    697702            }
    698703?>
  • trunk/wp-admin/upgrade-functions.php

    r946 r949  
    652652function upgrade_101() {
    653653    global $wpdb, $tableoptionvalues, $tablelinkcategories, $tableposts, $tablecategories, $tablecomments, $tablelinks;
    654     // Fix possible duplicate problem from CVS
     654    // Fix possible duplicate problem from CVS, we can REMOVE this later
    655655    $option59 = $wpdb->get_results("SELECT * FROM $tableoptionvalues WHERE option_id  = '59'");
    656656    if (1 < count($option59)) {
     
    673673}
    674674
     675
    675676function upgrade_110() {
    676677  global $wpdb, $tableusers, $tablecomments, $tableposts, $tableoptiongroups, $tableoptiongroup_options, $tableoptions, $tablepostmeta;
     
    709710
    710711    // Add blog_charset option
    711     if(!$wpdb->get_var("SELECT * FROM $tableoptions WHERE option_id = '93'")) {
    712         $wpdb->query("INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level) VALUES (93, 'blog_charset', 3, 'utf-8', 'Your blog&#8217;s charset (here&#8217;s a <a href=\"http://developer.apple.com/documentation/macos8/TextIntlSvcs/TextEncodingConversionManager/TEC1.5/TEC.b0.html\">list of possible charsets</a>)', 8)");
     712    if(!$wpdb->get_var("SELECT option_id FROM $tableoptions WHERE option_name = 'blog_charset'")) {
     713        $wpdb->query("INSERT INTO $tableoptions (option_name, option_type, option_value, option_admin_level) VALUES ('blog_charset', 3, 'utf-8', 8)");
    713714    }
    714715
     
    768769    ");
    769770
     771    // First we need to enlarge option_value so it can hold larger values:
     772    $wpdb->query("ALTER TABLE `$tableoptions` CHANGE `option_value` `option_value` TEXT NOT NULL");
     773   
     774    // Now an option for blog pinging
     775    if(!$wpdb->get_var("SELECT option_id FROM $tableoptions WHERE option_name = 'ping_sites'")) {
     776        $wpdb->query("INSERT INTO $tableoptions (option_name, option_type, option_value, option_admin_level) VALUES ('ping_sites', 3, '', 8)");
     777    }
     778   
     779    // Option for using the advanced edit screen by default
     780    if(!$wpdb->get_var("SELECT option_id FROM $tableoptions WHERE option_name = 'advanced_edit'")) {
     781        $wpdb->query("INSERT INTO $tableoptions (option_name, option_type, option_value, option_admin_level) VALUES ('advanced_edit', 3, '0', 8)");
     782    }
    770783}
    771784
Note: See TracChangeset for help on using the changeset viewer.