Changeset 4196
- Timestamp:
- 09/19/2006 06:11:42 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/index.php
r4130 r4196 11 11 <div class="wrap"> 12 12 13 <h2><?php _e(' Dashboard'); ?></h2>13 <h2><?php _e('Welcome to WordPress'); ?></h2> 14 14 15 15 <div id="zeitgeist"> … … 114 114 </div> 115 115 116 <h3><?php _e('Welcome to WordPress'); ?></h3>117 118 116 <p><?php _e('Use these links to get started:'); ?></p> 119 117 … … 130 128 <?php endif; ?> 131 129 </ul> 132 133 <p><?php _e("Below is the latest news from the official WordPress development blog, click on a title to read the full entry. If you need help with WordPress please see our <a href='http://codex.wordpress.org/'>great documentation</a> or if that doesn't help visit the <a href='http://wordpress.org/support/'>support forums</a>."); ?></p> 130 <p><?php _e("Need help with WordPress? Please see our <a href='http://codex.wordpress.org/'>documentation</a> or visit the <a href='http://wordpress.org/support/'>support forums</a>."); ?></p> 134 131 <?php 135 132 $rss = @fetch_rss('http://wordpress.org/development/feed/'); 136 133 if ( isset($rss->items) && 0 != count($rss->items) ) { 137 134 ?> 138 <h3><?php _e('WordPress Development Blog'); ?></h3>135 <h3><?php _e('WordPress Development News'); ?></h3> 139 136 <?php 140 137 $rss->items = array_slice($rss->items, 0, 3); -
trunk/wp-admin/options-discussion.php
r4161 r4196 6 6 7 7 include('admin-header.php'); 8 9 if ($action == 'retrospam') {10 if ( $_GET['move'] == 'true' ) {11 retrospam_mgr::move_spam( $_GET[ids] );12 }13 $retrospaminator = new retrospam_mgr();14 $result = $retrospaminator->find_spam();15 echo $retrospaminator->display_edit_form( $result );16 include('./admin-footer.php');17 exit;18 }19 8 ?> 20 9 … … 23 12 <form method="post" action="options.php"> 24 13 <?php wp_nonce_field('update-options') ?> 14 <p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /></p> 25 15 <fieldset class="options"> 26 16 <legend><?php _e('Usual settings for an article:<br /><small><em>(These settings may be overridden for individual articles.)</em></small>') ?></legend> … … 64 54 <label for="comment_moderation"> 65 55 <input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked('1', get_option('comment_moderation')); ?> /> 66 <?php _e('An administrator must a pprove the comment (regardless of any matches below)') ?> </label>56 <?php _e('An administrator must always approve the comment') ?> </label> 67 57 </li> 68 58 <li><label for="require_name_email"><input type="checkbox" name="require_name_email" id="require_name_email" value="1" <?php checked('1', get_option('require_name_email')); ?> /> <?php _e('Comment author must fill out name and e-mail') ?></label></li> … … 74 64 <p><?php printf(__('Hold a comment in the queue if it contains more than %s links. (A common characteristic of comment spam is a large number of hyperlinks.)'), '<input name="comment_max_links" type="text" id="comment_max_links" size="3" value="' . get_option('comment_max_links'). '" />' ) ?></p> 75 65 76 <p><?php _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, hold it in the moderation queue: (Separate multiple words with new lines.) <a href="http://codex.wordpress.org/Spam_Words">Common spam words</a>.') ?></p>66 <p><?php _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be held in the <a href="moderation.php">moderation queue</a>. One word or IP per line. It will match inside words, so "press" will match "WordPress".') ?></p> 77 67 <p> 78 68 <textarea name="moderation_keys" cols="60" rows="4" id="moderation_keys" style="width: 98%; font-size: 12px;" class="code"><?php form_option('moderation_keys'); ?></textarea> 79 </p>80 <p>81 <a id="retrospambutton" href="options-discussion.php?action=retrospam"><?php _e('Check past comments against moderation list'); ?></a>82 69 </p> 83 70 </fieldset> 84 71 <fieldset class="options"> 85 72 <legend><?php _e('Comment Blacklist') ?></legend> 86 <p><?php _e(' This is a list of words that you want completely blacklisted from your blog. Be very careful what you add here, because if a comment matches something here it will be completely nuked and there will be no notification. Remember that partial words can match, so if there is any chance something here might match it would be better to put it in the moderation box above.') ?></p>73 <p><?php _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be deleted. One word or IP per line. It will match inside words, so "press" will match "WordPress".') ?></p> 87 74 <p> 88 75 <textarea name="blacklist_keys" cols="60" rows="4" id="blacklist_keys" style="width: 98%; font-size: 12px;" class="code"><?php form_option('blacklist_keys'); ?></textarea> 89 76 </p> 90 <p><label for="open_proxy_check">91 <input name="open_proxy_check" type="checkbox" id="open_proxy_check" value="1" <?php checked('1', get_option('open_proxy_check')); ?> />92 <?php _e('Blacklist comments from open and insecure proxies.') ?></label></p>93 77 </fieldset> 94 78 <p class="submit"> -
trunk/wp-admin/options-general.php
r4144 r4196 12 12 <form method="post" action="options.php"> 13 13 <?php wp_nonce_field('update-options') ?> 14 <p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /></p> 14 15 <table class="optiontable"> 15 16 <tr valign="top"> … … 65 66 <th scope="row"><?php _e('Times in the weblog should differ by:') ?> </th> 66 67 <td><input name="gmt_offset" type="text" id="gmt_offset" size="2" value="<?php form_option('gmt_offset'); ?>" /> 67 <?php _e('hours') ?> </td>68 <?php _e('hours') ?> (<?php _e('Your timezone offset, for example <code>-6</code> for Central Time.'); ?>)</td> 68 69 </tr> 69 70 <tr> -
trunk/wp-admin/options-misc.php
r4144 r4196 13 13 <form method="post" action="options.php"> 14 14 <?php wp_nonce_field('update-options') ?> 15 <p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /></p> 15 16 <fieldset class="options"> 16 17 <legend><?php _e('Uploading'); ?></legend> -
trunk/wp-admin/options-permalink.php
r4144 r4196 103 103 <div class="wrap"> 104 104 <h2><?php _e('Customize Permalink Structure') ?></h2> 105 <form name="form" action="options-permalink.php" method="post"> 106 <?php wp_nonce_field('update-permalink') ?> 107 <p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /></p> 105 108 <p><?php _e('By default WordPress uses web <abbr title="Universal Resource Locator">URL</abbr>s which have question marks and lots of numbers in them, however WordPress offers you the ability to create a custom URL structure for your permalinks and archives. This can improve the aesthetics, usability, and forward-compatibility of your links. A <a href="http://codex.wordpress.org/Using_Permalinks">number of tags are available</a>, and here are some examples to get you started.'); ?></p> 106 109 … … 117 120 ); 118 121 ?> 119 <form name="form" action="options-permalink.php" method="post">120 <?php wp_nonce_field('update-permalink') ?>121 122 <h3><?php _e('Common options:'); ?></h3> 122 123 <p> -
trunk/wp-admin/options-privacy.php
r4165 r4196 16 16 <th scope="row"><?php _e('Blog visibility:') ?> </th> 17 17 <td> 18 <input id="blog-public" type="radio" name="blog_public" value="1" <?php checked('1', get_option('blog_public')); ?> /> 19 <label for="blog-public"><?php _e('I would like my blog to be visible to anyone who visits, including search engines and archivers') ?></label> 20 <br /> 21 <input id="blog-norobots" type="radio" name="blog_public" value="0" <?php checked('0', get_option('blog_public')); ?> /> 22 <label for="blog-norobots"><?php _e('I would like to block search engines, but allow normal folks') ?></label> 18 <p><input id="blog-public" type="radio" name="blog_public" value="1" <?php checked('1', get_option('blog_public')); ?> /> 19 <label for="blog-public"><?php _e('I would like my blog to be visible to everyone, including search engines (like Google, Sphere, Technorati) and archivers');?></label></p> 20 <p><input id="blog-norobots" type="radio" name="blog_public" value="0" <?php checked('0', get_option('blog_public')); ?> /> 21 <label for="blog-norobots"><?php _e('I would like to block search engines, but allow normal visitors'); ?></label></p> 23 22 <?php do_action('blog_privacy_selector'); ?> 24 23 </td> -
trunk/wp-admin/options-reading.php
r4144 r4196 12 12 <form name="form1" method="post" action="options.php"> 13 13 <?php wp_nonce_field('update-options') ?> 14 14 <p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /></p> 15 15 <?php if ( get_pages() ): ?> 16 16 <fieldset class="options"> 17 17 <legend><?php _e('Front Page') ?></legend> 18 <table width="100%" cellspacing="2" cellpadding="5" class=" editform">18 <table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform"> 19 19 <tr valign="top"> 20 20 <th width="33%" scope="row"><?php _e('Front page displays:')?></th> 21 21 <td> 22 < label>22 <p><label> 23 23 <input name="show_on_front" type="radio" value="posts" class="tog" <?php checked('posts', get_option('show_on_front')); ?> /> 24 <?php _e(' Thelatest posts'); ?>24 <?php _e('Your latest posts'); ?> 25 25 </label> 26 < br />27 < label>26 </p> 27 <p><label> 28 28 <input name="show_on_front" type="radio" value="page" class="tog" <?php checked('page', get_option('show_on_front')); ?> /> 29 <?php printf(__('A static <a href="%s">page</a> (select below)'), 'edit-pages.php'); ?>29 <?php printf(__('A <a href="%s">static page</a> (select below)'), 'edit-pages.php'); ?> 30 30 </label> 31 </p> 31 32 <ul> 32 <li><?php printf(__(' Show this page on the front page: %s'), wp_dropdown_pages("name=page_on_front&echo=0&show_option_none=".__('- Select -')."&selected=" . get_option('page_on_front'))); ?></li>33 <li><?php printf(__(' Show the latest posts on this page: %s'), wp_dropdown_pages("name=page_for_posts&echo=0&show_option_none=".__('- Select -')."&selected=" . get_option('page_for_posts'))); ?></li>33 <li><?php printf(__('Front page: %s'), wp_dropdown_pages("name=page_on_front&echo=0&show_option_none=".__('- Select -')."&selected=" . get_option('page_on_front'))); ?></li> 34 <li><?php printf(__('Posts page: %s'), wp_dropdown_pages("name=page_for_posts&echo=0&show_option_none=".__('- Select -')."&selected=" . get_option('page_for_posts'))); ?></li> 34 35 </ul> 35 36 <?php if ( 'page' == get_option('show_on_front') && get_option('page_for_posts') == get_option('page_on_front') ) : ?> … … 49 50 <fieldset class="options"> 50 51 <legend><?php _e('Blog Pages') ?></legend> 51 <table width="100%" cellspacing="2" cellpadding="5" class=" editform">52 <table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform"> 52 53 <tr valign="top"> 53 54 <th width="33%" scope="row"><?php _e('Show at most:') ?></th> … … 65 66 <fieldset class="options"> 66 67 <legend><?php _e('Syndication Feeds') ?></legend> 67 <table width="100%" cellspacing="2" cellpadding="5" class=" editform">68 <table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform"> 68 69 <tr valign="top"> 69 70 <th width="33%" scope="row"><?php _e('Show the most recent:') ?></th> … … 73 74 <th scope="row"><?php _e('For each article, show:') ?> </th> 74 75 <td> 75 <label><input name="rss_use_excerpt" type="radio" value="0" <?php checked(0, get_option('rss_use_excerpt')); ?> /> <?php _e('Full text') ?></label><br /> 76 <label><input name="rss_use_excerpt" type="radio" value="1" <?php checked(1, get_option('rss_use_excerpt')); ?> /> <?php _e('Summary') ?></label> 76 <p><label><input name="rss_use_excerpt" type="radio" value="0" <?php checked(0, get_option('rss_use_excerpt')); ?> /> <?php _e('Full text') ?></label><br /> 77 <label><input name="rss_use_excerpt" type="radio" value="1" <?php checked(1, get_option('rss_use_excerpt')); ?> /> <?php _e('Summary') ?></label></p> 78 <p><?php _e('Note: If you use the <code><--more--></code> feature, it will cut off posts in RSS feeds.'); ?></p> 77 79 </td> 78 80 </tr> 79 81 </table> 80 82 </fieldset> 81 <table width="100%" cellspacing="2" cellpadding="5" class=" editform">83 <table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform"> 82 84 <tr valign="top"> 83 85 <th width="33%" scope="row"><?php _e('Encoding for pages and feeds:') ?></th> -
trunk/wp-admin/options-writing.php
r4144 r4196 12 12 <form method="post" action="options.php"> 13 13 <?php wp_nonce_field('update-options') ?> 14 <table width="100%" cellspacing="2" cellpadding="5" class="editform"> 14 <p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /></p> 15 <table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform"> 15 16 <tr valign="top"> 16 17 <th width="33%" scope="row"> <?php _e('Size of the post box:') ?></th> … … 58 59 59 60 <fieldset class="options"> 60 <legend><?php _e(' Writing bye-mail') ?></legend>61 <legend><?php _e('Post via e-mail') ?></legend> 61 62 <p><?php printf(__('To post to WordPress by e-mail you must set up a secret e-mail account with POP3 access. Any mail received at this address will be posted, so it’s a good idea to keep this address very secret. Here are three random strings you could use: <code>%s</code>, <code>%s</code>, <code>%s</code>.'), substr(md5(uniqid(microtime())),0,5), substr(md5(uniqid(microtime())),0,5), substr(md5(uniqid(microtime())),0,5)) ?></p> 62 63 63 <table width="100%" cellspacing="2" cellpadding="5" class=" editform">64 <table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform"> 64 65 <tr valign="top"> 65 66 <th scope="row"><?php _e('Mail server:') ?></th> … … 80 81 </tr> 81 82 <tr valign="top"> 82 <th scope="row"><?php _e('Default post bymail category:') ?></th>83 <th scope="row"><?php _e('Default mail category:') ?></th> 83 84 <td><select name="default_email_category" id="default_email_category"> 84 85 <?php -
trunk/wp-admin/profile.php
r4112 r4196 94 94 <fieldset> 95 95 <legend><?php _e('About Yourself'); ?></legend> 96 <p class="desc"><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?></p>96 <p class="desc"><?php _e('Share a little biographical information. '); ?></p> 97 97 <p><textarea name="description" rows="5" cols="30"><?php echo $profileuser->description ?></textarea></p> 98 98 </fieldset> -
trunk/wp-admin/upgrade-schema.php
r4076 r4196 207 207 add_option('blacklist_keys'); 208 208 add_option('comment_registration', 0); 209 add_option('open_proxy_check', 0);210 209 add_option('rss_language', 'en'); 211 210 add_option('html_type', 'text/html'); -
trunk/wp-admin/users.php
r4192 r4196 409 409 <?php endif; ?> 410 410 411 <h 2><?php _e('Update Users'); ?></h2>411 <h3><?php _e('Update Selected'); ?></h3> 412 412 <ul style="list-style:none;"> 413 413 <li><input type="radio" name="action" id="action0" value="delete" /> <label for="action0"><?php _e('Delete checked users.'); ?></label></li> -
trunk/wp-admin/wp-admin.css
r4124 r4196 119 119 120 120 fieldset.options legend { 121 font-size: 16px; 121 font-size: 1.5em; 122 font-weight: bold; 123 font-family: Georgia, "Times New Roman", Times, serif; 122 124 } 123 125 … … 332 334 width: 33%; 333 335 text-align: right; 336 font-size: 1.3em; 337 font-weight: normal; 334 338 } 335 339 … … 394 398 395 399 #adminmenu { 396 background: # 6da6d1;400 background: #83B4D8; 397 401 border-top: 3px solid #448abd; 398 402 margin: 0; 399 padding: .2em .2em . 2em 2em;403 padding: .2em .2em .3em 2em; 400 404 } 401 405 402 406 #adminmenu .current, #submenu .current { 403 407 font-weight: bold; 408 text-decoration: none; 404 409 } 405 410 … … 410 415 margin: 0; 411 416 padding: 3px 5px; 412 text-decoration: none; 413 } 414 415 #adminmenu a:hover, .current { 417 text-decoration: underline; 418 border-bottom: none; 419 } 420 421 #adminmenu a:hover, #adminmenu a.current { 416 422 background: #ddeaf4; 417 423 color: #333; … … 917 923 float: left; 918 924 width: 40%; 919 padding: .5em 2em ;925 padding: .5em 2em 1em; 920 926 margin: 1em 1em 1em 0; 921 927 } -
trunk/wp-content/themes/default/functions.php
r4144 r4196 374 374 <input type="button" name="revert" value="Revert" onclick="kRevert()" /> 375 375 <input type="button" value="Advanced" onclick="toggleAdvanced()" /> 376 <input type="submit" name="submitform" class="defbutton" value="Save" onclick="cp.hidePopup('prettyplease')" />377 376 <input type="hidden" name="action" value="save" /> 378 377 <input type="hidden" name="fontdisplay" id="fontdisplay" value="<?php echo kubrick_header_display(); ?>" /> … … 381 380 <input type="hidden" name="lowercolor" id="lowercolor" value="<?php echo kubrick_lower_color(); ?>" /> 382 381 <input type="hidden" name="headerimage" id="headerimage" value="<?php echo kubrick_header_image(); ?>" /> 382 <p class="submit"><input type="submit" name="submitform" class="defbutton" value="<?php _e('Update Header »'); ?>" onclick="cp.hidePopup('prettyplease')" /></p> 383 383 </form> 384 384 <div id="colorPickerDiv" style="z-index: 100;background:#eee;border:1px solid #ccc;position:absolute;visibility:hidden;"> </div> -
trunk/wp-includes/classes.php
r4195 r4196 1 1 <?php 2 3 class retrospam_mgr {4 var $spam_words;5 var $comments_list;6 var $found_comments;7 8 function retrospam_mgr() {9 global $wpdb;10 11 $list = explode("\n", get_option('moderation_keys') );12 $list = array_unique( $list );13 $this->spam_words = $list;14 15 $this->comment_list = $wpdb->get_results("SELECT comment_ID AS ID, comment_content AS text, comment_approved AS approved, comment_author_url AS url, comment_author_ip AS ip, comment_author_email AS email FROM $wpdb->comments ORDER BY comment_ID ASC");16 } // End of class constructor17 18 function move_spam( $id_list ) {19 global $wpdb;20 $cnt = 0;21 $id_list = explode( ',', $id_list );22 23 foreach ( $id_list as $comment ) {24 if ( $wpdb->query("update $wpdb->comments set comment_approved = '0' where comment_ID = '$comment'") ) {25 $cnt++;26 }27 }28 echo "<div class='updated'><p> ";29 printf(__('%d comment(s) moved to the moderation queue.'), $cnt);30 echo "</p></div>\n";31 } // End function move_spam32 33 function find_spam() {34 $in_queue = 0;35 36 foreach( $this->comment_list as $comment ) {37 if( $comment->approved == 1 ) {38 foreach( $this->spam_words as $word ) {39 $word = trim($word);40 if ( empty( $word ) )41 continue;42 $fulltext = strtolower($comment->email.' '.$comment->url.' '.$comment->ip.' '.$comment->text);43 if( false !== strpos( $fulltext, strtolower($word) ) ) {44 $this->found_comments[] = $comment->ID;45 break;46 }47 }48 } else {49 $in_queue++;50 }51 }52 return array( 'found' => $this->found_comments, 'in_queue' => $in_queue );53 } // End function find_spam54 55 function display_edit_form( $counters ) {56 $numfound = count($counters[found]);57 $numqueue = $counters[in_queue];58 59 $body = '<p>' . sprintf(__('Suspected spam comments: %s'), "<strong>$numfound</strong>") . '</p>';60 61 if ( count($counters[found]) > 0 ) {62 $id_list = implode( ',', $counters[found] );63 $body .= '<p><a href="options-discussion.php?action=retrospam&move=true&ids='.$id_list.'">'. __('Move suspect comments to moderation queue »') . '</a></p>';64 65 }66 $head = '<div class="wrap"><h2>' . __('Check Comments Results:') . '</h2>';67 68 $foot .= '<p><a href="options-discussion.php">' . __('« Return to Discussion Options page.') . '</a></p></div>';69 70 return $head . $body . $foot;71 } // End function display_edit_form72 73 }74 2 75 3 class WP { -
trunk/wp-includes/comment.php
r4186 r4196 256 256 if ( preg_match($pattern, $user_ip ) ) return true; 257 257 if ( preg_match($pattern, $user_agent) ) return true; 258 }259 260 if ( isset($_SERVER['REMOTE_ADDR']) ) {261 if ( wp_proxy_check($_SERVER['REMOTE_ADDR']) ) return true;262 258 } 263 259 -
trunk/wp-includes/functions.php
r4194 r4196 1003 1003 } 1004 1004 1005 function wp_proxy_check($ipnum) {1006 if ( get_option('open_proxy_check') && isset($ipnum) ) {1007 $ipnum = preg_replace( '/([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*/', '$1', $ipnum );1008 $rev_ip = implode( '.', array_reverse( explode( '.', $ipnum ) ) );1009 $lookup = $rev_ip . '.sbl-xbl.spamhaus.org.';1010 if ( $lookup != gethostbyname( $lookup ) )1011 return true;1012 }1013 1014 return false;1015 }1016 1017 1005 function wp_explain_nonce($action) { 1018 1006 if ( $action !== -1 && preg_match('/([a-z]+)-([a-z]+)(_(.+))?/', $action, $matches) ) {
Note: See TracChangeset
for help on using the changeset viewer.