<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>笨猫&#039;s Blog &#187; wordpress</title>
	<atom:link href="http://www.benmao.com/archives/tag/wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://www.benmao.com</link>
	<description>关注互联网，生活，音乐，乐此不疲的一只笨猫</description>
	<lastBuildDate>Sun, 29 Jan 2012 14:00:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WordPress 3.X代码实现关闭程序、主题、插件更新提示</title>
		<link>http://www.benmao.com/archives/1498</link>
		<comments>http://www.benmao.com/archives/1498#comments</comments>
		<pubDate>Wed, 25 Jan 2012 11:50:04 +0000</pubDate>
		<dc:creator>笨猫</dc:creator>
				<category><![CDATA[猫玩技术]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[主题]]></category>
		<category><![CDATA[插件]]></category>

		<guid isPermaLink="false">http://www.benmao.com/?p=1498</guid>
		<description><![CDATA[因为现在使用的主题是很久以前的主题，一直都出现更新提示。但是有一个问题就是，新的版本跟现在的主题完全就不是一个，等于是一个全新的主题。确实让人有点难堪，每次都看见后台有一个更新提示却不能更新，这对于我们这种轻度强迫症的人来说，简直是无法容忍。所以找到以下办法帮我们关闭Wordpress后台主题更新的提示，同时提供关闭Wordpress主程序、插件的更新提示代码，给那些担心插件兼容性等问题的童鞋使用。 一句代码就可以搞定了，以下分别是关闭主程序、插件、主题更新提示的代码，将需要的部分加入主题文件夹functions.php文件中： add_filter(‘pre_site_transient_update_core’, create_function(‘$a’, “return null;”)); add_filter(‘pre_site_transient_update_plugins’, create_function(‘$a’, “return null;”)); add_filter(‘pre_site_transient_update_themes’, create_function(‘$a’, “return null;”)); 上面的代码只是关闭提示，而下面的代码可以直接关闭对更新的检查，据说可以提升后台速度。代码依次为： remove_action(‘admin_init’, ‘_maybe_update_core’); remove_action(‘admin_init’, ‘_maybe_update_plugins’); remove_action(‘admin_init’, ‘_maybe_update_themes’); 注意，后面一段代码无法单独生效，要想彻底禁止更新，两段代码要同时加上方能见效。 就是这么简单，折腾控们可以折腾去了<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1054&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1498">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress 分类排序插件</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F33&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1498">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">有道推出相关博文推荐WordPress插件</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F324&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1498">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">汇总：我使用的WordPress插件 [2008.06.30]</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1307&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1498">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">禁用或开启 WordPress 管理员工具栏</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1322&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1498">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress风格各异的图标</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>因为现在使用的主题是很久以前的主题，一直都出现更新提示。但是有一个问题就是，新的版本跟现在的主题完全就不是一个，等于是一个全新的主题。确实让人有点难堪，每次都看见后台有一个更新提示却不能更新，这对于我们这种轻度强迫症的人来说，简直是无法容忍。所以找到以下办法帮我们关闭Wordpress后台主题更新的提示，同时提供关闭Wordpress主程序、插件的更新提示代码，给那些担心插件兼容性等问题的童鞋使用。</p>
<p>一句代码就可以搞定了，以下分别是关闭主程序、<a href="http://www.benmao.com/archives/tag/%e6%8f%92%e4%bb%b6" class="st_tag internal_tag" rel="tag" title="标签 插件 下的日志">插件</a>、主题更新提示的代码，将需要的部分加入主题文件夹functions.php文件中：</p>
<blockquote><p>add_filter(‘pre_site_transient_update_core’, create_function(‘$a’, “return null;”));<br />
add_filter(‘pre_site_transient_update_plugins’, create_function(‘$a’, “return null;”));<br />
add_filter(‘pre_site_transient_update_themes’, create_function(‘$a’, “return null;”));</p></blockquote>
<p>上面的代码只是关闭提示，而下面的代码可以直接关闭对更新的检查，据说可以提升后台速度。代码依次为：</p>
<blockquote><p>remove_action(‘admin_init’, ‘_maybe_update_core’);<br />
remove_action(‘admin_init’, ‘_maybe_update_plugins’);<br />
remove_action(‘admin_init’, ‘_maybe_update_themes’);</p></blockquote>
<p>注意，后面一段代码无法单独生效，要想彻底禁止更新，两段代码要同时加上方能见效。</p>
<p>就是这么简单，折腾控们可以折腾去了</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1054&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1498">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress 分类排序插件</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F33&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1498">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">有道推出相关博文推荐WordPress插件</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F324&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1498">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">汇总：我使用的WordPress插件 [2008.06.30]</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1307&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1498">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">禁用或开启 WordPress 管理员工具栏</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1322&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1498">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress风格各异的图标</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.benmao.com/archives/1498/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 语言文件.po .pot和.mo简介及汉化教程</title>
		<link>http://www.benmao.com/archives/1449</link>
		<comments>http://www.benmao.com/archives/1449#comments</comments>
		<pubDate>Sat, 17 Dec 2011 14:17:14 +0000</pubDate>
		<dc:creator>笨猫</dc:creator>
				<category><![CDATA[猫玩技术]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[汉化教程]]></category>
		<category><![CDATA[语言文件]]></category>

		<guid isPermaLink="false">http://www.benmao.com/?p=1449</guid>
		<description><![CDATA[使用WordPress的朋友都会发现有一些.pot或是.mo为后辍名的文件,这些文件其实就是WordPress程序的语言包及编译文件.我们把做的就是把这些文件翻译成中文并编辑为.mo格式.现在先介绍一些基本知识,让我认识pot文件、po文件、mo文件分别是什么和它们之间的关系。 一、文件简介 .po文件，.mo文件，.pot文件是由gettext程序生成或者使用的源代码和编译结果。 1、.pot文件 是一种模板文件，其实质与.po文件一样，其中包含了从源代码中提取所有的翻译字符串的列表，主要提供给翻译人员使用。 2、.po文件 用程序msginit来分析pot文件，生成各语言对应的po文件，比如中文就是zh_CN.po，法语就是fr.po文件。 PO是Portable Object（可移植对象）的缩写形式，它是面向翻译人员的、提取于源代码的一种资源文件。 .po文件可以用任何编辑器如poEdit，vi，Emacs，editplus打开，交给翻译人员来将其中的文字翻译成本国语言。 3.mo文件 用msgfmt将.po文件编译成mo文件，这是一个二进制文件，不能直接编辑。 MO是Machine Object（机器对象）的缩写形式，它是面向计算机的、由.po文件通过GNU gettext工具包编译而成的二进制文件，应用程序通过读取.mo文件使自身的界面转换成用户使用的语言，如简体中文。 可以用工具如msgunfmt命令将.mo文件反编译为.po文件。 不止 WordPress ，包括很多桌面应用程序都是是依靠 po 文件或 mo 文件来实现多语言版本。一般情况下，我们在汉化软件的时候会碰上如下几种情况： 二、几种情形 1、如果程序本身提供了.po文件，直接使用poEdit汉化，并自动生成.mo文件。 2、如果程序提供了.pot文件，复制一份并更改后缀名为.po，再使用poEdit汉化，最后生成.mo文件。 3、程序既没有提供.po文件，也没有提供.pot文件，只提供了.mo文件，那么有以下步骤： （1）使用poEdit安装程序bin文件夹中的msgunfmt程序将.mo文件转换成.po文件，命令类似如下：msgunfmt d:\demo.mo -o d:\demo.po 注：在命令提示符界面，使用 msgfmt demo.po 命令将po文件编译为可用的 demo.mo 文件，用 msgunfmt demo.mo 命令转回 demo.po 文件，这些命令在 poEdit 的安裝目录下有，可以拷贝msgunfmt.exe 、msgfmt.exe 及相关链接库文件 gettextlib.dll 、gettextsrc.dll 、iconv.dll 、intl.dll 到 c:/windows/system32 目录下使用。 （2）使用poedit汉化，然后生成.mo文件。 三、参考资料 [...]<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1498&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1449">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress 3.X代码实现关闭程序、主题、插件更新提示</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1322&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1449">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress风格各异的图标</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1307&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1449">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">禁用或开启 WordPress 管理员工具栏</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1054&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1449">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress 分类排序插件</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F347&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1449">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress推出中文站点和官方中文版</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>使用WordPress的朋友都会发现有一些.pot或是.mo为后辍名的文件,这些文件其实就是WordPress程序的语言包及编译文件.我们把做的就是把这些文件翻译成中文并编辑为.mo格式.现在先介绍一些基本知识,让我认识pot文件、po文件、mo文件分别是什么和它们之间的关系。</p>
<p>一、文件简介<br />
.po文件，.mo文件，.pot文件是由gettext程序生成或者使用的源代码和编译结果。</p>
<p>1、.pot文件<br />
是一种模板文件，其实质与.po文件一样，其中包含了从源代码中提取所有的翻译字符串的列表，主要提供给翻译人员使用。</p>
<p>2、.po文件</p>
<ul>
<li>用程序msginit来分析pot文件，生成各语言对应的po文件，比如中文就是zh_CN.po，法语就是fr.po文件。</li>
<li>PO是Portable Object（可移植对象）的缩写形式，它是面向翻译人员的、提取于源代码的一种资源文件。</li>
<li>.po文件可以用任何编辑器如poEdit，vi，Emacs，editplus打开，交给翻译人员来将其中的文字翻译成本国语言。</li>
</ul>
<p>3.mo文件</p>
<ul>
<li>用msgfmt将.po文件编译成mo文件，这是一个二进制文件，不能直接编辑。</li>
<li>MO是Machine Object（机器对象）的缩写形式，它是面向计算机的、由.po文件通过GNU gettext工具包编译而成的二进制文件，应用程序通过读取.mo文件使自身的界面转换成用户使用的语言，如简体中文。</li>
<li>可以用工具如msgunfmt命令将.mo文件反编译为.po文件。</li>
</ul>
<p>不止 <a href="http://www.benmao.com/archives/tag/wordpress" class="st_tag internal_tag" rel="tag" title="标签 wordpress 下的日志">WordPress</a> ，包括很多桌面应用程序都是是依靠 po 文件或 mo 文件来实现多语言版本。一般情况下，我们在汉化软件的时候会碰上如下几种情况：</p>
<p>二、几种情形<br />
1、如果程序本身提供了.po文件，直接使用poEdit汉化，并自动生成.mo文件。<br />
2、如果程序提供了.pot文件，复制一份并更改后缀名为.po，再使用poEdit汉化，最后生成.mo文件。<br />
3、程序既没有提供.po文件，也没有提供.pot文件，只提供了.mo文件，那么有以下步骤：<br />
（1）使用poEdit安装程序bin文件夹中的msgunfmt程序将.mo文件转换成.po文件，命令类似如下：msgunfmt</p>
<p>d:\demo.mo -o d:\demo.po</p>
<p>注：在命令提示符界面，使用 msgfmt demo.po 命令将po文件编译为可用的 demo.mo 文件，用 msgunfmt demo.mo 命令转回 demo.po 文件，这些命令在 poEdit 的安裝目录下有，可以拷贝msgunfmt.exe 、msgfmt.exe 及相关链接库文件 gettextlib.dll 、gettextsrc.dll 、iconv.dll 、intl.dll 到 c:/windows/system32 目录下使用。<br />
（2）使用poedit汉化，然后生成.mo文件。</p>
<p>三、参考资料<br />
1、在Windows系统搭建Linux软件汉化平台<br />
2、Wordpress语言文件介绍:po文件,mo文件,pot文件<br />
3、如何汉化 po 文件及编译成 mo 文件<br />
如何汉化 po 文件及编译成 mo 文件<br />
本文介绍如何 汉化、翻译 po 文件 及 编译、转换成 mo 文件</p>
<p>我们在使用 WordPress 及其插件时，经常可以找到汉化的版本，一般是通过一个汉化过（翻译过）的 mo 文件来实现（ WordPress 仅可识别 mo 文件），实际上不单 WordPress ，包括很多桌面应用程序都是是依靠 po 文件或 mo 文件来实现多语言版本。如果原作者提供了一个 po 文件或 mo 文件，那么我们就可以通过相关工具来自行汉化，或者翻译成其他语言版本。因为 mo 文件不能直接编辑，所以我们得编辑 po 文件，若仅有 mo 文件，那么就应该先把它转换成 po 文件后再进行编辑翻译。</p>
<p>至于编辑工具，由于 po 文件本身就是一个文本文件，所以任何文本编辑器都可以使用。除了专门编辑 po 文件的 poEdit ，还推荐使用 poEdit 、EditPlus、UltraEdit或者你喜欢的 vi 或 vim。<br />
我们来看一个 po 文件，这是 yskin 制作的 WordPress 2.11 中文版 po 文件 中的一部分</p>
<p><code>msgid ""<br />
msgstr ""<br />
"Project-Id-Version: WordPress 2.1-1.0\n"<br />
"PO-Revision-Date: 2007-02-22 12:35+0800\n"<br />
"Last-Translator: yskin \n"<br />
"MIME-Version: 1.0\n"<br />
"Content-Type: text/plain; charset=utf-8\n"<br />
"Content-Transfer-Encoding: 8bit\n"<br />
"X-Poedit-Basepath: d:/wordpress\n"<br />
"X-Poedit-Language: Simplified Chinese\n"<br />
"X-Poedit-Country: China\n"<br />
"X-Poedit-SourceCharset: utf-8\n"<br />
"X-Poedit-KeywordsList: _e;__;__ngettext:1,2\n"<br />
"Language-Team: \n"<br />
"POT-Creation-Date: \n"<br />
"Plural-Forms: nplurals=1; plural=0;\n"<br />
"X-Poedit-SearchPath-0: .\n"</code></p>
<p># 第一条要翻译的字符串。<br />
#: wp-comments-post.php:15<br />
msgid “Sorry, comments are closed for this item.”<br />
msgstr “对不起，这篇文章禁止评论。”</p>
<p>上面是这个 po 文件的最初部分，各行意思一目了然，注意编码尽可能采用UTF-8。</p>
<p># 第一条要翻译的字符串。<br />
#: wp-comments-post.php:15<br />
msgid “Sorry, comments are closed for this item.”<br />
msgstr “对不起，这篇文章禁止评论。”</p>
<p>这段就是po文件的主体结构了，每一个翻译项占一段。#: wp-comments-post.php:15 说明字符串相应的位置； msgid “Sorry, comments are closed for this item.” 翻译前的原文； msgstr “对不起，这篇文章禁止评论。” 翻译后的字符串。以此类推，即可完成所有资源的翻译。非常简单。<br />
那么如何将 po 文件编译成（转换） mo 文件呢？</p>
<p>如果你使用的是 poEdit ，按 Ctrl + s 保存就会自动生成相应的 po 文件和 mo 文件；<br />
或者在命令提示符界面，使用 msgfmt demo.po 命令将po文件编译为可用的 demo.mo 文件，用 msgunfmt demo.mo 命令转回 demo.po 文件，这些命令在 poEdit 的安裝目录下有，可以拷贝msgunfmt.exe 、msgfmt.exe 及相关链接库文件 gettextlib.dll 、gettextsrc.dll 、iconv.dll 、intl.dll 到 c:/windows/system32 目录下，或者安装 .Net 2.0环境。</p>
<p>另外推荐一款 GUI 界面的转化程序 po2mo.exe ，作者的说明：该程序是调用 msgfmt.exe 和 msgunfmt.exe 文件，从而进行po 、mo 文件互转。文件是用C#写的，需要.Net 2.0环境。</p>
<p>下面介绍几个工具的简单使用方法：</p>
<h3>用Pootle翻译WordPress</h3>
<ol>
<li>在Pootle<a title="服务器" href="http://www.zzbaike.com/wiki/%E6%9C%8D%E5%8A%A1%E5%99%A8">服务器</a>上<a href="http://pootle.locamotion.org/register.html" rel="nofollow">注册一个账号</a>，发送一份邮件给<a href="http://codex.wordpress.org/Special:Emailuser/Leuce" rel="nofollow">管理员</a>，要求增加我们的目标语言版本的WordPress</li>
<li>开始翻译前，请<a href="http://pootle.locamotion.org/login.html" rel="nofollow">登录</a>Pootle。未登录用户有时能够浏览内容、提交意见，但翻译是登录用户的独有权利，不登录无法翻译。</li>
<li>访问目标语言的WordPress页面。例如Afrikaan语的页面是<a href="http://pootle.locamotion.org/af/wordpress/" rel="nofollow">pootle.locamotion.org/af/wordpress/</a>（不要忘了结尾斜线）。</li>
<li>点击“Show Editing Functions（显示编辑功能）”</li>
<li>点击“Quick Translate（快速翻译）”以编辑未翻译的与语义含糊的内容，或点击“Translate All（翻译全部）”以编辑所有内容。</li>
</ol>
<p>为了能在locamotion.org上翻译WordPress，wordpress.pot文件被分散成多个小逻辑单元，其中包括readme.html文件，还包括一个包含所有内容的文件，用户可将该文件按正常步骤手动添加到PHP文件中。 <a href="http://translate.sourceforge.net/wiki/decathlon/wordpress" rel="nofollow">这里</a>和<a href="http://translate.sourceforge.net/wiki/decathlon/wordpress_files" rel="nofollow">这里</a>有对WordPress翻译的相关介绍。</p>
<p>将翻译结果整合到wordpress.pot 正常情况下，翻译人员可用Pootle<a title="服务器" href="http://www.zzbaike.com/wiki/%E6%9C%8D%E5%8A%A1%E5%99%A8">服务器</a>随时下载自己翻译的软件的PO文件，并将下载的文件提交到自己的翻译项目中。但由于在pootle.locamotion.org上，原始源代码被分散成多个小单元，翻译人员不得不手动整合翻译结果和wordpress.pot文件，之后再将结果提交到WordPress。</p>
<ol>
<li>下载官方<a href="http://svn.automattic.com/wordpress-i18n/pot/trunk/wordpress.pot" rel="nofollow">WordPress POT file</a></li>
<li>下载<a href="http://svn.automattic.com/wordpress-i18n/pot/trunk/wordpress-continents-cities.pot" rel="nofollow">WordPress Continent POT file</a> （可选操作）</li>
<li>在本地机器上下载并安装 <a href="http://translate.sourceforge.net/wiki/toolkit/installation" rel="nofollow">Translate Toolkit</a></li>
<li>从Pootle<a title="服务器" href="http://www.zzbaike.com/wiki/%E6%9C%8D%E5%8A%A1%E5%99%A8">服务器</a>上下载经过翻译的或部分翻译的PO文件。可以逐个下载，也可以以ZIP文件形式一次性下载（参见网站上的选项）。一般情况下下载经过翻译的PO文件无需登录Pootle。</li>
<li>首先将PO文件整合到0翻译记忆中（整合后，之后的操作中只需要处理一个文件），在命令行中执行以下命令：<strong>po2tmx -l xx -i pofiles -o xx.tmx</strong>，其中xx即你的目标语言代码。以上操作生成一个名为xx.tmx的TMX翻译记忆文件。</li>
<li>接下来根据翻译记忆文件预翻译WordPress POT文件。可执行以下命令进行预翻译：<strong>pot2po –tm=xx.tmx -i wordpress.pot -o wordpress_xx.po</strong>。该命令为目标语言生成一个PO文件，文件名为wordpress_xx.po。</li>
<li>最后，在命令行中使用<strong>pocount wordpress_xx.po</strong>来计算PO文件的字数/字符数，查看有多少内容已经被翻译，多少内容还没有翻译或意义不明。</li>
</ol>
<p>如果所有PO文件都被100%翻译了，最终的wordpress_xx.po文件也会被100%翻译。如果PO文件中有字符串没有被翻译，pot2po命令可能会造成wordpress_xx.po文件中的翻译语句含意模糊（这未必是坏事）。</p>
<h3>用poEdit翻译WordPress</h3>
<ol>
<li>下载并安装<a href="http://www.poedit.net/" rel="nofollow">poEdit</a></li>
<li>下载官方<a href="http://svn.automattic.com/wordpress-i18n/pot/trunk/wordpress.pot" rel="nofollow">WordPress POT file</a></li>
<li>在poEdit中打开官方WordPress POT文件</li>
<li>标注有①的文本框是POT文件中的原始信息（英文）。在标注有②的文本框中添加对①的翻译，在标注有③和④的文本框中添加对该信息的注释。与翻译团队合作时，可以通过这种方式分享自己对PO文件内容的看法。</li>
<li>在<strong>文件</strong>——<strong>另存为….</strong>中将翻译结果保存为PO文件。</li>
<li>翻译完毕后，再次在<strong>文件</strong>——<strong>另存为….</strong>中将翻译结果保存为PO文件。</li>
<li>也可以点击<strong>文件——优先级</strong>，然后在<strong>编辑框</strong>中点击<em>保存时自动编译.mo文件</em>。</li>
</ol>
<h3>用KBabel翻译WordPress</h3>
<p><em>本部分内容不完整。</em></p>
<ol>
<li>下载官方<a href="http://svn.automattic.com/wordpress-i18n/pot/trunk/wordpress.pot" rel="nofollow">WordPress POT file</a></li>
<li>在KBabel中打开文件</li>
</ol>
<h3>用Gettext工具翻译WordPress</h3>
<ol>
<li>下载官方<a href="http://svn.automattic.com/wordpress-i18n/pot/trunk/wordpress.pot" rel="nofollow">WordPress POT file</a></li>
<li>在常用的文本编辑器中打开文件</li>
<li>升级页头信息</li>
<li>翻译信息</li>
<li>以.po为扩展名保存文件</li>
<li>msgfmt -o <em>filename</em>.mo <em>filename</em>.po</li>
</ol>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1498&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1449">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress 3.X代码实现关闭程序、主题、插件更新提示</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1322&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1449">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress风格各异的图标</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1307&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1449">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">禁用或开启 WordPress 管理员工具栏</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1054&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1449">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress 分类排序插件</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F347&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1449">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress推出中文站点和官方中文版</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.benmao.com/archives/1449/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>wordpress修改仅首页显示友情链接</title>
		<link>http://www.benmao.com/archives/1414</link>
		<comments>http://www.benmao.com/archives/1414#comments</comments>
		<pubDate>Sat, 15 Oct 2011 11:35:13 +0000</pubDate>
		<dc:creator>笨猫</dc:creator>
				<category><![CDATA[猫玩技术]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[友情链接]]></category>

		<guid isPermaLink="false">http://www.benmao.com/?p=1414</guid>
		<description><![CDATA[做seo优化，友情链接的整站链接和只是首页链接是有很大区别的。会分散权重。很多常见wordpress主题模板，都是设置全站友情链接的，所以我们需要实现wordpress只在首页显示友情链接就又需要折腾wordpress了。 下面三米给大家来说说修改wordpress友情链接的seo优化技巧。这个也让三米最近折腾了一段时间。 方法一：修改主题源代码 在后台找到主题中友情链接放置的位置，后台-外观-编辑器中可以找到。一般主题的友情链接是放在侧边(sidebar.php) 中，也有放在页脚(footer.php)的，根据自己主题找到友情链接代码：&#60;?php wp_list_bookmarks(); ?&#62; 之后，替换成如下代码： &#60;?php if ( is_home()) { ?&#62; &#60;?php wp_list_bookmarks(); ?&#62; &#60;?php } ?&#62; 代码解释：is_home(); 说明这段代码包含的友情链接只在首页显示。 但是我用这个代码测试了，没效果，检查内容页也依然有友情链接，一直想不明白是什么问题?之后请教高人，wordpress高人很多的，终于找到解决的办法了。 只要在 is_home(); 之前加一个 wp_reset_query(); 就可以解决了，完美搞定。 最终代码如下： &#60;?php wp_reset_query(); if ( is_home()) { ?&#62; &#60;?php wp_list_bookmarks(); ?&#62; &#60;?php } ?&#62; 方法二：插件设置 1、插件名称：Widget Logic 在后台搜索安装启动。 2、之后看图说话，后台设置。后面选项中填is_home()&#38;&#38;!is_paged()然后点击保存就设置完成了 wordpress友情链接设置图 3、一些常用的显示指令 is_home() 主页 is_admin() 管理员帐号 is_single() 文章页 is_page() 页面 [...]<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F379&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1414">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">wordpress修改之友情链接页面</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F756&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1414">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress永久链接或固定链接的方法</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F865&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1414">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress 的固定链接设置方式</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1498&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1414">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress 3.X代码实现关闭程序、主题、插件更新提示</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1338&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1414">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">如何去除wordpress模板里面的base64加密链接</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>做seo优化，友情链接的整站链接和只是首页链接是有很大区别的。会分散权重。很多常见wordpress主题模板，都是设置全站友情链接的，所以我们需要实现wordpress只在首页显示友情链接就又需要折腾wordpress了。<br />
下面三米给大家来说说修改wordpress友情链接的seo优化技巧。这个也让三米最近折腾了一段时间。<br />
方法一：修改主题源代码<br />
在后台找到主题中友情链接放置的位置，后台-外观-编辑器中可以找到。一般主题的友情链接是放在侧边(sidebar.php) 中，也有放在页脚(footer.php)的，根据自己主题找到友情链接代码：<strong>&lt;?php wp_list_bookmarks(); ?&gt;</strong><code><!--?php wp_list_bookmarks(); ?--></code><br />
之后，替换成如下代码：<br />
<code><!--?php if ( is_home()) { ?--></code></p>
<p>&lt;?php if ( is_home()) { ?&gt;</p>
<p>&lt;?php wp_list_bookmarks(); ?&gt;</p>
<p>&lt;?php } ?&gt;</p>
<p><code><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;">代码解释：is_home(); 说明这段代码包含的友情链接只在首页显示。</span></code></p>
<p>但是我用这个代码测试了，没效果，检查内容页也依然有友情链接，一直想不明白是什么问题?之后请教高人，wordpress高人很多的，终于找到解决的办法了。<br />
只要在 is_home(); 之前加一个 wp_reset_query(); 就可以解决了，完美搞定。<br />
最终代码如下：<br />
<code><!--?php wp_reset_query(); if ( is_home()) { ?--></code></p>
<p>&lt;?php wp_reset_query(); if ( is_home()) { ?&gt;</p>
<p>&lt;?php wp_list_bookmarks(); ?&gt;</p>
<p>&lt;?php } ?&gt;</p>
<p><code><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;">方法二：插件设置</span></code></p>
<p>1、插件名称：Widget Logic 在后台搜索安装启动。<br />
2、之后看图说话，后台设置。后面选项中填is_home()&amp;&amp;!is_paged()然后点击保存就设置完成了</p>
<p><img class="alignnone" src="http://www.3lian.com/d/file/2011/10/01/333f872be247ed317f245088c64e3302.jpg" alt="" width="252" height="241" /></p>
<p>wordpress友情链接设置图<br />
3、一些常用的显示指令<br />
is_home() 主页<br />
is_admin() 管理员帐号<br />
is_single() 文章页<br />
is_page() 页面<br />
is_404() 页面无法找到页<br />
is_search() 搜索结果页<br />
is_feed() 订阅页<br />
!is_category(5) 仅在ID非5的分类显示<br />
is_category() 文章分类页<br />
is_<a href="http://www.benmao.com/archives/tag/tag" class="st_tag internal_tag" rel="tag" title="标签 tag 下的日志">tag</a>() 文章标签页<br />
is_archive() 归档页<br />
下面解释一些符号的意思：||表示或，&amp;&amp;表示和，!表示非。<br />
PS：这个插件方法笨猫没实践过，想弄的自己折腾去吧。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F379&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1414">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">wordpress修改之友情链接页面</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F756&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1414">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress永久链接或固定链接的方法</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F865&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1414">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress 的固定链接设置方式</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1498&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1414">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress 3.X代码实现关闭程序、主题、插件更新提示</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1338&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1414">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">如何去除wordpress模板里面的base64加密链接</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.benmao.com/archives/1414/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>加速WordPress的几个方法</title>
		<link>http://www.benmao.com/archives/1364</link>
		<comments>http://www.benmao.com/archives/1364#comments</comments>
		<pubDate>Sun, 22 May 2011 12:39:53 +0000</pubDate>
		<dc:creator>笨猫</dc:creator>
				<category><![CDATA[猫玩技术]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[加速]]></category>

		<guid isPermaLink="false">http://www.benmao.com/?p=1364</guid>
		<description><![CDATA[WordPress加速已经不是什么新鲜话题了，曾在一站长论坛里看到一篇关于WordPress提速的文章，讲了很多的方法，用了一大堆插件，可能是想把WordPress加速做到极致吧。但读完后却是一头雾水，我觉得这样往往适得其反。 这里，我说一下个人感觉一些高效可行的方法： 一.图片加载延迟 即图片岁下拉滚动条依次显示，这样在很大程度上得到了提速，尤其是图片比较多的站。方法很简单，自己去网上搜索一下，非常的多。 二.图片本地缓存 包括JS、Flash等，把这些元素缓存后，用户第二次再去访问你的站时，那速度将是秒开。推荐使用.htaccess缓存图片，方法：直接在.htaccess中添加如下代码： # Image and Flash content Caching for One Month&#60;FilesMatch “.(flv&#124;gif&#124;jpg&#124;jpeg&#124;png&#124;ico&#124;swf)$”&#62;Header set Cache-Control “max-age=2592000&#8243;&#60;/FilesMatch&#62;   这里说一下，WordPress评论者头像gravatar，大家可能感觉到了，Gravatar明显会拖慢网站速度，以至于一些博客不让显示Gravatar头像或用神秘人代替了。也有一些站点追求比较苛刻，本地化了Gravatar头像，后者我不推荐，尤其是网站评论较多，那将给服务器带来巨大的压力。 三.开启wordpress的GZIP 首先你可以用站长工具检测一下代码是否有必要压缩 http://tool.chinaz.com/Gzips/Default.aspx 开启gzip方法也很多， 方法1：使用gzippy插件，直接安装启用即可。 方法2：在Cpanel面板中实现 C面板中有个 Optimize Website 图标，点击进入后选中 Compress all content，Update settings即可开启我们的网站加速功能～当然，我们也可以根据自己的需要，选择第三项，压缩指定的类型以节约服务器资源。 方法3：通过.htaccess实现，加入规则： &#60;ifmodule mod_deflate.c&#62; AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-httpd-php application/x-javascript &#60;/ifmodule&#62;   四：静态化页面减少对数据库的查询 wp super cache插件 它把整个网页直接生成 HTML 文件，这样 [...]<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1498&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1364">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress 3.X代码实现关闭程序、主题、插件更新提示</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1054&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1364">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress 分类排序插件</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F33&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1364">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">有道推出相关博文推荐WordPress插件</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1307&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1364">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">禁用或开启 WordPress 管理员工具栏</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F379&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1364">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">wordpress修改之友情链接页面</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p><span style="font-family: 微软雅黑;">WordPress加速已经不是什么新鲜话题了，曾在一站长论坛里看到一篇关于WordPress提速的文章，讲了很多的方法，用了一大堆插件，可能是想把WordPress加速做到极致吧。但读完后却是一头雾水，我觉得这样往往适得其反。</span></p>
<p><span style="font-family: 微软雅黑;">这里，我说一下个人感觉一些高效可行的方法：</span></p>
<p><span style="font-family: 微软雅黑;">一.图片加载延迟</span></p>
<p><span style="font-family: 微软雅黑;">即图片岁下拉滚动条依次显示，这样在很大程度上得到了提速，尤其是图片比较多的站。方法很简单，自己去网上搜索一下，非常的多。</span></p>
<p><span style="font-family: 微软雅黑;">二.图片本地缓存</span></p>
<p><span style="font-family: 微软雅黑;">包括JS、Flash等，把这些元素缓存后，用户第二次再去访问你的站时，那速度将是秒开。推荐使用.htaccess缓存图片，方法：直接在.htaccess中添加如下代码：</span></p>
<blockquote><p><span style="font-family: 微软雅黑;"># Image and Flash content Caching for One Month&lt;FilesMatch “.(flv|gif|jpg|jpeg|png|ico|swf)$”&gt;Header set Cache-Control “max-age=2592000&#8243;&lt;/FilesMatch&gt;</span></p>
<p><span style="font-family: 微软雅黑;"> </span></p></blockquote>
<p><span style="font-family: 微软雅黑;">这里说一下，WordPress评论者头像gravatar，大家可能感觉到了，Gravatar明显会拖慢网站速度，以至于一些博客不让显示Gravatar头像或用神秘人代替了。也有一些站点追求比较苛刻，本地化了Gravatar头像，后者我不推荐，尤其是网站评论较多，那将给服务器带来巨大的压力。</span></p>
<p><span style="font-family: 微软雅黑;">三.开启wordpress的GZIP</span></p>
<p><span style="font-family: 微软雅黑;">首先你可以用站长工具检测一下代码是否有必要压缩</span></p>
<p><a title="http://tool.chinaz.com/Gzips/Default.aspx" href="http://tool.chinaz.com/Gzips/Default.aspx"><span style="font-family: 微软雅黑;">http://tool.chinaz.com/Gzips/Default.aspx</span></a></p>
<p><span style="font-family: 微软雅黑;">开启gzip方法也很多，</span></p>
<p><span style="font-family: 微软雅黑;">方法1：使用gzippy插件，直接安装启用即可。</span></p>
<p><span style="font-family: 微软雅黑;">方法2：在Cpanel面板中实现</span></p>
<p><span style="font-family: 微软雅黑;">C面板中有个 <strong>Optimize Website</strong> <a href="http://www.benmao.com/archives/tag/%e5%9b%be%e6%a0%87" class="st_tag internal_tag" rel="tag" title="标签 图标 下的日志">图标</a>，点击进入后选中 Compress all content，Update settings即可开启我们的网站加速功能～当然，我们也可以根据自己的需要，选择第三项，压缩指定的类型以节约服务器资源。</span></p>
<p><span style="font-family: 微软雅黑;">方法3：通过.htaccess实现，加入规则：</span></p>
<blockquote><p><span style="font-family: 微软雅黑;">&lt;ifmodule mod_deflate.c&gt;<br />
AddOutputFilterByType DEFLATE text/html text/<a href="http://www.benmao.com/archives/tag/css" class="st_tag internal_tag" rel="tag" title="标签 css 下的日志">css</a> text/plain text/xml application/x-httpd-php application/x-javascript<br />
&lt;/ifmodule&gt;</span></p></blockquote>
<p><span style="font-family: 微软雅黑;"> </span></p>
<p><span style="font-family: 微软雅黑;">四：静态化页面减少对数据库的查询</span></p>
<p><span style="font-family: 微软雅黑;">wp super cache插件 它把整个网页直接生成 HTML 文件，这样 Apache 就不用解析 PHP 脚本，通过使用这个插件，能使得你的 <a href="http://www.benmao.com/archives/tag/wordpress" class="st_tag internal_tag" rel="tag" title="标签 wordpress 下的日志">WordPress</a> 博客将显著的提速。</span></p>
<p><span style="font-family: 微软雅黑;">当然，如果你不静态化页面，也可以缓存数据库，DB cache插件比较不错。</span></p>
<p><span style="font-family: 微软雅黑;">小结：如果这四大方法你都用上了，那你的WordPress速度提升基本已经发挥的淋漓尽致了，最后我们要注意一下，经常在打开你博客的时候，观察状态栏的加载情况。见过一些站，因为使用了外部JS结果那个站点挂掉的时候导致自己的站点整个都打不开。还有就是经常清理和优化你的数据库，这一点是至关重要的，数据库在查询中产生碎片，WordPress在运行时也会残留一些垃圾，尤其是代码高亮插件和WordPress自动保存功能。</span></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1498&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1364">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress 3.X代码实现关闭程序、主题、插件更新提示</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1054&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1364">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress 分类排序插件</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F33&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1364">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">有道推出相关博文推荐WordPress插件</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1307&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1364">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">禁用或开启 WordPress 管理员工具栏</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F379&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1364">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">wordpress修改之友情链接页面</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.benmao.com/archives/1364/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>如何去除wordpress模板里面的base64加密链接</title>
		<link>http://www.benmao.com/archives/1338</link>
		<comments>http://www.benmao.com/archives/1338#comments</comments>
		<pubDate>Fri, 06 May 2011 04:00:56 +0000</pubDate>
		<dc:creator>笨猫</dc:creator>
				<category><![CDATA[猫玩技术]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[解密]]></category>

		<guid isPermaLink="false">http://www.benmao.com/?p=1338</guid>
		<description><![CDATA[博客大概的样子已经成型了，今天无意中查看自己做的seo是否可以调用到tag标签做关键词的时候，忽然发现底部footer上面竟然有几个链接， 而这几个链接在网站上却看不到！呵真的很不喜欢这种人！这种事情当然不能让自己吃亏，于是登陆后台，因为我之前从来没有接触过WordPress，这次写 博客是我第一次用这个程序，所以我首先想到的是footer.php文件，因为每个页面都会有，可是看了下footer没有发现任何链接，奇怪，再看首页 源代码，发现﻿ &#60;div&#62;&#60;a href="http://www.511717.com/"&#62;511717&#60;/a&#62; &#60;a href="http://watch-dragonball-online.net/"&#62;dragonball episodes&#60;/a&#62; &#60;a href="http://digpokemon.com/"&#62;pokemon episodes&#60;/a&#62;&#60;/div&#62;&#60;/div&#62; &#60;!-- Content end --&#62; “wp_list_content”这个，那么好办，就找wp_list_content相关内容吧，于是打开模板函数functions.php文件，果不出我所料，让我找到了它， function wp_list_content() {echo base64_decode ('PGEgaHJlZj0iaHR0cDovL3d3dy41MTE3MTcuY29tLyI+NTExNzE3PC9hPg0KPGEgaHJlZj0 iaHR0cDovL3dhdGNoLWRyYWdvbmJhbGwtb25saW5lLm5ldC8iPmRyYWdvbmJhbGwgZXB pc29kZXM8L2E+DQo8YSBocmVmPSJodHRwOi8vZGlncG9rZW1vbi5jb20vIj5wb2tlbW9uIG VwaXNvZGVzPC9hPg==');} 这是一个BASE64方式进行加密的内容！这个时候干什么？解密？还用解密吗？首页打开查看源文件，显示的内容就是解密后的内容！我当时很生气，直 接给这段代码给删除，然后更新函数，结果，首页却加载不出footer了，看来这么简单行不通，其实把所有模板里面的wp_list_content标签 统统删除就可以解决这个问题，但是这个太麻烦！我们可以直接替换这个加密函数，让它显示其他内容不就OK了吗？但是这个地方不是明文，需要输入 base64加密后的内容，于是我打开 http://tool.chinaz.com/Tools/Base64.aspx 在框内输入59dd.com （当然你可以自由设定你要在首页源代码可以看到的内容，我试过用汉字的话显示乱码，那么最简单的输入你的域名）然后点击加密，得到一组加密后的内容 NTlkZC5jb20= 替换掉它原本内容 PGEgaHJlZj0iaHR0cDovL3d3dy41MTE3 MTcuY29tLyI+NTExNzE3PC9hPg0KPGEgaHJlZ j0iaHR0cDovL3dhdGNoLWRyYWdvbmJhbGwt b25saW5lLm5ldC8iPmRyYWdvbmJhbGwgZXB pc29kZXM8L2E+DQo8YSBocmVmPSJod HRwOi8vZGlncG9rZW1vbi5jb20vIj5wb2tlbW9uIGVwaXNvZGVzPC9hPg== 那么再打开博客，查看源代码发现已经变成我要显示的内容 ﻿&#60;div&#62;59dd.com&#60;/div&#62;&#60;/div&#62; &#60;!-- Content end --&#62; 其实蛮简单的，之所以整理下写个文章是因为我真的看不惯这些所谓的“共享”，既然免费放出来就别玩阴的，你可以在底部加明链链接到你的网站，至少让 我们可以在首页看得到链接内容，我们也会酌情考虑保留，但是来隐藏的，一下还来4个，这就有些不道德了吧？写出来给新手一些帮助，如果大家用模板遇到有这 类情况的，可以轻松搞定！不用劳神费心的去研究琢磨，我想这也是一种共享精神！<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1414&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1338">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">wordpress修改仅首页显示友情链接</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1307&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1338">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">禁用或开启 WordPress 管理员工具栏</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F756&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1338">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress永久链接或固定链接的方法</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F347&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1338">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress推出中文站点和官方中文版</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F324&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1338">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">汇总：我使用的WordPress插件 [2008.06.30]</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>博客大概的样子已经成型了，今天无意中查看自己做的seo是否可以调用到tag标签做关键词的时候，忽然发现底部footer上面竟然有几个链接， 而这几个链接在网站上却看不到！呵真的很不喜欢这种人！这种事情当然不能让自己吃亏，于是登陆后台，因为我之前从来没有接触过WordPress，这次写 博客是我第一次用这个程序，所以我首先想到的是footer.php文件，因为每个页面都会有，可是看了下footer没有发现任何链接，奇怪，再看首页 源代码，发现﻿</p>
<div>
<table>
<tbody>
<tr>
<td>
<pre>&lt;div&gt;&lt;a href="http://www.511717.com/"&gt;511717&lt;/a&gt;
&lt;a href="http://watch-dragonball-online.net/"&gt;dragonball episodes&lt;/a&gt;
&lt;a href="http://digpokemon.com/"&gt;pokemon episodes&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;!-- Content end --&gt;</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>“wp_list_content”这个，那么好办，就找wp_list_content相关内容吧，于是打开模板函数functions.php文件，果不出我所料，让我找到了它，</p>
<div>
<table>
<tbody>
<tr>
<td>
<pre>function wp_list_content() {echo base64_decode
('PGEgaHJlZj0iaHR0cDovL3d3dy41MTE3MTcuY29tLyI+NTExNzE3PC9hPg0KPGEgaHJlZj0
iaHR0cDovL3dhdGNoLWRyYWdvbmJhbGwtb25saW5lLm5ldC8iPmRyYWdvbmJhbGwgZXB
pc29kZXM8L2E+DQo8YSBocmVmPSJodHRwOi8vZGlncG9rZW1vbi5jb20vIj5wb2tlbW9uIG
VwaXNvZGVzPC9hPg==');}</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>这是一个BASE64方式进行加密的内容！这个时候干什么？<a href="http://www.benmao.com/archives/tag/%e8%a7%a3%e5%af%86" class="st_tag internal_tag" rel="tag" title="标签 解密 下的日志">解密</a>？还用解密吗？首页打开查看源文件，显示的内容就是解密后的内容！我当时很生气，直 接给这段代码给删除，然后更新函数，结果，首页却加载不出footer了，看来这么简单行不通，其实把所有模板里面的wp_list_content标签 统统删除就可以解决这个问题，但是这个太麻烦！我们可以直接替换这个加密函数，让它显示其他内容不就OK了吗？但是这个地方不是明文，需要输入 base64加密后的内容，于是我打开 <a href="http://tool.chinaz.com/Tools/Base64.aspx" target="_blank">http://tool.chinaz.com/Tools/Base64.aspx</a> 在框内输入59dd.com （当然你可以自由设定你要在首页源代码可以看到的内容，我试过用汉字的话显示乱码，那么最简单的输入你的域名）然后点击加密，得到一组加密后的内容</p>
<div>
<table>
<tbody>
<tr>
<td>
<pre>NTlkZC5jb20=</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>替换掉它原本内容</p>
<div>
<table>
<tbody>
<tr>
<td>
<pre>PGEgaHJlZj0iaHR0cDovL3d3dy41MTE3
MTcuY29tLyI+NTExNzE3PC9hPg0KPGEgaHJlZ
j0iaHR0cDovL3dhdGNoLWRyYWdvbmJhbGwt
b25saW5lLm5ldC8iPmRyYWdvbmJhbGwgZXB
pc29kZXM8L2E+DQo8YSBocmVmPSJod
HRwOi8vZGlncG9rZW1vbi5jb20vIj5wb2tlbW9uIGVwaXNvZGVzPC9hPg==</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>那么再打开博客，查看源代码发现已经变成我要显示的内容</p>
<div>
<div>
<pre>﻿&lt;div&gt;59dd.com&lt;/div&gt;&lt;/div&gt;
&lt;!-- Content end --&gt;</pre>
</div>
</div>
<p>其实蛮简单的，之所以整理下写个文章是因为我真的看不惯这些所谓的“共享”，既然免费放出来就别玩阴的，你可以在底部加明链链接到你的网站，至少让 我们可以在首页看得到链接内容，我们也会酌情考虑保留，但是来隐藏的，一下还来4个，这就有些不道德了吧？写出来给新手一些帮助，如果大家用模板遇到有这 类情况的，可以轻松搞定！不用劳神费心的去研究琢磨，我想这也是一种共享精神！</p>
<p><span><br />
</span></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1414&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1338">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">wordpress修改仅首页显示友情链接</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1307&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1338">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">禁用或开启 WordPress 管理员工具栏</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F756&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1338">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress永久链接或固定链接的方法</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F347&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1338">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">WordPress推出中文站点和官方中文版</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.benmao.com%2Farchives%2F324&from=http%3A%2F%2Fwww.benmao.com%2Farchives%2F1338">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 14px !important;">汇总：我使用的WordPress插件 [2008.06.30]</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.benmao.com/archives/1338/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>WordPress风格各异的图标</title>
		<link>http://www.benmao.com/archives/1322</link>
		<comments>http://www.benmao.com/archives/1322#comments</comments>
		<pubDate>Sun, 17 Apr 2011 09:17:52 +0000</pubDate>
		<dc:creator>笨猫</dc:creator>
				<category><![CDATA[酷站]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[图标]]></category>

		<guid isPermaLink="false">http://www.benmao.com/?p=1322</guid>
		<description><![CDATA[WordPress Icons version 1.0 – Descargar iconos (8 icons) WordPress Logo – Descargar iconos (6 icons) WordPress Stamp – Descargar iconos (6 icons) WordPress Logos and Button – Descargar iconos (12 icons) I love WP – Descargar iconos (3 icons) WordPress Logos FAQs – Descargar iconos (21 icons) 3D WordPress Logo Icons : Yo-Yo toys [...]]]></description>
			<content:encoded><![CDATA[<p><img title="wordpress icons" src="http://blogandweb.com/wp-content/uploads/2008/12/wordpress-01-snap2objects.png" alt="wordpress 01 snap2objects 多款wordpress图标" width="450" height="200" /></p>
<p><strong><a href="http://www.benmao.com/archives/tag/wordpress" class="st_tag internal_tag" rel="tag" title="标签 wordpress 下的日志">WordPress</a> Icons version 1.0</strong> – <a href="http://www.oceangray.net/free-wordpress-icons-version-10/"><span style="color: #3b5a4a;">Descargar iconos (8 icons)</span></a></p>
<p><span style="color: #3b5a4a;"><img title="wordpress icons" src="http://blogandweb.com/wp-content/uploads/2008/12/wordpress-02-wordpressicons.png" alt="wordpress 02 wordpressicons 多款wordpress图标" width="450" height="200" /></span></p>
<p><strong>WordPress Logo</strong> – <a href="http://th3-prophetman.deviantart.com/art/WordPress-Logo-79749439"><span style="color: #3b5a4a;">Descargar iconos (6 icons)</span></a></p>
<p><span id="more-1322"></span></p>
<p><span style="color: #3b5a4a;"><img title="wordpress icons" src="http://blogandweb.com/wp-content/uploads/2008/12/wordpress-03-wordpresslogo.png" alt="wordpress 03 wordpresslogo 多款wordpress图标" width="450" height="200" /></span></p>
<p><strong>WordPress Stamp</strong> – <a href="http://phyraxdesigns.deviantart.com/art/Wordpress-Stamp-Series-1-73097405"><span style="color: #3b5a4a;">Descargar iconos (6 icons)</span></a></p>
<p><span style="color: #3b5a4a;"><img title="wordpress icons" src="http://blogandweb.com/wp-content/uploads/2008/12/wordpress-04-stamp.png" alt="wordpress 04 stamp 多款wordpress图标" width="450" height="200" /></span></p>
<p><strong>WordPress Logos and Button</strong> – <a href="http://wordpress.org/about/logos/"><span style="color: #3b5a4a;">Descargar iconos (12 icons)</span></a></p>
<p><span style="color: #3b5a4a;"><img title="wordpress icons" src="http://blogandweb.com/wp-content/uploads/2008/12/wordpress-05-logos-button.png" alt="wordpress 05 logos button 多款wordpress图标" width="450" height="200" /></span></p>
<p><strong>I love WP</strong> – <a href="http://www.yukei.net/proyectos/i-heart-wordpress/"><span style="color: #3b5a4a;">Descargar iconos (3 icons)</span></a></p>
<p><span style="color: #3b5a4a;"><img title="wordpress icons" src="http://blogandweb.com/wp-content/uploads/2008/12/wordpress-06-i-love-wp.png" alt="wordpress 06 i love wp 多款wordpress图标" width="450" height="200" /></span></p>
<p><strong>WordPress Logos FAQs</strong> – <a href="http://faq.wordpress.com/wordpress-logos/"><span style="color: #3b5a4a;">Descargar iconos (21 icons)</span></a></p>
<p><span style="color: #3b5a4a;"><img title="wordpress icons" src="http://blogandweb.com/wp-content/uploads/2008/12/wordpress-07-logos.png" alt="wordpress 07 logos 多款wordpress图标" width="450" height="200" /></span></p>
<p><strong>3D WordPress Logo Icons : Yo-Yo toys</strong> – <a href="http://www.nineteenlabs.com/2007/11/12/3d-wordpress-logo-icons-yo-yo-toys/"><span style="color: #3b5a4a;">Descargar iconos (1 icons)</span></a></p>
<p><span style="color: #3b5a4a;"><img title="wordpress icons" src="http://blogandweb.com/wp-content/uploads/2008/12/wordpress-08-3d.png" alt="wordpress 08 3d 多款wordpress图标" width="450" height="200" /></span></p>
<p><strong>WordPress Icon</strong> – <a href="http://factorycity.net/projects/wordpress-icon/"><span style="color: #3b5a4a;">Descargar iconos (1 icons)</span></a></p>
<p><span style="color: #3b5a4a;"><img title="wordpress icons" src="http://blogandweb.com/wp-content/uploads/2008/12/wordpress-10-icon.png" alt="wordpress 10 icon 多款wordpress图标" width="450" height="200" /></span></p>
<p><strong>WPcamp cena</strong> – Descargar iconos (<a href="http://flickr.com/photos/emmealcubo/2179994747/"><span style="color: #3b5a4a;">1</span></a>, <a href="http://flickr.com/photos/emmealcubo/2180783462/"><span style="color: #3b5a4a;">2</span></a> – 2 <span class="wp_keywordlink_affiliate"><a title="查看 icons 的全部文章" href="http://hechonghua.com/tag/icons/" target="_blank"><span style="color: #3b5a4a;">icons</span></a></span>)</p>
<p><img title="wordpress icons" src="http://blogandweb.com/wp-content/uploads/2008/12/wordpress-11-wpcamp-cena.png" alt="wordpress 11 wpcamp cena 多款wordpress图标" width="450" height="200" /></p>
<p><strong>Social Bookmark Iconset</strong> – <a href="http://vikiworks.com/2007/06/15/social-bookmark-iconset/"><span style="color: #3b5a4a;">Descargar iconos (1 icons)</span></a></p>
<p><span style="color: #3b5a4a;"><img title="wordpress icons" src="http://blogandweb.com/wp-content/uploads/2008/12/wordpress-12-social-bookmar.png" alt="wordpress 12 social bookmar 多款wordpress图标" width="450" height="200" /></span></p>
<p><strong>Free Hand Drawn Doodle Icon Set for Bloggers</strong> – <a href="http://www.blog.spoongraphics.co.uk/freebies/free-hand-drawn-doodle-icon-set-for-bloggers"><span style="color: #3b5a4a;">Descargar iconos (1 icons)</span></a></p>
<p><span style="color: #3b5a4a;"><img title="wordpress icons" src="http://blogandweb.com/wp-content/uploads/2008/12/wordpress-13-free-hand.jpg" alt="wordpress 13 free hand 多款wordpress图标" width="450" height="200" /></span></p>
<p><strong>webtoolkit4.me icon set</strong> – <a href="http://webtoolkit4.me/2008/09/05/webtoolkit4me-releases-the-first-icon-set/"><span style="color: #3b5a4a;">Descargar iconos (1 icons)</span></a></p>
<p><span style="color: #3b5a4a;"><img title="wordpress icons" src="http://blogandweb.com/wp-content/uploads/2008/12/wordpress-14-webtoolkit4.png" alt="wordpress 14 webtoolkit4 多款wordpress图标" width="450" height="200" /></span></p>
<p><strong>Aquaticus Social</strong> – <a href="http://jwloh.deviantart.com/art/Aquaticus-Social-91014249"><span style="color: #3b5a4a;">Descargar iconos (1 icons)</span></a></p>
<p><span style="color: #3b5a4a;"><img title="wordpress icons" src="http://blogandweb.com/wp-content/uploads/2008/12/wordpress-15-aquaticus-soci.png" alt="wordpress 15 aquaticus soci 多款wordpress图标" width="450" height="200" /></span></p>
<p><strong>Social me</strong> – <a href="http://jwloh.deviantart.com/art/Social-me-90694011"><span style="color: #3b5a4a;">Descargar iconos (1 icons)</span></a></p>
<p><span style="color: #3b5a4a;"><img title="wordpress icons" src="http://blogandweb.com/wp-content/uploads/2008/12/wordpress-16-social-me.png" alt="wordpress 16 social me 多款wordpress图标" width="450" height="200" /></span></p>
<p><strong>Web service Lemoned</strong> – <a href="http://ilemoned.deviantart.com/art/Web-Services-39432766"><span style="color: #3b5a4a;">Descargar iconos (1 icons)</span></a></p>
<p><span style="color: #3b5a4a;"><img title="wordpress icons" src="http://blogandweb.com/wp-content/uploads/2008/12/wordpress-17-lemoned.png" alt="wordpress 17 lemoned 多款wordpress图标" width="450" height="200" /></span></p>
<p><strong>Boxpress Icons</strong> – <a href="http://xyberneticos.com/index.php/2008/10/05/boxpress-icons-by-xyberneticoscom/"><span style="color: #3b5a4a;">Descargar iconos (1 icons)</span></a></p>
<p><img title="wordpress icons" src="http://blogandweb.com/wp-content/uploads/2008/12/wordpress-18-boxpress.png" alt="wordpress 18 boxpress 多款wordpress图标" width="450" height="200" /></p>
<p><img title="wp-jmoore-g" src="http://www.blog1984.com/wp-content/uploads/2009/04/wp-jmoore-g.png" alt="wp-jmoore-g" width="303" height="94" /><img title="wp-jmoore-b" src="http://www.blog1984.com/wp-content/uploads/2009/04/wp-jmoore-b.png" alt="wp-jmoore-b" width="303" height="94" /><img title="wp-jmoore-r" src="http://www.blog1984.com/wp-content/uploads/2009/04/wp-jmoore-r.png" alt="wp-jmoore-r" width="303" height="94" /></p>
<p><img title="heart-wordpress" src="http://www.blog1984.com/wp-content/uploads/2009/04/heart-wordpress.png" alt="heart-wordpress" width="80" height="15" />  <img title="wp-button-1" src="http://www.blog1984.com/wp-content/uploads/2009/04/wp-button-1.png" alt="wp-button-1" width="80" height="15" />  <img title="wp-button-3" src="http://www.blog1984.com/wp-content/uploads/2009/04/wp-button-3.png" alt="wp-button-3" width="80" height="15" />    <img title="wp-button-4" src="http://www.blog1984.com/wp-content/uploads/2009/04/wp-button-4.gif" alt="wp-button-4" width="80" height="15" />    <img title="wp-icon" src="http://www.blog1984.com/wp-content/uploads/2009/04/wp-icon.png" alt="wp-icon" width="80" height="15" /></p>
<p><img title="wp-brasil" src="http://www.blog1984.com/wp-content/uploads/2009/04/wp-brasil.png" alt="wp-brasil" width="204" height="190" /><img title="wordpressicon-hanttula3" src="http://www.blog1984.com/wp-content/uploads/2009/04/wordpressicon-hanttula3.jpg" alt="wordpressicon-hanttula3" width="193" height="80" /><img title="dandy-pink" src="http://www.blog1984.com/wp-content/uploads/2009/04/dandy-pink.png" alt="dandy-pink" width="161" height="142" /></p>
<p>………….</p>
<p><img title="dandy-logo" src="http://www.blog1984.com/wp-content/uploads/2009/04/dandy-logo.png" alt="dandy-logo" width="161" height="142" /><img title="wp-button-5" src="http://www.blog1984.com/wp-content/uploads/2009/04/wp-button-5.gif" alt="wp-button-5" width="127" height="105" /><img title="wp-button-7" src="http://www.blog1984.com/wp-content/uploads/2009/04/wp-button-7.gif" alt="wp-button-7" width="88" height="31" /><img title="wp-button-6" src="http://www.blog1984.com/wp-content/uploads/2009/04/wp-button-6.gif" alt="wp-button-6" width="75" height="52" /><img title="wp-20-square-button-trans" src="http://www.blog1984.com/wp-content/uploads/2009/04/wp-20-square-button-trans.gif" alt="wp-20-square-button-trans" width="100" height="100" /><img title="wp-20-square-button" src="http://www.blog1984.com/wp-content/uploads/2009/04/wp-20-square-button.gif" alt="wp-20-square-button" width="112" height="112" /><img title="wp-20-button-trans" src="http://www.blog1984.com/wp-content/uploads/2009/04/wp-20-button-trans.gif" alt="wp-20-button-trans" width="200" height="55" /><img title="wp-20-button-small-trans" src="http://www.blog1984.com/wp-content/uploads/2009/04/wp-20-button-small-trans.gif" alt="wp-20-button-small-trans" width="120" height="50" /><img title="wp-20-button-small" src="http://www.blog1984.com/wp-content/uploads/2009/04/wp-20-button-small.gif" alt="wp-20-button-small" width="132" height="62" /><img title="wp-20-button" src="http://www.blog1984.com/wp-content/uploads/2009/04/wp-20-button.gif" alt="wp-20-button" width="212" height="68" /><img title="wordpressicon-hanttula2" src="http://www.blog1984.com/wp-content/uploads/2009/04/wordpressicon-hanttula2.gif" alt="wordpressicon-hanttula2" width="80" height="80" />   <img title="wordpressicon-hanttula1" src="http://www.blog1984.com/wp-content/uploads/2009/04/wordpressicon-hanttula1.gif" alt="wordpressicon-hanttula1" width="80" height="80" />   <img title="black-120x90" src="http://www.blog1984.com/wp-content/uploads/2009/04/black-120x90.png" alt="black-120x90" width="120" height="90" />   <img title="black-120x45" src="http://www.blog1984.com/wp-content/uploads/2009/04/black-120x45.png" alt="black-120x45" width="120" height="45" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.benmao.com/archives/1322/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>禁用或开启 WordPress 管理员工具栏</title>
		<link>http://www.benmao.com/archives/1307</link>
		<comments>http://www.benmao.com/archives/1307#comments</comments>
		<pubDate>Sat, 26 Mar 2011 10:59:22 +0000</pubDate>
		<dc:creator>笨猫</dc:creator>
				<category><![CDATA[猫玩技术]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.benmao.com/?p=1307</guid>
		<description><![CDATA[最新的 WordPress 3.1 版本中添加了对管理员工具栏的支持，升级过的童鞋应该都能看到。 默认这坨东西会在前台开启。想要禁用也非常简单：今后控制面板，选择左侧的“用户”标签，然后点击某个用户，针对该用户设定“显示管理工具栏”项即可。勾选“在浏览站点时”则前台显示，勾选“在控制板中”则后台显示。 另外，有一款叫做 Admin Bar Minimiser 的插件，可以最小化管理员工具栏。]]></description>
			<content:encoded><![CDATA[<p>最新的 <a href="http://www.benmao.com/archives/tag/wordpress" class="st_tag internal_tag" rel="tag" title="标签 wordpress 下的日志">WordPress</a> 3.1 版本中添加了对管理员工具栏的支持，升级过的童鞋应该都能看到。</p>
<p>默认这坨东西会在前台开启。想要禁用也非常简单：今后控制面板，选择左侧的“用户”标签，然后点击某个用户，针对该用户设定“显示管理工具栏”项即可。勾选“在浏览站点时”则前台显示，勾选“在控制板中”则后台显示。</p>
<p>另外，有一款叫做 Admin Bar Minimiser 的插件，可以最小化管理员工具栏。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benmao.com/archives/1307/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>加快 WordPress 载入速度的小技巧</title>
		<link>http://www.benmao.com/archives/1175</link>
		<comments>http://www.benmao.com/archives/1175#comments</comments>
		<pubDate>Thu, 09 Dec 2010 02:49:58 +0000</pubDate>
		<dc:creator>笨猫</dc:creator>
				<category><![CDATA[猫玩技术]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.benmao.com/?p=1175</guid>
		<description><![CDATA[Blog 放在国外的虚拟主机上，速度自然不能和在国内相提并论，这对访客的耐心是极大的考验，所以在国外主机上开博的同学有必要对自己的 Blog 进行一番自我优化，让浏览速度快一点，再快一点。 影响页面载入浏览器速度的因素很多，抛开主机本身的连接速度不谈，主要说一下调整 WordPress 终端显示方面的优化。 1. 模板。Wordpress 可用的花哨酷炫模板很多，可惜一切的效果都是要付出代价的，需要载入的图片和JS文件多了，页面打开自然就慢了。一个 Blog 如果主要靠内容吸引访客，建议还是将模板更换成纯 CSS 或者图片调用较少的模板。使用这类模板，访客浏览页面时不会因为\请求过多图片耗费载入时间，页面打开的速度自然快一些。 2. 外部调用。很多 Web 2.0 网站都会提供针对 Blog 侧边栏的应用，这些加入侧边栏的小玩意固然能够在一定程度上起到丰富内容和增加功能的作用，但同时也拖慢了页面载入的速度。要知道，访客访问你的 Blog，同时还要被迫向大量外部网站请求内容，怎么会不慢呢？ 3. 精简首页。除了上面说过的侧边栏，首页文章数目也是影响影响载入速度的原因之一。很简单的道理，内容越多，载入越慢。同时，还是应该在首页上提供全文显示，难道为了读完一篇文章，访客还需再载入一个页面？等他们有评论需求的时候再说吧。 4. 插件。这里不说少用插件，而是说增加插件的事儿。像 Ajax-Comments 一类的插件也许会增加一两个额外文件的调用，但是有访客评论的它可以避免多一次的页面刷新，免除了速度上的考虑。若是有兴趣做成全站 ajax 效果，那国外虚拟主机速度上的劣势真的可以忽略不计了。 5. 静态化。Wordpress 是动态化输出是人都知道。无论是否出于效率目的，还是应该静态化页面，至少这样会比每次访客访问页面再让 WordPress 从数据库调用内容快得多。相关插件比较多，推荐 Cosbeta 的 cos-html-cache 和 Richardo 的 WP-Cache。 以上5条的建议成分大于技巧，具体实施起来许多人都会有自己的一套。我自己认为在数据库和页面代码方面做优化意义不大，首先，Wordpress 发展了这么久，数据库结构已经相当成熟，能够优化且带来提升的方法有限；其次，页面代码方面能够做自行优化的人早就做了，Wordpress 的模板如此多，不可能有统一的优化方案。至于 WordPress 提升速度的终极方案，我觉得还是应该多考虑主机方面，毕竟快与不快的直接提现就是主机速度。这两天我也发现了一些主机选择的新趋势，一是国内的 Blog 专用主机，这类主机不求大而全，主打“专用”概念，若是觉得备案也不是那么麻烦，还是应该首选此类主机；二是新加坡主机，因为新加坡的互联网国际出口带宽仅次于美国，而且比邻中国，大部分时间从国内访问位于新加坡的主机甚至略快于许多位于国内的主机，同时没有备案和审查的烦恼，值得考虑。]]></description>
			<content:encoded><![CDATA[<p>Blog 放在国外的虚拟主机上，速度自然不能和在国内相提并论，这对访客的耐心是极大的考验，所以在国外主机上开博的同学有必要对自己的 Blog 进行一番自我优化，让浏览速度快一点，再快一点。</p>
<p>影响页面载入浏览器速度的因素很多，抛开主机本身的连接速度不谈，主要说一下调整 <a rel="external" href="http://wordpress.org/about/">WordPress</a> 终端显示方面的优化。</p>
<p>1. 模板。<a href="http://www.benmao.com/archives/tag/wordpress" class="st_tag internal_tag" rel="tag" title="标签 wordpress 下的日志">Wordpress</a> 可用的花哨酷炫模板很多，可惜一切的效果都是要付出代价的，需要载入的图片和JS文件多了，页面打开自然就慢了。一个 Blog 如果主要靠内容吸引访客，建议还是将模板更换成纯 <a href="http://www.benmao.com/archives/tag/css" class="st_tag internal_tag" rel="tag" title="标签 css 下的日志">CSS</a> 或者图片调用较少的模板。使用这类模板，访客浏览页面时不会因为\请求过多图片耗费载入时间，页面打开的速度自然快一些。</p>
<p>2. 外部调用。很多 Web 2.0 网站都会提供针对 Blog 侧边栏的应用，这些加入侧边栏的小玩意固然能够在一定程度上起到丰富内容和增加功能的作用，但同时也拖慢了页面载入的速度。要知道，访客访问你的 Blog，同时还要被迫向大量外部网站请求内容，怎么会不慢呢？</p>
<p>3. 精简首页。除了上面说过的侧边栏，首页文章数目也是影响影响载入速度的原因之一。很简单的道理，内容越多，载入越慢。同时，还是应该在首页上提供全文显示，难道为了读完一篇文章，访客还需再载入一个页面？等他们有评论需求的时候再说吧。</p>
<p>4. <a href="http://www.benmao.com/archives/tag/%e6%8f%92%e4%bb%b6" class="st_tag internal_tag" rel="tag" title="标签 插件 下的日志">插件</a>。这里不说少用插件，而是说增加插件的事儿。像 <a rel="external" href="http://wordpress.org/extend/plugins/wp-ajax-edit-comments/#post-1706">Ajax-Comments</a> 一类的插件也许会增加一两个额外文件的调用，但是有访客评论的它可以避免多一次的页面刷新，免除了速度上的考虑。若是有兴趣做成全站 ajax 效果，那国外虚拟主机速度上的劣势真的可以忽略不计了。</p>
<p>5. 静态化。Wordpress 是动态化输出是人都知道。无论是否出于效率目的，还是应该静态化页面，至少这样会比每次访客访问页面再让 WordPress 从数据库调用内容快得多。相关插件比较多，推荐 <a rel="external" href="http://www.storyday.com/">Cosbeta</a> 的 <a rel="external" href="http://www.storyday.com/html/y2007/1213_cos-html-cache-2.html">cos-html-cache</a> 和 <a rel="external" href="http://mnm.uib.es/gallir/">Richardo</a> 的 <a rel="external" href="http://mnm.uib.es/gallir/wp-cache-2/">WP-Cache</a>。</p>
<p>以上5条的建议成分大于技巧，具体实施起来许多人都会有自己的一套。我自己认为在数据库和页面代码方面做优化意义不大，首先，Wordpress 发展了这么久，数据库结构已经相当成熟，能够优化且带来提升的方法有限；其次，页面代码方面能够做自行优化的人早就做了，Wordpress 的模板如此多，不可能有统一的优化方案。至于 WordPress 提升速度的终极方案，我觉得还是应该多考虑主机方面，毕竟快与不快的直接提现就是主机速度。这两天我也发现了一些主机选择的新趋势，一是国内的 Blog 专用主机，这类主机不求大而全，主打“专用”概念，若是觉得备案也不是那么麻烦，还是应该首选此类主机；二是新加坡主机，因为新加坡的互联网国际出口带宽仅次于美国，而且比邻中国，大部分时间从国内访问位于新加坡的主机甚至略快于许多位于国内的主机，同时没有备案和审查的烦恼，值得考虑。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benmao.com/archives/1175/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>WordPress 随机彩色标签的实现方法</title>
		<link>http://www.benmao.com/archives/1105</link>
		<comments>http://www.benmao.com/archives/1105#comments</comments>
		<pubDate>Fri, 23 Jul 2010 02:49:03 +0000</pubDate>
		<dc:creator>笨猫</dc:creator>
				<category><![CDATA[猫玩技术]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[tag]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.benmao.com/?p=1105</guid>
		<description><![CDATA[在 WordPress 博客系统中，使用标签组织归类文章是极为有效的方式。为了给予用户强大的视觉冲击力，强调标签的重要性是 WordPress 主题设计的一个基本要素。这个自我感觉还不错的效果之前也有读者询问过，现在做个 WordPress 随机彩色标签的实现方法的分享。 按照笨猫首页现在的实现方式，随机彩色其实很容易。先来按照常理输出标签列表的代码： &#60;?php wp_tag_cloud(); ?&#62; 如果为标签添加背景色，就需要为每个标签元素设置 CSS 类来定义其样式。 首先，使用获取标签列表对象： $tags = get_the_tags(); 然后，使用 foreach 函数遍历标签列表，循环输出标签名称和链接地址等信息，代码如下： foreach($tags as $tag) echo '&#60;a href="'.get_tag_link($tag -&#62; term_id).'"&#62;'.$tag -&#62; name.'&#60;/a&#62;'; ?&#62; 完整的随机背景颜色代码为： &#60;?php $tags = get_the_tags(); foreach($tags as $tag) echo ' &#60;li&#62;&#60;a href="'.get_tag_link($tag -&#62; term_id).'"&#62;'.$tag -&#62; name.'&#60;/a&#62;&#60;/li&#62;'; ?&#62; 注意到其中的 rand(1, 5) 函数产生数字 1~5，则每一个标签的标记可以使用诸如 tag-1 [...]]]></description>
			<content:encoded><![CDATA[<p>在 <a href="http://www.benmao.com/archives/tag/wordpress" class="st_tag internal_tag" rel="tag" title="标签 wordpress 下的日志">WordPress</a> 博客系统中，使用标签组织归类文章是极为有效的方式。为了给予用户强大的视觉冲击力，强调标签的重要性是 <a href="http://www.benmao.com/archives/tag/wordpress" class="st_tag internal_tag" rel="tag" title="标签 wordpress 下的日志">WordPress</a> 主题设计的一个基本要素。这个自我感觉还不错的效果之前也有读者询问过，现在做个 <a href="http://www.benmao.com/archives/tag/wordpress" class="st_tag internal_tag" rel="tag" title="标签 wordpress 下的日志">WordPress</a> 随机彩色标签的实现方法的分享。</p>
<p>按照笨猫首页现在的实现方式，随机彩色其实很容易。先来按照常理输出标签列表的代码：</p>
<pre>&lt;?php wp_<a href="http://www.benmao.com/archives/tag/tag" class="st_tag internal_tag" rel="tag" title="标签 tag 下的日志">tag</a>_cloud(); ?&gt;</pre>
<p>如果为标签添加背景色，就需要为每个标签元素设置 <a href="http://www.benmao.com/archives/tag/css" class="st_tag internal_tag" rel="tag" title="标签 css 下的日志">CSS</a> 类来定义其样式。</p>
<p>首先，使用获取标签列表对象：</p>
<pre>$tags = get_the_tags();</pre>
<p>然后，使用 foreach 函数遍历标签列表，循环输出标签名称和链接地址等信息，代码如下：</p>
<pre>foreach($tags as $tag) echo '&lt;a href="'.get_tag_link($tag -&gt; term_id).'"&gt;'.$tag -&gt; name.'&lt;/a&gt;'; ?&gt;</pre>
<p>完整的随机背景颜色代码为：</p>
<pre>&lt;?php $tags = get_the_tags(); foreach($tags as $tag) echo '
&lt;li&gt;&lt;a href="'.get_tag_link($tag -&gt; term_id).'"&gt;'.$tag -&gt; name.'&lt;/a&gt;&lt;/li&gt;'; ?&gt;</pre>
<p>注意到其中的 rand(1, 5) 函数产生数字 1~5，则每一个标签的标记可以使用诸如 tag-1 的样式。</p>
<p>最后通过 CSS 定义 tag-1 至 tag-5 五个不同背景颜色的样式即可：</p>
<pre>.tag-1{background:red;}
.tag-2{background:blue;}
...
.tag-5{background:green;}</pre>
<p>当然，如果你不想输出太多颜色限制，还有一个输出随机背景色的方法：</p>
<pre>&lt;?php echo '&lt;li style="background:rgb(255,0,0);"&gt;笨猫 - <a href="http://www.benmao.com&lt;/li&gt;'">www.benmao.com&lt;/li&gt;'</a>; ?&gt;</pre>
<p>实现的方法其实是和第一种一致的，有兴趣可以尝试第二种。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benmao.com/archives/1105/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>WordPress不同页面显示不同侧边栏内容</title>
		<link>http://www.benmao.com/archives/1083</link>
		<comments>http://www.benmao.com/archives/1083#comments</comments>
		<pubDate>Tue, 01 Jun 2010 00:58:08 +0000</pubDate>
		<dc:creator>笨猫</dc:creator>
				<category><![CDATA[猫玩技术]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[侧边栏]]></category>

		<guid isPermaLink="false">http://www.benmao.com/?p=1083</guid>
		<description><![CDATA[以前实现WordPress不同页面显示不同侧边栏内容，逅客使用的是WordPress Widget Logic插件，推荐使用WordPress Display Widgets插件。用起来很方便，所以在这里做个启用记录。 WordPress Display Widgets插件简单介绍： WordPress 2.8或更高版本下都可正常使用，使用这个插件可以通过给每个widget添加复选框来控制它是否在每个页面显示或隐藏，避免创建多个侧边栏和重复的widget。 Display Widgets插件下载解压后上传到/wp-content/plugins目录里，登录网站后台在已安装插件中启用，这个插件，不用修改代码，轻松实现不同页面不同侧边栏内容的效果。默认状态下，“Hide on Checked”（隐藏选中项）选中，所有复选框留空，即所有当前widget在所有页面都显示。 下拉选单中控制在选中页面隐藏还是显示。 Show/Hide Widget 显示/隐藏Widget Show on checked 选中项显示。这个widget会在勾选页面显示。 Hide on checked 勾选项隐藏。 这个widget会在勾选页面隐藏。 下半部分则是选择具体的页面，前面的就不说了，都是你的各个“页面”名称。不过在这个列表的末尾有两项： Pages：单独页面 Archives Page 存档页面 Categories：文章类型 Single Post Page 单篇日志页面 Miscellaneous：功能页面 还有rchives Page Blog Page 404 Page。 就这么些了，更多资料请查看百度Google。]]></description>
			<content:encoded><![CDATA[<p>以前实现WordPress不同页面显示不同侧边栏内容，逅客使用的是WordPress Widget Logic插件，推荐使用WordPress Display Widgets插件。用起来很方便，所以在这里做个启用记录。</p>
<p><strong><a href="http://www.benmao.com/archives/tag/wordpress" class="st_tag internal_tag" rel="tag" title="标签 wordpress 下的日志">WordPress</a> Display Widgets插件简单介绍：</strong><br />
WordPress 2.8或更高版本下都可正常使用，使用这个插件可以通过给每个widget添加复选框来控制它是否在每个页面显示或隐藏，避免创建多个侧边栏和重复的widget。</p>
<p>Display Widgets插件下载解压后上传到/wp-content/plugins目录里，登录网站后台在已安装插件中启用，这个插件，不用修改代码，轻松实现不同页面不同侧边栏内容的效果。默认状态下，“Hide on Checked”（隐藏选中项）选中，所有复选框留空，即所有当前widget在所有页面都显示。</p>
<p>下拉选单中控制在选中页面隐藏还是显示。</p>
<p>Show/Hide Widget 显示/隐藏Widget</p>
<p>Show on checked 选中项显示。这个widget会在勾选页面显示。</p>
<p>Hide on checked 勾选项隐藏。 这个widget会在勾选页面隐藏。</p>
<p>下半部分则是选择具体的页面，前面的就不说了，都是你的各个“页面”名称。不过在这个列表的末尾有两项：</p>
<p>Pages：单独页面</p>
<p>Archives Page 存档页面</p>
<p>Categories：文章类型</p>
<p>Single Post Page 单篇日志页面</p>
<p>Miscellaneous：功能页面</p>
<p>还有rchives Page Blog Page 404 Page。</p>
<p>就这么些了，更多资料请查看百度Google。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benmao.com/archives/1083/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

