“英文” 标签页面:

  • WordPress取消英文标点符号自动替换中文标点符号的优雅方法

    众所周知,WordPress中文版有个特性,会将每一处英文引号("")都稀里哗啦转化为中文引号(“”)。不仅仅是英文引号,在WordPress翻译文件定义了不少自动转换符号,具体可以参考这里

    对文字博客来说,这是个好功能,这样会避免用错英文标点。

    然而,WordPress是独立的php程序,中文社区中懂得使用者,大部分都是技术博客。而技术博客会经常贴出代码,里面包含各种英文标点是再正常不过的事情。这时候,英文标点符号自动转换就是一个恼人的画蛇添足功能了。

    网上很多文章都是让该WordPress核心文件。只不过,WordPress是一个高度模块化的系统,肯定有更优雅的解决方案。

    一番搜寻之后,发现最简单的办法,就是安装一个叫Quotmarks Replacer的插件,地址在这里

    插件很简单,就是将WordPress自动转换标点符号的函数用系统接口去掉。核心代码如下:

    <?php
    /*
    Plugin Name: Quotmarks Replacer
    Plugin URI: http://sparanoid.com/work/quotmarks-replacer/
    Description: Quotmarks Replacer disables wptexturize function that keeps all quotation marks and suspension points in half-width form.
    Version: 2.6.17
    Author: Tunghsiao Liu
    Author URI: http://sparanoid.com/
    Author Email: t@sparanoid.com
    License: GPLv2 or later

    Copyright 2016 Tunghsiao Liu, aka. Sparanoid (t@sparanoid.com)

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License, version 2, as
    published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    */

    $qmr_work_tags = array(
    'the_title',             // http://codex.wordpress.org/Function_Reference/the_title
    'the_content',           // http://codex.wordpress.org/Function_Reference/the_content
    'the_excerpt',           // http://codex.wordpress.org/Function_Reference/the_excerpt
    // 'list_cats',          Deprecated. http://codex.wordpress.org/Function_Reference/list_cats
    'single_post_title',     // http://codex.wordpress.org/Function_Reference/single_post_title
    'comment_author',        // http://codex.wordpress.org/Function_Reference/comment_author
    'comment_text',          // http://codex.wordpress.org/Function_Reference/comment_text
    // 'link_name',          Deprecated.
    // 'link_notes',         Deprecated.
    'link_description',      // Deprecated, but still widely used.
    'bloginfo',              // http://codex.wordpress.org/Function_Reference/bloginfo
    'wp_title',              // http://codex.wordpress.org/Function_Reference/wp_title
    'term_description',      // http://codex.wordpress.org/Function_Reference/term_description
    'category_description',  // http://codex.wordpress.org/Function_Reference/category_description
    'widget_title',          // Used by all widgets in themes
    'widget_text'            // Used by all widgets in themes
    );

    foreach ( $qmr_work_tags as $qmr_work_tag ) {
    remove_filter ($qmr_work_tag, 'wptexturize');
    }

     

    2016.09.01 / 2 条评论 / 1,449 次点击 / 分类: 所谓技术

  • YAHOO(雅虎英文)邮箱容量变无限

    今天突然发现了YAHOO英文站点的邮箱容量变成了无限,不是系统漏洞,而是真的!

    这是YAHOO宣传介绍(由creke.BlogCN.com翻译,转载请保留此信息):
    Unlimited Storage!
    How does unlimited storage work?

    *无限容量存储空间!
    *无限量存储空间咋工作?

    It’s pretty straightforward—users that follow normal email practices and comply with our anti-abuse limits can consume an unlimited amount of free email storage. This will apply to both new and existing users.

    Wait – what? Wow!

    *我们拥有很好的用户,往常的邮件系统再加上防滥用限制让我们得以提供无限量邮箱空间。新老用户均可使用。
    *等等 - 啥?哇!(幽默)

    How can Yahoo! afford to give away unlimited email storage?

    By hiring outstanding engineers, of course! Ours have been hard at work developing an incredibly efficient backend storage system. Protected by responsive anti-abuse controls, this updated storage system gives you the option to never delete another email! Unless, of course, you want to.

    *YAHOO咋地做出无限量邮箱空间?
    *当然,我们通过雇佣倍棒的工程师,并且不辞劳苦做出了难以置信的高效率后台存储系统。在防滥用系统保护下,全新的存储系统让您咋都不用删除电子邮件!当然,除非你想删了。

    How will you prevent abuse?

    Responsive anti-abuse controls enable us to effectively identify anyone who’s taking advantage of Yahoo!’s email service. We want to ensure that everyone benefits from unlimited storage!

    *你们YAHOO咋防滥用?
    *灵敏的防滥用控制系统使得我们可以高效识别正常使用YAHOO邮件的用户。我们真诚希望每个用户都从无限量空间中受益!

    What exactly does unlimited storage mean?

    The purpose of unlimited storage isn’t to provide an online storage warehouse. Usage that suggests this approach gets flagged by Yahoo! Mail’s anti-abuse controls.

    *无限量空间到底有啥意义?
    *无限量空间的目的可不是向您提供网上软件存储站。这样用可是会被防滥用系统揪住的哦。

    Unlimited storage gives normal email account users like yourself an opportunity to not have to worry about hitting a storage limit. Basically, the idea is that now you can save your correspondence and memories and never worry about deleting older messages to make room for more.

    *无限量空间提供了机会,让我们这样的普通电子邮件用户无需担心邮箱容量限制。总的一点,这项创意让你省去信件和记忆的精力,让你永不需担心删除旧邮件来腾出空间。

    2007.08.15 / 暂无评论 / 878 次点击 / 分类: 所谓技术