<?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>Think Again &#187; Hacks</title>
	<atom:link href="http://www.thinkagain.cn/archives/tag/hacks/feed" rel="self" type="application/rss+xml" />
	<link>http://www.thinkagain.cn</link>
	<description>Inspire thinking, inspire creativity, inspire future.</description>
	<lastBuildDate>Wed, 01 Feb 2012 07:31:56 +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 Hacks:WP2.2版后中文邮件标题乱码解决方法</title>
		<link>http://www.thinkagain.cn/archives/994.html</link>
		<comments>http://www.thinkagain.cn/archives/994.html#comments</comments>
		<pubDate>Tue, 09 Sep 2008 12:58:14 +0000</pubDate>
		<dc:creator>山之岚</dc:creator>
				<category><![CDATA[Blogger]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.thinkagain.cn/?p=994</guid>
		<description><![CDATA[今天，Wordpress官方发布了2.6.2版。没有跑去Trac看代码变动地方，直接就将程序下载了。照例是修改几处源代码以及将akismet删掉。然后上传升级。一切都很顺利。从更新上看，似乎2.6.2没有多大... ]]></description>
			<content:encoded><![CDATA[<p>今天，Wordpress官方发布了2.6.2版。没有跑去<a href="http://trac.wordpress.org/browser" target="_blank">Trac</a>看代码变动地方，直接就将程序下载了。照例是修改几处源代码以及将akismet删掉。然后上传升级。一切都很顺利。从更新上看，似乎2.6.2没有多大变化，运行upgrade.php，并未提示更新数据库。看来此版本的升级无涉及数据库方面的更改。</p>
<p><!--myadsense--></p>
<p>在朋友站点逛了圈，发现还是有很多WP站点发送的中文邮件标题容易出现乱码情况。索性将其解决方法放上来。此方法从2.2起至当前的2.6.2均有效。建议网友根据文中代码，自行修改源代码。</p>
</p>
<p>具体做法：</p>
<p>用文本编辑器打开wp-includes/class-phpmailer.php，在EncodeHeader函数内找到下列代码，大概在1165-1175行左右。</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">if</span> (strlen($str)/3 &lt; $x) {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span>     $encoding = <span style="color: #006080">'B'</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>     $encoded = base64_encode($str);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>     $maxlen -= $maxlen % 4;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span>     $encoded = trim(chunk_split($encoded, $maxlen, <span style="color: #006080">&quot;\n&quot;</span>));</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span> } <span style="color: #0000ff">else</span> {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span>     $encoding = <span style="color: #006080">'Q'</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span>     $encoded = $<span style="color: #0000ff">this</span>-&gt;EncodeQ($str, $position);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span>     $encoded = $<span style="color: #0000ff">this</span>-&gt;WrapText($encoded, $maxlen, <span style="color: #0000ff">true</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span>     $encoded = str_replace(<span style="color: #006080">&quot;=&quot;</span>.$<span style="color: #0000ff">this</span>-&gt;LE, <span style="color: #006080">&quot;\n&quot;</span>, trim($encoded));</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  11:</span> }</pre>
</div>
</div>
<p>将上述中的第4，5和9行前面加上注释符号&quot;//&quot;，使之失效。如下：</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">if</span> (strlen($str)/3 &lt; $x) {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span>     $encoding = <span style="color: #006080">'B'</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>     $encoded = base64_encode($str);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>     <span style="color: #008000">//$maxlen -= $maxlen % 4;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span>     <span style="color: #008000">//$encoded = trim(chunk_split($encoded, $maxlen, &quot;\n&quot;));</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span> } <span style="color: #0000ff">else</span> {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span>     $encoding = <span style="color: #006080">'Q'</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span>     $encoded = $<span style="color: #0000ff">this</span>-&gt;EncodeQ($str, $position);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span>     <span style="color: #008000">//$encoded = $this-&gt;WrapText($encoded, $maxlen, true);</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span>     $encoded = str_replace(<span style="color: #006080">&quot;=&quot;</span>.$<span style="color: #0000ff">this</span>-&gt;LE, <span style="color: #006080">&quot;\n&quot;</span>, trim($encoded));</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  11:</span> }</pre>
</div>
</div>
<p>保存退出，将修改后的class-phpmailer.php文件上传到服务器上。</p>
<p><strong>注：</strong>此法并不是我原创，乃是N久前在网上搜索到的。原出处也已忘记，故无法在此将出处标出。敬请见谅。</p>
<hr/><p style="font-size:1.5em;font-weight:bold;"><a href="http://www.thinkagain.cn/archives/994.html#comments">评论22:</a></p><p><strong>22.</strong><i>2008.09.15.10:53.pm</i>.&nbsp;<a href="http://www.snowyy.com/">不常识</a>: 当时请教过很多人，都被诊断为绝症了。但从朋友知他有经验，为了以前的文章也要付了……</p><p><strong>21.</strong><i>2008.09.13.7:57.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: <a href="#comment-71802" rel="nofollow">@不常识 </a>嗯，200元买的药方。只能说对方太恶心了，基于一个开源平台的Wordpress，解决一个小问题还要收费，个人比较不大喜好这种做法。</p><p><strong>20.</strong><i>2008.09.13.7:48.pm</i>.&nbsp;<a href="http://www.snowyy.com/">不常识</a>: 乱码问题我今年初遇过，花了200元买的药方啊~~~</p><p><strong>19.</strong><i>2008.09.13.12:07.am</i>.&nbsp;<a href="http://www.hypfx.com">流星</a>: 据在我博客上回复的beach指出，说是2.6.2已经改进了这个问题了……但是我确实修改时候没看到那个注释……</p><p><strong>18.</strong><i>2008.09.12.8:38.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: <a href="#comment-71687" rel="nofollow">@HE Yi </a>这个这个，需要澄清下，不是我原创的。</p><p><strong>17.</strong><i>2008.09.12.7:54.pm</i>.&nbsp;<a href="http://heyi.name">HE Yi</a>: 原创万岁！创新万岁！ <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_cool.gif' alt=':cool:' class='wp-smiley' /> </p><p><strong>16.</strong><i>2008.09.12.3:40.pm</i>.&nbsp;<a href="http://smartr.cn">Jinwen</a>: 自己懒着，不更新了。</p><p><strong>15.</strong><i>2008.09.11.7:24.pm</i>.&nbsp;<a href="http://www.cnpabi.com">pabi</a>: THX,DUDE</p><p><strong>14.</strong><i>2008.09.11.3:43.pm</i>.&nbsp;<a href="http://www.wodidai.com">花果山寨</a>: 谢谢提醒，马上更正！</p><p><strong>13.</strong><i>2008.09.10.8:33.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: <a href="#comment-71528" rel="nofollow">@流星 </a>意识形态挂帅的话，容易把自己弄得很累吧。</p><p><strong>12.</strong><i>2008.09.10.1:43.pm</i>.&nbsp;<a href="http://www.hypfx.com">流星</a>: 真赞，霏凡想去搞一个notepad++看看，结果所有下载都没有文件，而后忽然想起这作者当初在软件上说过支持zd的话，不会就此被霏凡给去除下载了吧……很寒
不过还是觉得ue其实挺方便
不过平时纯粹写txt时候，还是习惯用notexpad，虽然是2004年版本再也未更新，可是还是满好用</p><p><strong>11.</strong><i>2008.09.10.1:14.pm</i>.&nbsp;<a href="http://sink.net.ru/">二手科学家</a>: 没有更新，好像主要是安全性提高
等等2.7吧！</p><p><strong>10.</strong><i>2008.09.10.11:45.am</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: <a href="#comment-71523" rel="nofollow">@流星 </a>我一般用notepad++来编辑代码。这个小软件功能也很强大，且是免费的。</p><p><strong>9.</strong><i>2008.09.10.11:39.am</i>.&nbsp;<a href="http://www.hypfx.com">流星</a>: 我改了
发现你用的不是ue，其实我还是觉得ue方便点，行号真好找。
我把你这个转载到我博客了，修改了下，配了我的截图，留下了你的链接，呵呵</p><p><strong>8.</strong><i>2008.09.10.9:42.am</i>.&nbsp;<a href="http://pejag.cn">打篮球的手</a>: 还好没有发现乱码</p><p><strong>7.</strong><i>2008.09.09.10:51.pm</i>.&nbsp;<a href="http://www.wodidai.com">花果山寨</a>: 好了，又是一个解决的方法！3Q</p><p><strong>6.</strong><i>2008.09.09.10:42.pm</i>.&nbsp;<a href="http://www.linxo.cn/blog">ZH CEXO</a>: 刚升级来着，不明白~</p><p><strong>5.</strong><i>2008.09.09.9:57.pm</i>.&nbsp;<a href="http://www.charlestang.cn">Charles</a>: 原来如此，回头我试试</p><p><strong>4.</strong><i>2008.09.09.9:57.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: <a href="#comment-71482" rel="nofollow">@arthack </a>并不是所有中文标题都会出现乱码情况，时有时无的。具体造成的原因，我还不是很清楚，应该是和字符长度等有关系。</p><p><strong>3.</strong><i>2008.09.09.9:42.pm</i>.&nbsp;<a href="http://www.eemir3.com">Yacca</a>: 反正就12个文件么...我毅然升级掉了...</p><p><strong>2.</strong><i>2008.09.09.9:41.pm</i>.&nbsp;<a href="http://www.arthack.org">arthack</a>: 乱码我好像没有发现哦</p><p><strong>1.</strong><i>2008.09.09.9:35.pm</i>.&nbsp;<a href="http://genmicha.cn">Chada</a>: 沙发之，我还没升级到.2，懒得去升了，反正没多大变化。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_razz.gif' alt=':razz:' class='wp-smiley' /> </p><hr/><p style="font-size:1.5em;font-weight:bold;">推荐阅读</p><p><i>2008.07.27.10:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/971.html" title="WP2.6带来了很多新功能。如后台的turbo等。相比2.3到2.5，2.5到2.6之间给我的">Wordpress Hacks:如何关闭WP2.6的主题预览 (18)</a></p><p><i>2007.12.08.10:50.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/888.html" title="2007-12-09：注，我已经写了一个插件用于含有nextpage或more标签的feed全文输出">如何使用Wordpress内置的分页（Nextpage）功能？ (52)</a></p><p><i>2007.10.31.12:42.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/830.html" title="Updated:此问题已经在2.3.3中被修复。
*****************************
前几天，将Wordp">Wordpress Hacks:升级2.3.1可能出现邮件提醒失效的解决方法 (20)</a></p><p><i>2007.10.22.11:05.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/822.html" title="在wordpress中，默认点击评论者的链接时，会在同一窗口内打开该链接。这在">Wordpress Hacks: 在新窗口中打开评论者链接和no follow属性 (16)</a></p><p><i>2007.09.15.10:41.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/721.html" title="继将CSS修改符合W3C规范后，今天花了点时间，也将模板代码修改完毕，通过">继续修改模板 (4)</a></p><p><i>2007.08.21.8:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/611.html" title="又是一时心血来潮，试用过Wordpress后，想装上Movable Type 4.0玩玩看。于是就">图文介绍如何在本地服务器安装Movable Type 4.0 (15)</a></p><p><i>2007.06.11.3:55.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/189.html" title="由于博客上的图片大部分都是放在Flickr上的，所以Flickr被禁后导致国内朋友">WordPress解决Flickr图片显示方法 (3)</a></p><p><i>2007.04.30.8:14.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/161.html" title="Widgets是一个可视化Wordpress主题侧边栏编辑插件，用户可以在Wordpress后台主">如何修改代码使主题支持widgets (5)</a></p><hr/><p>Copyright &copy; 2012&nbsp;|&nbsp;<a href="http://www.thinkagain.cn">Think Again</a>&nbsp;|&nbsp;<a href="http://www.thinkagain.cn/archives/994.html">原文链接</a></p><img src="http://img.tongji.cn.yahoo.com/710673/ystat.gif"/>]]></content:encoded>
			<wfw:commentRss>http://www.thinkagain.cn/archives/994.html/feed</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>鸟儿早起</title>
		<link>http://www.thinkagain.cn/archives/978.html</link>
		<comments>http://www.thinkagain.cn/archives/978.html#comments</comments>
		<pubDate>Sun, 03 Aug 2008 02:36:09 +0000</pubDate>
		<dc:creator>山之岚</dc:creator>
				<category><![CDATA[Blogger]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.thinkagain.cn/?p=978</guid>
		<description><![CDATA[难得一个周末呆在家里，想睡个懒觉都不行。隔壁的朝鲜学校的音乐CIRCLE的学生们又在练习。又弹又唱。无奈只好早起，继续修整我的WP模板。顺便煮了个半熟的水蒲蛋合着面包加香蕉慰劳下肚... ]]></description>
			<content:encoded><![CDATA[<p>难得一个周末呆在家里，想睡个懒觉都不行。隔壁的朝鲜学校的音乐CIRCLE的学生们又在练习。又弹又唱。无奈只好早起，继续修整我的WP模板。顺便煮了个半熟的水蒲蛋合着面包加香蕉慰劳下肚子。</p>
<p>1. 将模板做了调整，把文章页的评论改为按正常（升序）排列，这样回复起来比较方便。</p>
<p>2. 修正原来文章页留言内无法点击留言者链接的BUG，原因是显示序号的DIV宽度设置太长了，导致将留言者链接给遮住了。</p>
<p>3. 考虑到现在友情链接实在是不少，全部挂在首页，弄得侧边栏给撑得太长了。新建一个Friends页面。挂上自己新写的一个插件（Hot_friends），以类似标签云的形式将全部友情链接放进去，效果详见<a title="http://www.thinkagain.cn/friends" href="http://www.thinkagain.cn/friends">http://www.thinkagain.cn/friends</a>。</p>
<p>4. 所有页面上挂上Hot Friends。所谓Hot Friends，我是按留言数来判读的，留言数头20名的网友将被视为Hot Friends，在全站侧边栏内显示。</p>
</p>
<p>关于Hot Friends插件，这是自己新写的一个友情链接管理的插件。基本功能有二，其一，能按评论留言数量，显示指定数量的Hot Friends，显示效果见侧边栏。Hot Friends会自动定期更新，其显示排列也会根据评论数动态变化，具有一定的互动效果。其二，支持生成友情链接云，如<a title="http://www.thinkagain.cn/friends" href="http://www.thinkagain.cn/friends">此页面</a>显示。</p>
<p>之所以写这个插件，主要是考虑到目前站内的友情链接比较多。因我本人对交换友情链接要求比较低，偏重于博客的内容，对于PR或者收录等等均无太大要求，希望互换链接，共同加油共同成长。不知不觉下来，也有好几十个友情链接了。且友情链接均放置在首页。难免出现有些朋友仅为PR或者所谓SEO而交换链接，这样也就违背了我的初衷。因而就产生了写一个此插件间接将这部分人的链接隔离开来的想法。花了点时间，将自己的想法给折腾出来了。目前仅采用友情链接里的网友的评论数做为指标给友情链接排序，将排序位置在前的一部分朋友视为Hot Friends。将鼠标移至链接上，可以查看该网友的评论数。因为能经常博客留言的网友事实上大都能和自己在某方面趣味相同，相反不常留言或者基本没有留言的网友为了PR或SEO的可能性就比较高了。估计这种做法可能会引起部分朋友的不满，特别是新加链接的朋友。嗯，有臭鸡蛋就扔过来吧。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_redface.gif' alt=':oops:' class='wp-smiley' />  </p>
<p>而事实上，将这个Hot Friends理出来后，我发现还蛮和实际情况吻合的。位于Fot Friends序列里面的几个网友也的确是和自己来往比较多的。如<a href="http://lxz.name/">他</a>，还有<a href="http://ecvip.org/">他</a>，<a href="http://www.marketing-life.cn/">他</a>，<a href="http://www.genmicha.cn/">他</a>，<a href="http://realaxt.com/">他</a>以及<a href="http://www.ideatalks.cn/">他</a>等等(先给你们送几个BACKLINK)。既然是Hot Friends，挂个全站显示也是理所当然的。当然该序列里的朋友，我会经常去踩踩的。在侧边栏里面列出来，也方便自己查看以及点击等。</p>
<p>此插件目前还处于Beta，严重欢迎留言，送鲜花或是投臭鸡蛋。顺便提高下自己的RANKING。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /> </p>
<hr/><p style="font-size:1.5em;font-weight:bold;"><a href="http://www.thinkagain.cn/archives/978.html#comments">评论43:</a></p><p><strong>43.</strong><i>2008.08.05.9:07.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: @askie:呵呵，多多交流啊。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_razz.gif' alt=':razz:' class='wp-smiley' />  
@mygtd:嗯，有利有弊，嘿嘿，被我占便宜了。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /> </p><p><strong>42.</strong><i>2008.08.05.8:43.pm</i>.&nbsp;<a href="http://www.eemir3.com/2008/08/sorry-for-my-jijiwaiwai.html">请大家务必原谅我的唧唧歪歪 | Movie Castle</a>: [...] 　　废话一堆,来点实际的吧,ThinkAgain师兄之前在研究如何更合理的显示友情链接,的确,当友情链接到达一定数量后,就必然是选择部分显示到首页,不然这个模块会显得异常拥挤和庞大,而选择部分就又出现了别的问题,选择谁的链接到首页呢?! 这牵涉到公平与否,比较棘手. 师兄给出了个方案,从友情链接从挑选固定期限譬如一周内评论最多的若干个友链到首页显示,这样做对于死链来说打击是致命的,而对于真正活跃的博友来说则又是异常激动人心滴,所以我对师兄的这款插件非常期待,届时将有widgets及code形式方便大家自由选择. 另外我有点疑问,假如设定一周更新一次,那时间到的一刹那,不就是空白了么...这和我这里的评论榜是一样的,一周结束后则必然会遇到一个真空期...^^ 嘿嘿,师兄加点挑衅的语言在其中应该不是难事~ [...]</p><p><strong>41.</strong><i>2008.08.05.7:41.pm</i>.&nbsp;<a href="http://www.mygtd.cn">mygtd</a>: 不错，不错，博主这个Hot Friends构思不错，只是苦了我这些比较少留言的人啦，我是专门在首页有您的东东啦，呵呵</p><p><strong>40.</strong><i>2008.08.05.7:11.pm</i>.&nbsp;<a href="http://www.pkphp.com">askie</a>:  <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' />  
从think的代码中学到一点东西！
哈哈！
另外关于自助链接这块自己的插件也出来了！
谢谢交流和帮助！</p><p><strong>39.</strong><i>2008.08.05.10:25.am</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: @Yacca:如果自己的博客能提供一个供网友们讨论的平台，何乐而不为呢？ <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_wink.gif' alt=':wink:' class='wp-smiley' />  
评论的动力源自与参与，可见你站点的魅力可不小啊。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_razz.gif' alt=':razz:' class='wp-smiley' /> </p><p><strong>38.</strong><i>2008.08.05.10:07.am</i>.&nbsp;<a href="http://www.eemir3.com">Yacca</a>: 刷评论的最大原因是...还是那回复插件让评论变的太简单了-.-</p><p><strong>37.</strong><i>2008.08.04.10:15.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: 嘿，看来这个压力还蛮大的。ddkk3000的建议，实现起来不是很难，会添加进去的。</p><p><strong>36.</strong><i>2008.08.04.10:06.pm</i>.&nbsp;<a href="http://www.arthack.org">Art Hack</a>: 我住楼顶，这个插件不错，希望完善！</p><p><strong>35.</strong><i>2008.08.04.9:59.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: 嗯，这功能也可以考虑下。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_razz.gif' alt=':razz:' class='wp-smiley' /> </p><p><strong>34.</strong><i>2008.08.04.9:59.pm</i>.&nbsp;<a href="http://lxz.name">ddkk3000</a>: 这样你就可以省了友情链接交换的留言了。与人方便自己方便嘛。如果都是废话再删除就行了。</p><p><strong>33.</strong><i>2008.08.04.9:58.pm</i>.&nbsp;<a href="http://lxz.name">ddkk3000</a>: 比如10条经过确认的留言以后，自动添加 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_razz.gif' alt=':razz:' class='wp-smiley' /> </p><p><strong>32.</strong><i>2008.08.04.9:57.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: @ddkk3000：自动添加友链？实现起来并不是很难。只是需要这功能吗？</p><p><strong>31.</strong><i>2008.08.04.9:55.pm</i>.&nbsp;<a href="http://lxz.name">ddkk3000</a>: @山之岚 如果能加上自动添加友链功能是不是更好？</p><p><strong>30.</strong><i>2008.08.04.9:09.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: 嗯，已经将评论数改为按月为基准。插件定时计算从当日起向前推算30天内的评论数，并按此结果排列，这样对新连接的朋友比较公平些吧。</p><p><strong>29.</strong><i>2008.08.04.11:22.am</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: @Chada, ddkk3000,对于新读者，其评论数，肯定会比较少。解决这个问题也很简单，目前采用总的评论数作为基准评价，可以改为一定期间，如按月的评论数为基准，这样的话，会公平些。至于第2个问题，刷评论抢排位，这个问题肯定会存在。基于评论数进行排位的插件都存在这个问题。目前还未想出一个比较理想的解决方案。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_razz.gif' alt=':razz:' class='wp-smiley' /> </p><p><strong>28.</strong><i>2008.08.04.10:48.am</i>.&nbsp;<a href="http://lxz.name">ddkk3000</a>: @chada 如果你的博客用了框架式ajax评论插件，答案是肯定会有抢排现象发生。就和yacca的电影城堡一样。呵呵。

公不公平的问题，thinkagain兄来答， <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /> </p><p><strong>27.</strong><i>2008.08.03.11:01.pm</i>.&nbsp;<a href="http://blog.turkbaron.com">baron</a>: hi. Thanks for plugin

perfect.

Regards</p><p><strong>26.</strong><i>2008.08.03.9:50.pm</i>.&nbsp;<a href="http://genmicha.cn">Chada</a>: 咔咔，暂列第四，兴奋中。

不过想到两个延伸出来的问题：

1. 对于一个新的读者，他的评论数很难像一直以来的支持者，那么这个hot friends显然对于他是不公平的。

2. 会不会引发刷评论抢排位的情况？</p><p><strong>25.</strong><i>2008.08.03.8:48.pm</i>.&nbsp;<a href="http://www.linxo.cn/blog">ZH CEXO</a>: 说不定以后如果我的友链多了我也会试试的，现在倒是用不上，创意不错。</p><p><strong>24.</strong><i>2008.08.03.7:09.pm</i>.&nbsp;<a href="http://www.marketing-life.cn">shaoqing</a>: 恩。这个插件的确很实用。既有友链又能排序。相信有很多人愿意采用。我也希望能早点试一试。</p><p><strong>23.</strong><i>2008.08.03.5:10.pm</i>.&nbsp;<a href="http://www.charlestang.cn">Charles</a>: 这样看来，你的友链实在是太多了啊……</p><p><strong>22.</strong><i>2008.08.03.4:42.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: @motta,这个友情链接标签云，也不是我的idea，借鉴了WP自带的tag cloud。实现起来不是很难的。
@my-hou，这个大作实不敢当的。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_redface.gif' alt=':oops:' class='wp-smiley' /> </p><p><strong>21.</strong><i>2008.08.03.4:37.pm</i>.&nbsp;<a href="http://imotta.cn">motta</a>: 友情链接标签云, 这个赞!!</p><p><strong>20.</strong><i>2008.08.03.4:12.pm</i>.&nbsp;<a href="http://myou.org">MY-Hou</a>: 又要出大作咯   <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_eek.gif' alt=':shock:' class='wp-smiley' /> </p><p><strong>19.</strong><i>2008.08.03.3:58.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: @shamas,chern: 也谢谢你们二位的支持哦。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_razz.gif' alt=':razz:' class='wp-smiley' />  
@朵小朵: 那我要去check下adsense。看看赚进了几金？ <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /> </p><p><strong>18.</strong><i>2008.08.03.2:14.pm</i>.&nbsp;<a href="http://www.IdeaTalks.cn">Chern</a>: 这个Hot Friend的功能设计得不错，将来链接多了我也可能会用。</p><p><strong>17.</strong><i>2008.08.03.1:51.pm</i>.&nbsp;<a href="http://www.4fanfan.cn">朵小朵</a>: 博客花花绿绿的，挺复杂，不小心点到广告了。</p><p><strong>16.</strong><i>2008.08.03.1:41.pm</i>.&nbsp;<a href="http://3284265.cn">shamas</a>: 这个友情链接的创意不错啊,呵,支持一个</p><p><strong>15.</strong><i>2008.08.03.12:59.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: @Yacca：支持widget和函数调用二种方式。近日放出。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /> </p><p><strong>14.</strong><i>2008.08.03.12:44.pm</i>.&nbsp;<a href="http://www.eemir3.com">Yacca</a>: 以友情链接里的网友过来评论的数量为依据排列显示在首页...这个想法真好...等插件出来了估计是widget的吧,我考虑直接写进sidebar   期待啊期待</p><p><strong>13.</strong><i>2008.08.03.12:12.pm</i>.&nbsp;<a href="http://ecvip.org/">oxygen</a>: 嘿嘿，我排第二位。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /> </p><p><strong>12.</strong><i>2008.08.03.11:58.am</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: @neekey：嗯，谢谢哦。刚刚将你的链接改为零号相册了，要等下次更新时，自动更新。用不着看首页，站内除了留言薄外，每个页面都有挂着hot friends。</p><p><strong>11.</strong><i>2008.08.03.11:56.am</i>.&nbsp;<a href="http://zz.neekey.com">neekey</a>: 哈哈，刚才回头看了一下首页，我还在HOT friends 里面，看来我RP还是很厚道的哈哈  <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' />   <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /> </p><p><strong>10.</strong><i>2008.08.03.11:53.am</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: 嗯，有道理，回头测试下。THANKYOU。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_razz.gif' alt=':razz:' class='wp-smiley' /> </p><p><strong>9.</strong><i>2008.08.03.11:51.am</i>.&nbsp;<a href="http://lxz.name">ddkk3000</a>: 光加线条也是可以的，多用定位线，就像杂志一样。不会很单调。</p><p><strong>8.</strong><i>2008.08.03.11:48.am</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: @ddkk3000: 光光是线条，感觉不理想。偏单调点。还挺麻烦的。</p><p><strong>7.</strong><i>2008.08.03.11:47.am</i>.&nbsp;<a href="http://lxz.name">ddkk3000</a>: 既然是simple就不用配色了，就简单线条，白的就行了。</p><p><strong>6.</strong><i>2008.08.03.11:45.am</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: @neekey：等整理清楚了，近日放出来。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_wink.gif' alt=':wink:' class='wp-smiley' />  
@ddkk3000: 新主题暂命名为Simpe Is Better，现在还在考虑配色等等。</p><p><strong>5.</strong><i>2008.08.03.11:43.am</i>.&nbsp;<a href="http://lxz.name">ddkk3000</a>: 嗯，等着瞧你的新主题。</p><p><strong>4.</strong><i>2008.08.03.11:42.am</i>.&nbsp;<a href="http://zz.neekey.com">neekey</a>: 支持这个插件
能不能分享一下 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p><p><strong>3.</strong><i>2008.08.03.11:41.am</i>.&nbsp;<a href="http://lxz.name">ddkk3000</a>: 水蒲蛋加香蕉一起吃，这得拉肚子吧？</p><p><strong>2.</strong><i>2008.08.03.11:41.am</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: @ddkk3000: 恩，准备把fanfou这个页面给整合到其它页面里面去了。因为在制作一个新主题，所以这个主题不准备再折腾了。 过阵子更新后的，你的评论总数又加1了。谢谢捧场。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /> </p><p><strong>1.</strong><i>2008.08.03.11:38.am</i>.&nbsp;<a href="http://lxz.name">ddkk3000</a>: 看来写个插件对你来说简直是太简单了，呵呵。

不是有一个fanfou页面了么，为什么friend里还要再写一个？</p><hr/><p style="font-size:1.5em;font-weight:bold;">推荐阅读</p><p><i>2007.04.30.8:14.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/161.html" title="Widgets是一个可视化Wordpress主题侧边栏编辑插件，用户可以在Wordpress后台主">如何修改代码使主题支持widgets (5)</a></p><p><i>2009.01.03.4:57.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/1031.html" title="English user please navigates to http://wordpress.org/extend/plugins/wp-smilies/&#160; for instruct">Wordpress插件: WP Smilies (49)</a></p><p><i>2008.12.07.9:51.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/1029.html" title=" 这一阵子，Google Friend Connect似乎闹得挺热乎的。周围的网友博客们纷纷在">Hot friends新增支持用户自定义头像显示 (65)</a></p><p><i>2008.10.27.9:52.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/1024.html" title="如题。将Hot friends和mailtocommenter插件分别更新到1.3.2和1.3版。

其中hotfriends">从更新hot friends和mailtocmmenter谈起 (33)</a></p><p><i>2008.09.09.8:58.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/994.html" title="今天，Wordpress官方发布了2.6.2版。没有跑去Trac看代码变动地方，直接就将程">Wordpress Hacks:WP2.2版后中文邮件标题乱码解决方法 (22)</a></p><p><i>2008.08.25.11:06.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/989.html" title="English user please navigates to http://wordpress.org/extend/plugins/mailtocommenter/ for instructi">Wordpress插件: Mail To Commenter v1.3.2 (377)</a></p><p><i>2008.08.15.3:30.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/985.html" title="Updated: 2008-12-08. Latest version v1.4.1。
English user please goes to http://wordpress.org/ext">Wordpress插件: Hot Friends v1.4.1 (218)</a></p><p><i>2008.08.07.11:19.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/981.html" title="如题，将Hot Friends 1.0放上来内测。毕竟众人拾柴火焰高吧。功能方面，现阶">Hot Friends v1.0(Beta)内测 (52)</a></p><hr/><p>Copyright &copy; 2012&nbsp;|&nbsp;<a href="http://www.thinkagain.cn">Think Again</a>&nbsp;|&nbsp;<a href="http://www.thinkagain.cn/archives/978.html">原文链接</a></p><img src="http://img.tongji.cn.yahoo.com/710673/ystat.gif"/>]]></content:encoded>
			<wfw:commentRss>http://www.thinkagain.cn/archives/978.html/feed</wfw:commentRss>
		<slash:comments>43</slash:comments>
		</item>
		<item>
		<title>WordPress Hacks:如何关闭WP2.6的主题预览</title>
		<link>http://www.thinkagain.cn/archives/971.html</link>
		<comments>http://www.thinkagain.cn/archives/971.html#comments</comments>
		<pubDate>Sun, 27 Jul 2008 02:36:03 +0000</pubDate>
		<dc:creator>山之岚</dc:creator>
				<category><![CDATA[Blogger]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.thinkagain.cn/archives/971.html</guid>
		<description><![CDATA[WP2.6带来了很多新功能。相比2.3到2.5，2.5到2.6之间给我的惊喜更多。具体有什么新功能呢，这里就不细谈，百度一下或者在WP论坛搜一下，会出现一箩筐，我这里也不用再重复。比较全面介绍的... ]]></description>
			<content:encoded><![CDATA[<p>WP2.6带来了很多新功能。如后台的<a href="http://www.thinkagain.cn/archives/954.html">turbo</a>等。相比2.3到2.5，2.5到2.6之间给我的惊喜更多。具体有什么新功能呢，这里就不细谈，百度一下或者在<a href="http://wordpress.org.cn/">WP论坛</a>搜一下，答案一箩筐，我这里呢也不用再重复制造无用的东西。比较全面介绍的，可以参考下酋长的这篇文章：<a href="http://www.wopus.org/new-features-wordpress26.html" target="_blank">图文解说WordPress 2.6新功能</a>。此君费了不少工夫，应该要支持一下。呵呵。这里仅来谈谈WP2.6的主题预览。</p>
<p>2.6的新功能之一，就是可以即时主题预览。点击该主题的缩略图，会自动谈出一个thickbox窗口预览新主题。这样在测试新主题是，无需激活，在后台就可以看到新主题的效果了。既然有人喜好，那肯定也有人不中意。比如此<a href="http://wordpress.org.cn/thread-16715-1-1.html" target="_blank">兄台</a>。想关闭主题预览功能的话，很难很麻烦吗？当然，若是您一看代码就头晕的话，就此掠过。</p>
</p>
<p>用文本编辑器打开\wp-admin\themes.php，找到下列代码：</p>
<blockquote>
<p>add_thickbox(); </p>
<p>wp_enqueue_script( &#8216;theme-preview&#8217; );</p>
</blockquote>
<p>分别在它们前面加入注释符号&#8220;//&#8221;即可。如：</p>
<blockquote><p><span style="color: #008000">//add_thickbox();</span> </p>
<p><span style="color: #008000">//wp_enqueue_script( &#8216;theme-preview&#8217; );</span></p>
</blockquote>
<p>这样，当点击新主题时，就会直接激活该主题，和2.6版以前的一样。也就不会出现thickbox的主题预览效果了。很简单吧。</p>
<p>Do It Yourself!</p>
<p><strong>P.S，经常Hack WP源代码不是好习惯!</strong> </p>
<hr/><p style="font-size:1.5em;font-weight:bold;"><a href="http://www.thinkagain.cn/archives/971.html#comments">评论18:</a></p><p><strong>18.</strong><i>2011.06.26.1:56.pm</i>.&nbsp;<a href="http://www.hostjike.com">HostJike</a>: 我感觉没必要关闭啊！</p><p><strong>17.</strong><i>2008.10.07.10:59.pm</i>.&nbsp;<a href="http://8fone.com">Vee</a>: 多谢多谢 真是及时雨啊</p><p><strong>16.</strong><i>2008.08.31.1:36.pm</i>.&nbsp;<a href="http://www.leesum.com/blog/archives/225">金枫网络 &raquo; Blog Archive &raquo; 如何关闭WP2.6的主题预览</a>: [...] Google了下，找到热情的ThinkAgain详细的教我们如何关闭WP2.6的主题预览。 用文本编辑器打开wp-adminthemes.php，找到下列代码： [...]</p><p><strong>15.</strong><i>2008.07.29.10:12.am</i>.&nbsp;<a href="http://dickeydong.cn/">Dickey</a>: 博主很有钻研精神，佩服！！</p><p><strong>14.</strong><i>2008.07.28.11:11.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: To oyster: 有的时候，如在本地调试的时候，就没有必要开预览来浪费时间了。</p><p><strong>13.</strong><i>2008.07.28.11:08.pm</i>.&nbsp;<a href="http://www.flywud.com">oyster</a>: 为什么要禁用呢 不是挺好用的不</p><p><strong>12.</strong><i>2008.07.27.2:23.pm</i>.&nbsp;<a href="http://www.eemir3.com">Yacca</a>: 这个功能蛮好的,我继续保留 哈哈</p><p><strong>11.</strong><i>2008.07.27.2:04.pm</i>.&nbsp;<a href="http://3284265.cn">shamas</a>: 我现在没打算再换主题,所以这个暂时保留</p><p><strong>10.</strong><i>2008.07.27.12:02.pm</i>.&nbsp;<a href="http://zz.neekey.com">neekey</a>: 这个功能还比较有用的</p><p><strong>9.</strong><i>2008.07.27.11:39.am</i>.&nbsp;<a href="http://lxz.name">ddkk3000</a>: 暂时无法理解大家纷纷把新功能屏蔽掉的举动。</p><p><strong>8.</strong><i>2008.07.27.11:24.am</i>.&nbsp;<a href="http://www.wopus.org">酋长</a>: 是的。本身WordPress就是分享的精神~~~</p><p><strong>7.</strong><i>2008.07.27.11:17.am</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: @酋长: 嗯，这点我是赞同的。想玩WP，不动手是不行地。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> 
哦，还有一点，也很重要，就是要分享。</p><p><strong>6.</strong><i>2008.07.27.11:13.am</i>.&nbsp;<a href="http://www.wopus.org">酋长</a>: 哈哈。。
文章已经被添加到图文解析的那篇文章里去了。。。

我觉得WordPress这些小的hack，才是玩WordPress的乐趣所在。。。HOHO</p><p><strong>5.</strong><i>2008.07.27.11:13.am</i>.&nbsp;<a href="http://www.mintspot.cn/?p=394">mintspot &raquo; Blog Archive &raquo; 如何关闭WP2.6的主题预览</a>: [...] 如何关闭WP2.6的主题预览 Firefox Add comments   2.6的新功能之一，就是可以即时主题预览。点击该主题的缩略图，会自动谈出一个thickbox窗口预览新主题。这样在测试新主题是，无需激活，在后台就可以看到新主题的效果了。既然有人喜好，那肯定也有人不中意。比如此兄台。想关闭主题预览功能的话，很难很麻烦吗？当然，若是您一看代码就头晕的话，就此掠过。&nbsp; [...]</p><p><strong>4.</strong><i>2008.07.27.11:07.am</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: To 酋长，嗯，说的是。只不过，我的记性不好使。还不准回头就把这岔给忘记了。到时候人家说我的WP2.6有预览，我还纳闷干嘛我的会没有。呵呵。</p><p><strong>3.</strong><i>2008.07.27.10:58.am</i>.&nbsp;<a href="http://www.wopus.org">酋长</a>: 应该这么说：hack wp没什么。。但一定要做注解，好的注解+规范的代码修改。这样才不错。。。</p><p><strong>2.</strong><i>2008.07.27.10:45.am</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: 嘿，老改源代码不好，没看我的p.s内容么。呵呵。</p><p><strong>1.</strong><i>2008.07.27.10:43.am</i>.&nbsp;<a href="http://www.wopus.org">酋长</a>: 哈哈。。。代码就是这么神奇。。。</p><hr/><p style="font-size:1.5em;font-weight:bold;">推荐阅读</p><p><i>2008.09.09.8:58.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/994.html" title="今天，Wordpress官方发布了2.6.2版。没有跑去Trac看代码变动地方，直接就将程">Wordpress Hacks:WP2.2版后中文邮件标题乱码解决方法 (22)</a></p><p><i>2007.12.08.10:50.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/888.html" title="2007-12-09：注，我已经写了一个插件用于含有nextpage或more标签的feed全文输出">如何使用Wordpress内置的分页（Nextpage）功能？ (52)</a></p><p><i>2007.10.31.12:42.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/830.html" title="Updated:此问题已经在2.3.3中被修复。
*****************************
前几天，将Wordp">Wordpress Hacks:升级2.3.1可能出现邮件提醒失效的解决方法 (20)</a></p><p><i>2007.10.22.11:05.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/822.html" title="在wordpress中，默认点击评论者的链接时，会在同一窗口内打开该链接。这在">Wordpress Hacks: 在新窗口中打开评论者链接和no follow属性 (16)</a></p><p><i>2007.09.15.10:41.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/721.html" title="继将CSS修改符合W3C规范后，今天花了点时间，也将模板代码修改完毕，通过">继续修改模板 (4)</a></p><p><i>2007.08.21.8:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/611.html" title="又是一时心血来潮，试用过Wordpress后，想装上Movable Type 4.0玩玩看。于是就">图文介绍如何在本地服务器安装Movable Type 4.0 (15)</a></p><p><i>2007.06.11.3:55.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/189.html" title="由于博客上的图片大部分都是放在Flickr上的，所以Flickr被禁后导致国内朋友">WordPress解决Flickr图片显示方法 (3)</a></p><p><i>2007.04.30.8:14.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/161.html" title="Widgets是一个可视化Wordpress主题侧边栏编辑插件，用户可以在Wordpress后台主">如何修改代码使主题支持widgets (5)</a></p><hr/><p>Copyright &copy; 2012&nbsp;|&nbsp;<a href="http://www.thinkagain.cn">Think Again</a>&nbsp;|&nbsp;<a href="http://www.thinkagain.cn/archives/971.html">原文链接</a></p><img src="http://img.tongji.cn.yahoo.com/710673/ystat.gif"/>]]></content:encoded>
			<wfw:commentRss>http://www.thinkagain.cn/archives/971.html/feed</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>如何使用WordPress内置的分页（Nextpage）功能？</title>
		<link>http://www.thinkagain.cn/archives/888.html</link>
		<comments>http://www.thinkagain.cn/archives/888.html#comments</comments>
		<pubDate>Sat, 08 Dec 2007 14:50:37 +0000</pubDate>
		<dc:creator>山之岚</dc:creator>
				<category><![CDATA[Blogger]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[分页]]></category>

		<guid isPermaLink="false">http://www.thinkagain.cn/archives/888.html</guid>
		<description><![CDATA[2007-12-09：注，我已经写了一个插件用于含有nextpage或more标签的feed全文输出，详见WordPress插件:whole_feed_output v0.1，为此无需自行修改WP源代码。第4部分的代码修改仅作为参考用。 *********************... ]]></description>
			<content:encoded><![CDATA[<p><strong>2007-12-09：注，我已经写了一个插件用于含有nextpage或more标签的feed全文输出，详见<a href="http://www.thinkagain.cn/archives/889.html">WordPress插件:whole_feed_output v0.1</a>，为此无需自行修改WP源代码</strong>。第4部分的代码修改仅作为参考用。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_wink.gif' alt=':wink:' class='wp-smiley' />   </p>
<p>********************************</p>
<p>看到在论坛上也有一些网友在探讨<a href="http://www.wordpress.org.cn/forums/thread-7615-1-1.html" target="_blank">关于Wordpress文章分页</a>的问题等，而实际上wordpress本身已经内置了文章的分页功能，即通过使用Nextpage标签来将文章分割成多个页面。索性花了点时间好好整理了一下，系统性地写下这篇文章，着重介绍下wordpress内置的nextpage标签分页及相关用法等。望对使用WP的网友有所帮助。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_wink.gif' alt=':wink:' class='wp-smiley' />  。为了测试WP分页，我将此文章分成4页。要阅读全文的话，就慢慢点吧。  <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_cool.gif' alt=':cool:' class='wp-smiley' />   文中涉及代码修改等，<u>均只在2.3和2.3.1中测试通过，敬请注意</u>。本文将包括如下几个部分内容。</p>
<p>先来谈谈nextpage标签的作用及使用方法。</p>
<p><strong>1.nextpage标签的作用及使用方法。</strong></p>
<p>nextpage标签，确切地说是，&lt;!- -nextpage- -&gt;代码，是wordpress内置的用于实现文章分页的一个page标签。您可以在一篇文章中插入多个nextpage标签实现多个分页。在文章中插入该标签后，从文章开头至第一个nextpage标签为文章的第一个分页内容，第一个nextpage标签和第二个nextpage标签之间为文章第二个分页的内容，以此类推，直至文章结束。这一点和more标签不同。</p>
<p>然而，有一点要注意，如果more标签在nextpage标签之前的话，在首页的输出中，还是会被more标签截断的。</p>
<hr/><p style="font-size:1.5em;font-weight:bold;"><a href="http://www.thinkagain.cn/archives/888.html#comments">评论52:</a></p><p><strong>52.</strong><i>2011.04.03.7:46.am</i>.&nbsp;<a href="http://kangxiaowei.com/?p=4112">WordPress给单篇文章增加分页功能 &#8211; 四师兄：只为传播一种思想</a>: [...] 先来谈谈nextpage标签的作用及使用方法。&nbsp; 1.nextpage标签的作用及使用方法。 nextpage标签，确切地说是，&lt;!- -nextpage- [...]</p><p><strong>51.</strong><i>2010.10.20.1:52.am</i>.&nbsp;<a href="http://www.yue366.com/archives/133.html">苯小月的多天网 &raquo; wordpress 长文章如何实现分页功能</a>: [...] 略。WordPress长文章分页和如何使用WordPress内置的分页（Nextpage）功能？等等详细的介绍了&lt;!&#8211;nextpage&#8211;&gt;功能，并且据说是不需要插件就能实现。 [...]</p><p><strong>50.</strong><i>2010.05.10.9:45.am</i>.&nbsp;<a href="http://www.yeeones.com">一心而已</a>: 谢谢分享 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_mad.gif' alt=':x' class='wp-smiley' /> </p><p><strong>49.</strong><i>2010.03.20.8:44.pm</i>.&nbsp;<a href="http://13796432.blog.hexun.com/">马毕</a>: 我的博客欢迎指教http://13796432.blog.hexun.com/</p><p><strong>48.</strong><i>2010.03.16.10:25.pm</i>.&nbsp;<a href="http://www.semdiy.cn/chong/">虫虫博客2009</a>: 博主太有才了 学习了</p><p><strong>47.</strong><i>2010.03.11.1:02.am</i>.&nbsp;cksan: 我跟amy一样，使用2.9.2，没找到more。。。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_cry.gif' alt=':cry:' class='wp-smiley' /> </p><p><strong>46.</strong><i>2010.03.08.3:41.pm</i>.&nbsp;<a href="http://www.buylacostes.com/">lacoste</a>: 嘿嘿~无意间来你的地盘~不错的博文~期待更精彩的~</p><p><strong>45.</strong><i>2010.03.06.11:40.am</i>.&nbsp;<a href="http://zzaza.com/archives/655">天天坊 &raquo; 如何使用Wordpress内置的分页（Nextpage）功能</a>: [...] 原文出处：http://www.thinkagain.cn/archives/888.html [...]</p><p><strong>44.</strong><i>2010.03.04.1:46.pm</i>.&nbsp;<a href="http://www.future.org.cn/zd/">amy</a>: 你好，我在使用 wordpress2.9.2，在网上找了很久关于分页的资料，都不能分，你这个讲得最全面，但是还不能解决问题，wordpress2.9.2的目录结构和你说得不一样，能帮我看下吗？非常感谢！</p><p><strong>43.</strong><i>2010.02.12.9:06.pm</i>.&nbsp;<a href="http://www.khc.name/index.php/2010/02/12/38">KHC&#39;s &raquo; 在文章中添加类似“继续阅读”和“下一页”的按钮</a>: [...] 其实原生的WP中有个nextpage标签，其功能就是实现日志分页，只是被认为的“隐藏”起来了，我们使用不了而已。nextpage标签，确切地说 是，&lt;!- -nextpage- -&gt;代码，是wordpress内置的用于实现文章分页的一个page标签。您可以在一篇文章中插入多个nextpage标签实现多个分页。在文章 中插入该标签后，从文章开头至第一个nextpage标签为文章的第一个分页内容，第一个nextpage标签和第二个nextpage标签之间为文章第 二个分页的内容，以此类推，直至文章结束。这一点和more标签不同。 然而，有一点要注意，如果more标签在nextpage标签之前的话，在首页的输出中，还是会被more标签截断的。哪么如何使用这个代码呢？ [...]</p><p><strong>42.</strong><i>2010.02.11.9:51.pm</i>.&nbsp;<a href="http://kuailedao.org/">快乐岛博客</a>:  <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  方法真好，就是这样看着好费劲啊！</p><p><strong>41.</strong><i>2009.12.14.9:01.pm</i>.&nbsp;<a href="http://www.chenyg.cn/">广辉岁月</a>: 真实不错的办法，wp总给人想象不到的空间！</p><p><strong>40.</strong><i>2009.11.01.11:37.am</i>.&nbsp;<a href="http://www.snowfly.net/?p=16">wordpress上一篇长文章如何分页？ - 雪纷飞</a>: [...] 我是怎么做到的？G到的第一篇是《如何使用Wordpress内置的分页（Nextpage）功能？》它介绍了几种方法。我试了试，我是2.8.4版本的wordpress，上面介绍的方法，都无法实现。不过，这一篇写得很仔细，相信对其它人会有用。然后就是《WordPress如何单日志分页》。就像作者说的： [...]</p><p><strong>39.</strong><i>2009.10.11.10:42.pm</i>.&nbsp;<a href="http://xuefenfei.netai.net/?p=29">一篇长文章如何分页？ - 雪纷飞</a>: [...] &#160;&#160; 我是怎么做到的？G到的第一篇是《如何使用Wordpress内置的分页（Nextpage）功能？》它介绍了几种方法。我试了试，我是2.8.4版本的wordpress，上面介绍的方法，都无法实现。不过，这一篇写得很仔细，相信对其它人会有用。然后就是《WordPress如何单日志分页》。就像作者说的： [...]</p><p><strong>38.</strong><i>2009.09.29.1:18.pm</i>.&nbsp;<a href="http://www.seoask.com.cn">广州seo咨询室</a>: 简单的讲，我用了，但是没显示分页</p><p><strong>37.</strong><i>2009.08.28.8:51.am</i>.&nbsp;<a href="http://feilong.org">飞龙</a>: 我想过用分页，但是与其这样，不过如分日志处理。个中理由不外乎seo角度和相关性问题。</p><p><strong>36.</strong><i>2009.07.31.9:38.am</i>.&nbsp;<a href="http://blog.shuxiong.net">shuxiong</a>: 手动分页太麻烦了~又没有自动分页的呢？</p><p><strong>35.</strong><i>2009.06.05.10:06.pm</i>.&nbsp;<a href="http://www.99xunle.com">cyang</a>: 给个样例就好了</p><p><strong>34.</strong><i>2009.04.25.8:10.pm</i>.&nbsp;<a href="http://xc84.com">小程</a>: 现在用的2.7.1，在tiny_mce_popup中找不到wp_more了。

2.7还可以使用这个分页功能吗？该如何实现呢？</p><p><strong>33.</strong><i>2009.04.25.12:35.am</i>.&nbsp;<a href="http://www.w-link.org.cn/?p=23">老李的草庐 &raquo; Blog Archive &raquo; 如何使用Wordpress内置的分页功能 Nextpage</a>: [...] 默认输出效果为： Pages: 1 2 [...]</p><p><strong>32.</strong><i>2009.03.28.11:34.am</i>.&nbsp;<a href="http://www.mazusys.info/journals/">青鸟</a>: 刚建了WP博客，学习中...</p><p><strong>31.</strong><i>2009.03.26.1:00.pm</i>.&nbsp;<a href="http://www.100daysns.com">Joe Lam</a>: 很好..我會下載看看.!</p><p><strong>30.</strong><i>2009.02.21.2:56.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: <a href="#comment-90091" rel="nofollow">@琪琪老爸 </a>那您就多来逛逛吧。呵呵。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_biggrin.gif' alt=':grin:' class='wp-smiley' /> </p><p><strong>29.</strong><i>2009.02.20.3:50.pm</i>.&nbsp;<a href="http://www.girlqiqi.cn">琪琪老爸</a>: 呵呵,发现不少需要学习的知识都在你这里可以找到. <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_razz.gif' alt=':razz:' class='wp-smiley' /> </p><p><strong>28.</strong><i>2008.10.05.11:12.am</i>.&nbsp;<a href="http://seo-dic.com.cn/index.php/archives/969">让WordPress的默认编辑器功能更强大 | 希奥开源</a>: [...] 查看会员 [美丽星点] 的文章列表&nbsp;&nbsp;&nbsp;&nbsp;  上一篇:&nbsp;添加wine源详细步骤   终极改造之一：让默认可视化编辑器支持更多的功能 之前think again《如何使用Wordpress内置的分页功能？- Nextpage》文章中提到如何通过修改wordpress安装目录下的wp-includesjstinymcetiny_mce_config.php文件来添加分页(wp_more)按钮,其实我们完全可以通过一个强大的插件TinyMCE advaced来实现，它是 TinyMCE 的增加版，支持富文本编辑，水平线，图像插入增加，链接插入增加，表情，全屏，语法错误拼写，添加层，打印，查找与替换，添加自定义样式，添加表格，当然这些按钮是可选的，您可以通过：后台管理-&gt;TinyMCE Advanced中通过简单的托拽来添加和删除它的每一个功能模块。  插件名称：TinyMCE advaced 官方网站：http://wordpress.org/extend/plugins/tinymce-advanced/ 项目网站：http://www.laptoptips.ca/projects/tinymce-advanced/ 下载地址：http://downloads.wordpress.org/plugin/tinymce-advanced.3.1.zip [...]</p><p><strong>27.</strong><i>2008.09.25.7:31.pm</i>.&nbsp;<a href="http://haohtml.com/wp/index.php/archives/412">haohtml&#8217;s blog &raquo; Blog Archive &raquo; 如何使用Wordpress内置的分页（Nextpage）功能？</a>: [...] 先来谈谈nextpage标签的作用及使用方法。  [...]</p><p><strong>26.</strong><i>2008.09.16.3:02.pm</i>.&nbsp;<a href="http://www.mb120.com/blog/?p=580">弹指神功 &raquo; Blog Archive &raquo; wordpress 单篇日志实现分页</a>: [...] a.可视化模式输入  [...]</p><p><strong>25.</strong><i>2008.09.14.9:37.am</i>.&nbsp;<a href="http://www.thirdinfo.com/">辐射鱼</a>: 我在本地测试more标签竟然可以在前面，xp环境</p><p><strong>24.</strong><i>2008.09.09.5:01.pm</i>.&nbsp;<a href="http://www.alibuybuy.com/archives/911">互联网的那点事&#8230; &raquo; blog archive &raquo; 技巧：Wordpress单篇日志如何实现分页</a>: [...]     其实原生的WP中有个nextpage标签，其功能就是实现日志分页，只是被认为的“隐藏”起来了，我们使用不了而已。nextpage标签，确切地说是，&lt;!- -nextpage- -&gt;代码，是wordpress内置的用于实现文章分页的一个page标签。您可以在一篇文章中插入多个nextpage标签实现多个分页。在文章中插入该标签后，从文章开头至第一个nextpage标签为文章的第一个分页内容，第一个nextpage标签和第二个nextpage标签之间为文章第二个分页的内容，以此类推，直至文章结束。这一点和more标签不同。 然而，有一点要注意，如果more标签在nextpage标签之前的话，在首页的输出中，还是会被more标签截断的。哪么如何使用这个代码呢？ [...]</p><p><strong>23.</strong><i>2008.08.30.4:08.am</i>.&nbsp;<a href="http://www.cqadmin.net.cn/index.php/archives/99">简单学向上 &raquo; wordpress 单篇日志实现分页</a>: [...] 其实原生的WP中有个nextpage标签，其功能就是实现日志分页，只是被认为的“隐藏”起来了，我们使用不了而已。nextpage标签，确切 地说是，&lt;!- -nextpage- -&gt;代码，是wordpress内置的用于实现文章分页的一个page标签。您可以在一篇文章中插入多个nextpage标签实现多个分页。在文章 中插入该标签后，从文章开头至第一个nextpage标签为文章的第一个分页内容，第一个nextpage标签和第二个nextpage标签之间为文章第 二个分页的内容，以此类推，直至文章结束。这一点和more标签不同。 然而，有一点要注意，如果more标签在nextpage标签之前的话，在首页的输出中，还是会被more标签截断的。哪么如何使用这个代码呢？ [...]</p><p><strong>22.</strong><i>2008.08.28.9:16.am</i>.&nbsp;<a href="http://61.187.251.224:8082/wordpress/?p=106">Wordpress的分页功能 - 杰维智能 一触杰道</a>: [...]     其实原生的WP中有个nextpage标签，其功能就是实现日志分页，只是被认为的“隐藏”起来了，我们使用不了而已。nextpage标签，确切地说是，&lt;!- -nextpage- -&gt;代码，是wordpress内置的用于实现文章分页的一个page标签。您可以在一篇文章中插入多个nextpage标签实现多个分页。在文章中插入该标签后，从文章开头至第一个nextpage标签为文章的第一个分页内容，第一个nextpage标签和第二个nextpage标签之间为文章第二个分页的内容，以此类推，直至文章结束。这一点和more标签不同。 然而，有一点要注意，如果more标签在nextpage标签之前的话，在首页的输出中，还是会被more标签截断的。哪么如何使用这个代码呢？ [...]</p><p><strong>21.</strong><i>2008.08.27.6:09.pm</i>.&nbsp;<a href="http://jiaogen.com/index.php/archives/1669">wordpress 单篇日志实现分页 | Ashley</a>: [...] a.可视化模式输入  [...]</p><p><strong>20.</strong><i>2008.08.09.5:27.pm</i>.&nbsp;<a href="http://www.i1987.cn/wordpress/?p=182">孔雀网官方博客 &raquo; 内容索引 &raquo; wordpress 单篇日志实现分页 - 孔雀网官方博客</a>: [...] a.可视化模式输入  [...]</p><p><strong>19.</strong><i>2008.07.30.11:48.pm</i>.&nbsp;<a href="http://alibm.org">阿里</a>: 添加了了这个函数。没升级到2.6之前都是可以的。我从头到尾又检查了一遍，发现每个步骤都没有出错。现在还没找到问题出在哪。</p><p><strong>18.</strong><i>2008.07.30.6:51.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: @阿里: 要实现分页，必须在模板内添加wp_link_pages函数。</p><p><strong>17.</strong><i>2008.07.30.4:22.pm</i>.&nbsp;<a href="http://alibm.org">阿里</a>: 就是按要求做了,无法实现分页效果。</p><p><strong>16.</strong><i>2008.07.30.12:19.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: @阿里: 不大明白你的问题。</p><p><strong>15.</strong><i>2008.07.30.4:29.am</i>.&nbsp;<a href="http://alibm.org">阿里</a>: 2.6后，还可以用吗？为什么加入<code> '<strong>还很长，继续看下一页:</strong> ', 'after' =&gt; '', 'next_or_number' =&gt; 'number')); ?&gt;</code>
而实际上却没有分页效果呢？</p><p><strong>14.</strong><i>2008.07.27.2:13.pm</i>.&nbsp;<a href="http://3284265.cn">shamas</a>: 我用了静态插件后,这个就失效了,</p><p><strong>13.</strong><i>2008.07.01.5:57.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: To 鞅猫: 因为这个是wp内置的函数，所以函数本身应该是不会有问题。先禁用下所有插件检查是否是插件冲突造成的。</p><p><strong>12.</strong><i>2008.07.01.4:16.pm</i>.&nbsp;<a href="http://www.icoob.com">鞅猫</a>: 一个很严重的问题...我用了..不行..分两页显示的是一样的文章..
而且第*****页面也是第四页的文章...11，12，13，14，15，16...........................
这么多同样的..不被k才怪
你可以把地址栏的页面数改下看..问题很严重</p><p><strong>11.</strong><i>2008.06.25.8:58.pm</i>.&nbsp;<a href="http://www.kkv88.cn/index.php/2008/06/25/91/">&raquo; wordpress 单篇日志实现分页 - 香烟啤酒</a>: [...]     其实原生的WP中有个nextpage标签，其功能就是实现日志分页，只是被认为的“隐藏”起来了，我们使用不了而已。nextpage标签，确切地说是，&lt;!- -nextpage- -&gt;代码，是wordpress内置的用于实现文章分页的一个page标签。您可以在一篇文章中插入多个nextpage标签实现多个分页。在文章中插入该标签后，从文章开头至第一个nextpage标签为文章的第一个分页内容，第一个nextpage标签和第二个nextpage标签之间为文章第二个分页的内容，以此类推，直至文章结束。这一点和more标签不同。 然而，有一点要注意，如果more标签在nextpage标签之前的话，在首页的输出中，还是会被more标签截断的。哪么如何使用这个代码呢？ [...]</p><p><strong>10.</strong><i>2008.05.06.11:33.am</i>.&nbsp;<a href="http://mlyang.cn">牧狼羊</a>: 真好，这样不用安装插件吧？</p><p><strong>9.</strong><i>2008.03.07.12:58.am</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: To 独木，记得好像WP论坛上已经有你所提到的插件了。也就是提供指定输出固定字数的文章内容。你可以去论坛里搜索下。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_smile.gif' alt=':smile:' class='wp-smiley' /> </p><p><strong>8.</strong><i>2008.03.06.3:07.pm</i>.&nbsp;<a href="http://www.infoea.com">独木</a>: 博主分享了一个非常棒的文章，我也正是为此事而烦恼，现在终于可以解决分页问题了！
其实并没达到我最想要的结果，我更想不用插件让他自动分页，比如按照一定数量的文字或者行等等，就像一些CMS一样，是不是要求有点高哈，感谢感谢</p><p><strong>7.</strong><i>2008.03.02.11:58.am</i>.&nbsp;<a href="http://www.163share.cn/60">(转)如何使用Wordpress内置的分页功能？- Nextpage - 喜儿: 资源共分享 - 学习|影音|数码|生活|理财分享社区</a>: [...] 看到在论坛上也有一些网友在探讨关于Wordpress文章分页的 问题等，而且很多网友在寻找自动分页的插件。而实际上wordpress本身已经内置了文章的分页功能，即通过使用Nextpage标签来将文章分割成多个页面。手工加入标签虽然麻烦一点点的，但是对于分页的控制比自动分页要强很多。索性花了点时间好好整理了一 下，系统性地写下这篇文章，着重介绍下wordpress内置的nextpage标签分页及相关用法等。望对使用WP的网友有所帮助。  。文中涉及代码修改等，均只在2.3和2.3.1中测试通过，敬请注意。本文将包括如下几个部分内容。  [...]</p><p><strong>6.</strong><i>2008.01.02.9:52.pm</i>.&nbsp;<a href="http://www.a18zhizao.cn/2008/01/02/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8wordpress%e5%86%85%e7%bd%ae%e7%9a%84%e5%88%86%e9%a1%b5%e5%8a%9f%e8%83%bd-nextpage">A18制造 &raquo; Blog Archive &raquo; 如何使用Wordpress内置的分页功能 Nextpage</a>: [...] Pages: 1 2 [...]</p><p><strong>5.</strong><i>2007.12.28.10:32.am</i>.&nbsp;<a href="http://www.sitemasterkit.com/archives/43">站长工具箱 &raquo; Blog Archive &raquo; (转)如何使用Wordpress内置的分页功能？- Nextpage</a>: [...] 看到在论坛上也有一些网友在探讨关于Wordpress文章分页的 问题等，而且很多网友在寻找自动分页的插件。而实际上wordpress本身已经内置了文章的分页功能，即通过使用Nextpage标签来将文章分割成多个页面。手工加入标签虽然麻烦一点点的，但是对于分页的控制比自动分页要强很多。索性花了点时间好好整理了一 下，系统性地写下这篇文章，着重介绍下wordpress内置的nextpage标签分页及相关用法等。望对使用WP的网友有所帮助。  。文中涉及代码修改等，均只在2.3和2.3.1中测试通过，敬请注意。本文将包括如下几个部分内容。  [...]</p><p><strong>4.</strong><i>2007.12.10.2:09.pm</i>.&nbsp;<a href="http://www.genmicha.cn/">chada</a>: 很有用，以后很长的文章就不用分几篇日志发了。
我换了新主题哦！ <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_razz.gif' alt=':razz:' class='wp-smiley' />  顺便把广告插上了。</p><p><strong>3.</strong><i>2007.12.09.8:28.am</i>.&nbsp;<a href="http://www.alanoy.cn">Alan</a>: 学习了，厉害 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p><p><strong>2.</strong><i>2007.12.08.11:17.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>:  <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_redface.gif' alt=':oops:' class='wp-smiley' />  什么牛。</p><p><strong>1.</strong><i>2007.12.08.11:11.pm</i>.&nbsp;<a href="http://lxz.name">ddkk3000</a>: 牛人，又学习了一点， <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p><hr/><p style="font-size:1.5em;font-weight:bold;">推荐阅读</p><p><i>2008.09.09.8:58.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/994.html" title="今天，Wordpress官方发布了2.6.2版。没有跑去Trac看代码变动地方，直接就将程">Wordpress Hacks:WP2.2版后中文邮件标题乱码解决方法 (22)</a></p><p><i>2008.07.27.10:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/971.html" title="WP2.6带来了很多新功能。如后台的turbo等。相比2.3到2.5，2.5到2.6之间给我的">Wordpress Hacks:如何关闭WP2.6的主题预览 (18)</a></p><p><i>2007.10.31.12:42.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/830.html" title="Updated:此问题已经在2.3.3中被修复。
*****************************
前几天，将Wordp">Wordpress Hacks:升级2.3.1可能出现邮件提醒失效的解决方法 (20)</a></p><p><i>2007.10.22.11:05.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/822.html" title="在wordpress中，默认点击评论者的链接时，会在同一窗口内打开该链接。这在">Wordpress Hacks: 在新窗口中打开评论者链接和no follow属性 (16)</a></p><p><i>2007.09.15.10:41.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/721.html" title="继将CSS修改符合W3C规范后，今天花了点时间，也将模板代码修改完毕，通过">继续修改模板 (4)</a></p><p><i>2007.08.21.8:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/611.html" title="又是一时心血来潮，试用过Wordpress后，想装上Movable Type 4.0玩玩看。于是就">图文介绍如何在本地服务器安装Movable Type 4.0 (15)</a></p><p><i>2007.06.11.3:55.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/189.html" title="由于博客上的图片大部分都是放在Flickr上的，所以Flickr被禁后导致国内朋友">WordPress解决Flickr图片显示方法 (3)</a></p><p><i>2007.04.30.8:14.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/161.html" title="Widgets是一个可视化Wordpress主题侧边栏编辑插件，用户可以在Wordpress后台主">如何修改代码使主题支持widgets (5)</a></p><hr/><p>Copyright &copy; 2012&nbsp;|&nbsp;<a href="http://www.thinkagain.cn">Think Again</a>&nbsp;|&nbsp;<a href="http://www.thinkagain.cn/archives/888.html">原文链接</a></p><img src="http://img.tongji.cn.yahoo.com/710673/ystat.gif"/>]]></content:encoded>
			<wfw:commentRss>http://www.thinkagain.cn/archives/888.html/feed</wfw:commentRss>
		<slash:comments>52</slash:comments>
		</item>
		<item>
		<title>WordPress Hacks:升级2.3.1可能出现邮件提醒失效的解决方法</title>
		<link>http://www.thinkagain.cn/archives/830.html</link>
		<comments>http://www.thinkagain.cn/archives/830.html#comments</comments>
		<pubDate>Wed, 31 Oct 2007 04:42:51 +0000</pubDate>
		<dc:creator>山之岚</dc:creator>
				<category><![CDATA[Blogger]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.thinkagain.cn/archives/830.html</guid>
		<description><![CDATA[前几天，将Wordpress从2.3升级到2.3.1后，发现WP内置的邮件提醒功能失效了。具体表现在为，新评论来的时候，无法邮件提醒，以及wp backup无法定时将数据库备份发送到指定邮箱中等等。相关调用W... ]]></description>
			<content:encoded><![CDATA[<p><strong>Updated:此问题已经在2.3.3中被修复。</strong></p>
<p>*****************************</p>
<p>前几天，将Wordpress从2.3升级到2.3.1后，发现WP内置的邮件提醒功能失效了。具体表现在为，新评论来的时候，无法邮件提醒，以及wp backup无法定时将数据库备份发送到指定邮箱中等等。相关调用WP内置的mail发送功能的插件都无法使用。</p>
<p>曾Wordpress论坛上<a href="http://www.wordpress.org.cn/forums/thread-6726-1-2.html">发帖</a>谈到此问题，遗憾的是，网友建议的方法，都不管用，我曾经在<a href="http://trac.wordpress.org/changeset/6293/tags/2.3.1?old=6293&amp;old_path=tags%2F2.3#file22">WordPress Trac</a>上，对比2.3和2.3.1修改的修改内容，按论坛中建议的方法，一个个将修改的文件下来后，覆盖到2.3版，然后再将修改后的文件覆盖到站上的WP。问题仍然存在。且，在中文论坛上发帖，并没有见网友参与讨论，也没有见其他人对此问题发帖，估计可能还没有几个人有碰到类似的问题。所以姑且称之为，<strong>可能</strong>出现该问题。</p>
<p>在WP的官方论坛上，搜索了一下。找到了一篇类似问题的<a href="http://wordpress.org/support/topic/140882?replies=4">求助帖</a>。可惜，也是无果。(最终的解决方法，嘿嘿，还是我发的。)</p>
<p>对照着Trac上面刊载着的2.3和2.3.1 wp-mail.php的不同处。却不认为，是这些新增的代码造成邮件无法发送。</p>
<p>上午，无意中，看到Peter westwood的一篇文章&#8221;<a href="http://westi.wordpress.com/2007/10/26/wordpress-231-in-detail/">WordPress 2.3.1 in detail</a>&#8220;，里面介绍了2.3.1具体改进的项目。The Sender is set on emails to help on hosts that limit which email addresses can send (<a href="http://trac.wordpress.org/ticket/5007">#5007</a>). 然后又跟着看#5007的内容。这才找到了原因所在。因为2.3.1内增加了对邮件发送者的定义。</p>
<p>找到问题症结后，解决方法也很简单，用文本编辑器打开位于wp-includes目录下的pluggable.php，跳到line228，</p>
<blockquote><p><span style="color: blue">$phpmailer</span><span style="color: purple">-&gt; </span>Sender <span style="color: purple">=</span> apply_filters( <span style="color: red">&#8216;wp_mail_from&#8217;</span>, <span style="color: blue">$from_email</span> );</p>
</blockquote>
<p>&nbsp;</p>
<p>正是该行造成了内置邮件发送功能失效。直接删除此行，或者在行首加上注释代码:&#8221;//&#8221;。如</p>
<blockquote><p><span style="color: #008000">//$phpmailer-&gt;Sender = apply_filters( &#8216;wp_mail_from&#8217;, $from_email );</span></p>
</blockquote>
<p>&nbsp;</p>
<p>将修改后的pluggable.php重新上传都网站。然后您就发现一切OK了。</p>
<hr/><p style="font-size:1.5em;font-weight:bold;"><a href="http://www.thinkagain.cn/archives/830.html#comments">评论20:</a></p><p><strong>20.</strong><i>2009.01.10.12:16.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: <a href="#comment-85222" rel="nofollow">@shamas </a>文中的这个问题，在2.3.3以后已经被修复了。你的问题，要好好检查下模板，编制是否规范符合wp要求等。</p><p><strong>19.</strong><i>2009.01.10.9:36.am</i>.&nbsp;<a href="http://3284265.cn">shamas</a>: 我的博客也有个奇怪的问题，只能收到页面的评论邮件提醒，而日志里面的评论就没有邮件提醒</p><p><strong>18.</strong><i>2008.10.22.11:49.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: <a href="#comment-74786" rel="nofollow">@HE Yi </a>文首已经提了，此问题在2.3.3中已被解决了。如果你是因为更改email无法收到邮件通知的话，先确认下邮件功能是否还能正常使用。mailtocommenter插件里面提供了邮件测试的功能。如果邮件没问题，再查看下是否你的email服务器是否拒绝接受网站的邮件，或判断为spam。</p><p><strong>17.</strong><i>2008.10.22.9:31.pm</i>.&nbsp;<a href="http://heyi.name">HE Yi</a>: 我今天新修改了后台管理员的Email，再也收不到新评论提醒了，这种方法可行？ <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_eek.gif' alt=':shock:' class='wp-smiley' /> </p><p><strong>16.</strong><i>2008.05.22.9:25.am</i>.&nbsp;<a href="http://www.guwei.org">Guwei</a>: 从WP论坛看到，果然有效</p><p><strong>15.</strong><i>2008.03.01.5:29.pm</i>.&nbsp;<a href="http://www.freerainbow.cn/2008/03/01/wp-backup.html">WordPress Database Backup 邮件提醒失效的解决方法 - Feel more distant , as walking more</a>: [...]      westwood的一篇文章”Wordpress 2.3.1 in detail“，里面介绍了2.3.1具体改进的项目。The Sender is set on emails to help on hosts that limit which email addresses can send (#5007). 然后又跟着看#5007的内容。这才找到了原因所在。因为2.3.1内增加了对邮件发送者的定义。  [...]</p><p><strong>14.</strong><i>2008.01.07.5:50.pm</i>.&nbsp;<a href="http://alpha.neotheme.com">!CnSoLoer</a>: 非常感谢，我之前从2.3到2.3.1的时候就出现了这问题，在中文论坛里面发帖没人回答，一直拖到2.3.2都没有好。
昨天在朋友，幸福收藏夹 博客里面提到这个问题，有人说：“不能发那是因为默认值新版本该过了，修改一下就可以了。”
我才重新注意到这个问题，然后就在中文论坛又仔细搜索了一遍，然后到这里来了，谢谢。我已经按照您给的方法修改过了，并且现在可以收到邮件了/ <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_lol.gif' alt=':lol:' class='wp-smiley' /> </p><p><strong>13.</strong><i>2008.01.05.7:40.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: 只有通过空间商来开启mail函数的，自己是无法解决的。</p><p><strong>12.</strong><i>2008.01.05.2:34.pm</i>.&nbsp;<a href="http://KHUI.NET/WP">KHUI</a>: 你好，我用探针测试了下，发现服务器没有开启mail这个函数，该如开启呢？
麻烦告诉我下，谢谢</p><p><strong>11.</strong><i>2007.12.31.6:46.pm</i>.&nbsp;<a href="http://www.sansky.net/article/2007-12-31-wordpress-can-not-send-mail.html">wordpress升级后无法发送邮件【存储部落】网络存储技术</a>: [...]  在网上一通查找，终于又找到当时帮我解决问题的博客。为了防止以后再出现类似的问题，也为了方便大家解决问题，我将解决方法记录在此，希望能对大家有所帮助。  解决方法很简单。 [...]</p><p><strong>10.</strong><i>2007.12.31.6:13.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: Yes，我昨天升级2.3.2的时候也手动修改了。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_smile.gif' alt=':smile:' class='wp-smiley' /> </p><p><strong>9.</strong><i>2007.12.31.5:57.pm</i>.&nbsp;<a href="http://www.sansky.net">sansky</a>: 升级到2.3.2后又出现这个问题，再一次感谢你。</p><p><strong>8.</strong><i>2007.11.23.3:40.pm</i>.&nbsp;<a href="http://www.zhex.net">zhex</a>: 刚看了你的文章，网站问题得以解决， 太感谢了</p><p><strong>7.</strong><i>2007.11.14.4:03.pm</i>.&nbsp;<a href="http://www.quhuashuai.com">Hugh</a>: 我也发现了这个问题，谢谢你的文章！</p><p><strong>6.</strong><i>2007.11.13.9:12.am</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: You are welcome!P.S，你的站点很漂亮。</p><p><strong>5.</strong><i>2007.11.13.12:54.am</i>.&nbsp;<a href="http://www.alanoy.cn">Alan</a>: 谢谢你的文章，我解决了这个问题了，哈哈</p><p><strong>4.</strong><i>2007.11.02.10:24.am</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: 这个Google Ad对我来说类似鸡肋，现在上面大概也有几十美金了。继续放下去，不知道要到猴年马月，不放广告的话，又可惜了。</p><p><strong>3.</strong><i>2007.11.01.4:45.pm</i>.&nbsp;<a href="http://www.marketing-life.cn">Shaoqing</a>: 有没注意，好像你的GOOGEL广告都是英文的。对于模板上的GOOGLE广告，换成图片广告，是不是比文字更吸引点击? 当然故意放在其他文字旁边造成误点的除外。</p><p><strong>2.</strong><i>2007.10.31.10:17.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: 嘿嘿，那个是我在评论上加了一个js，弄点搞笑提示。</p><p><strong>1.</strong><i>2007.10.31.7:20.pm</i>.&nbsp;<a href="http://lxz.name">ddkk3000</a>: 玩wp玩入迷了呢，呵呵，为什么旁边有一个“我不懂火星语”，玩笑？</p><hr/><p style="font-size:1.5em;font-weight:bold;">推荐阅读</p><p><i>2008.09.09.8:58.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/994.html" title="今天，Wordpress官方发布了2.6.2版。没有跑去Trac看代码变动地方，直接就将程">Wordpress Hacks:WP2.2版后中文邮件标题乱码解决方法 (22)</a></p><p><i>2008.07.27.10:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/971.html" title="WP2.6带来了很多新功能。如后台的turbo等。相比2.3到2.5，2.5到2.6之间给我的">Wordpress Hacks:如何关闭WP2.6的主题预览 (18)</a></p><p><i>2007.12.08.10:50.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/888.html" title="2007-12-09：注，我已经写了一个插件用于含有nextpage或more标签的feed全文输出">如何使用Wordpress内置的分页（Nextpage）功能？ (52)</a></p><p><i>2007.10.22.11:05.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/822.html" title="在wordpress中，默认点击评论者的链接时，会在同一窗口内打开该链接。这在">Wordpress Hacks: 在新窗口中打开评论者链接和no follow属性 (16)</a></p><p><i>2007.09.15.10:41.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/721.html" title="继将CSS修改符合W3C规范后，今天花了点时间，也将模板代码修改完毕，通过">继续修改模板 (4)</a></p><p><i>2007.08.21.8:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/611.html" title="又是一时心血来潮，试用过Wordpress后，想装上Movable Type 4.0玩玩看。于是就">图文介绍如何在本地服务器安装Movable Type 4.0 (15)</a></p><p><i>2007.06.11.3:55.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/189.html" title="由于博客上的图片大部分都是放在Flickr上的，所以Flickr被禁后导致国内朋友">WordPress解决Flickr图片显示方法 (3)</a></p><p><i>2007.04.30.8:14.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/161.html" title="Widgets是一个可视化Wordpress主题侧边栏编辑插件，用户可以在Wordpress后台主">如何修改代码使主题支持widgets (5)</a></p><hr/><p>Copyright &copy; 2012&nbsp;|&nbsp;<a href="http://www.thinkagain.cn">Think Again</a>&nbsp;|&nbsp;<a href="http://www.thinkagain.cn/archives/830.html">原文链接</a></p><img src="http://img.tongji.cn.yahoo.com/710673/ystat.gif"/>]]></content:encoded>
			<wfw:commentRss>http://www.thinkagain.cn/archives/830.html/feed</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>周日，第一件事</title>
		<link>http://www.thinkagain.cn/archives/829.html</link>
		<comments>http://www.thinkagain.cn/archives/829.html#comments</comments>
		<pubDate>Sat, 27 Oct 2007 16:09:13 +0000</pubDate>
		<dc:creator>山之岚</dc:creator>
				<category><![CDATA[Blogger]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.thinkagain.cn/archives/829.html</guid>
		<description><![CDATA[现在开始动笔，正好是北京时间00:03，日本时间1:03，新的一天又开始了。 刚才发了周六干完的3件事。接着来，写下&#8221;周日，第一件事&#8221;。也是和模板有关的。刚刚看到一个很有创意的模... ]]></description>
			<content:encoded><![CDATA[<p>现在开始动笔，正好是北京时间00:03，日本时间1:03，新的一天又开始了。</p>
<p>刚才发了周六干完的3件事。接着来，写下&#8221;周日，第一件事&#8221;。也是和模板有关的。刚刚看到一个很有创意的模板，引用了里面的js文件，照猫画虎，也给自己的模板弄上这功能了。这就是周日做好的第一件事，第二件事，就是发文了。看腻了，不会打瞌睡吧。</p>
<p>至于，第一件事是什么，感兴趣的网友，可以在此留言。留言时会有提示。紧张之余，偶尔轻松下。。你们试试看就知道了。</p>
<p>
<em>友情提示</em>，因为更新了css，所以在本站留言过的朋友，最好清空下浏览器的缓存，以免看不到。</p>
<hr/><p style="font-size:1.5em;font-weight:bold;"><a href="http://www.thinkagain.cn/archives/829.html#comments">评论3:</a></p><p><strong>3.</strong><i>2007.10.29.11:25.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: 哎呀，没说对。来路链接是welcome插件弄的。
我冥思苦想写了些地球人和火星人的对话。留言时候没注意到啊！</p><p><strong>2.</strong><i>2007.10.29.11:16.pm</i>.&nbsp;<a href="http://heyi.name">Heyi</a>: 嘿嘿，有意思，还能显示访客的来路链接。:)</p><p><strong>1.</strong><i>2007.10.28.12:13.am</i>.&nbsp;<a href="http://ecvip.org/">oxygen</a>: 沙发看看</p><hr/><p style="font-size:1.5em;font-weight:bold;">推荐阅读</p><p><i>2008.09.09.8:58.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/994.html" title="今天，Wordpress官方发布了2.6.2版。没有跑去Trac看代码变动地方，直接就将程">Wordpress Hacks:WP2.2版后中文邮件标题乱码解决方法 (22)</a></p><p><i>2008.08.03.11:23.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/978.html" title="难得一个周末呆在家里，想睡个懒觉都不行。隔壁的朝鲜学校的音乐CIRCLE的">鸟儿早起 (43)</a></p><p><i>2008.07.27.10:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/971.html" title="WP2.6带来了很多新功能。如后台的turbo等。相比2.3到2.5，2.5到2.6之间给我的">Wordpress Hacks:如何关闭WP2.6的主题预览 (18)</a></p><p><i>2007.12.08.10:50.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/888.html" title="2007-12-09：注，我已经写了一个插件用于含有nextpage或more标签的feed全文输出">如何使用Wordpress内置的分页（Nextpage）功能？ (52)</a></p><p><i>2007.10.31.12:42.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/830.html" title="Updated:此问题已经在2.3.3中被修复。
*****************************
前几天，将Wordp">Wordpress Hacks:升级2.3.1可能出现邮件提醒失效的解决方法 (20)</a></p><p><i>2007.10.22.11:05.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/822.html" title="在wordpress中，默认点击评论者的链接时，会在同一窗口内打开该链接。这在">Wordpress Hacks: 在新窗口中打开评论者链接和no follow属性 (16)</a></p><p><i>2007.09.15.10:41.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/721.html" title="继将CSS修改符合W3C规范后，今天花了点时间，也将模板代码修改完毕，通过">继续修改模板 (4)</a></p><p><i>2007.08.21.8:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/611.html" title="又是一时心血来潮，试用过Wordpress后，想装上Movable Type 4.0玩玩看。于是就">图文介绍如何在本地服务器安装Movable Type 4.0 (15)</a></p><hr/><p>Copyright &copy; 2012&nbsp;|&nbsp;<a href="http://www.thinkagain.cn">Think Again</a>&nbsp;|&nbsp;<a href="http://www.thinkagain.cn/archives/829.html">原文链接</a></p><img src="http://img.tongji.cn.yahoo.com/710673/ystat.gif"/>]]></content:encoded>
			<wfw:commentRss>http://www.thinkagain.cn/archives/829.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
<enclosure url="" length="" type="" />
		</item>
		<item>
		<title>WordPress Hacks: 在新窗口中打开评论者链接和no follow属性</title>
		<link>http://www.thinkagain.cn/archives/822.html</link>
		<comments>http://www.thinkagain.cn/archives/822.html#comments</comments>
		<pubDate>Mon, 22 Oct 2007 15:05:26 +0000</pubDate>
		<dc:creator>山之岚</dc:creator>
				<category><![CDATA[Blogger]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.thinkagain.cn/archives/822.html</guid>
		<description><![CDATA[在wordpress中，默认点击评论者的链接时，会在同一窗口内打开该链接。这在浏览时，颇有不便。通过一个很简单的代码修改就可以将它改为在新窗口中打开评论者链接。您所需的仅是文本编辑... ]]></description>
			<content:encoded><![CDATA[<p>在wordpress中，默认点击评论者的链接时，会在同一窗口内打开该链接。这在浏览时，颇有不便。通过一个很简单的代码修改就可以将它改为在新窗口中打开评论者链接。您所需的仅是文本编辑工具Notepad，或者更高级点，更易于代码编辑的免费开源编辑软件<a href="http://www.thinkagain.cn/download" target="_blank">Notepad++</a>。</p>
<p>在新窗口中打开链接，仅需在超链接元素&lt;a&gt;的html代码定义中加入：</p>
<blockquote><p>target=&#8221;<span style="color: #8b0000">_blank</span>&#8220;</p>
</blockquote>
<p>&nbsp;</p>
<p>即可以实现。所以我们可以直接查找评论者链接的定义函数，将上述代码加入链接的定义中。</p>
<p>以官方版Wordpress2.3为例，进入\wp-includes目录，用文本编辑器，推荐用Notepad++，打开comment-template.php，查找如下代码，在第48行：</p>
<blockquote><p>$<span style="color: #0000ff">return</span> = &#8220;<span style="color: #8b0000">&lt;a href=&#8217;$url&#8217; rel=&#8217;external nofollow&#8217;&gt;$author&lt;/a&gt;</span>&#8220;;</p></blockquote>
<p>&nbsp;</p>
<p>该语句是get_comment_author_link()函数的返回值，从字面就可以得知，这个函数的作用在于获取评论者的链接。很明显，语句中$return变量返回的就是评论者的链接地址，我们可以直接在href前面加上target=&#8221;_blank&#8221;，如：</p>
<blockquote><p>$<span style="color: #0000ff">return</span> = &#8220;<span style="color: #8b0000">&lt;a target=&#8217;_blank&#8217; href=&#8217;$url&#8217; rel=&#8217;external nofollow&#8217;&gt;$author&lt;/a&gt;</span>&#8220;;</p>
</blockquote>
<p>&nbsp;</p>
<p>注意上述语句中的，</p>
<blockquote><p><span style="color: #8b0000">rel=&#8217;external nofollow&#8217;</span></p>
</blockquote>
<p><span style="color: #8b0000"></span>&nbsp;</p>
<p><a href="http://en.wikipedia.org/wiki/Nofollow" target="_blank">nofollow属性</a>，是Google在2005为了降低SPAM索引而提倡采用的一个非正式html属性。它的用途在于告诉搜索引擎，该链接是外部链接，此链接不会对所指向的网页或站点的索引有影响，也就是说搜索引擎在抓取到该链接时，不会去索引该链接指向页面的PR。据说，Yahoo和MSN目前也支持该属性。</p>
<p><u>如果您认为您的博客不需要nofollow，直接将上述语句中的rel=&#8217;external nofollow&#8217;删掉即可。</u>删除或保留，<em><strong>UP TO YOU!</strong></em></p>
<p>注，此改法适用于调用comment_author_link()函数来返回评论者链接的模板。默认模板，或如无特殊情况，一般模板都使用该函数返回评论者链接。</p>
<hr/><p style="font-size:1.5em;font-weight:bold;"><a href="http://www.thinkagain.cn/archives/822.html#comments">评论16:</a></p><p><strong>16.</strong><i>2010.05.12.3:32.pm</i>.&nbsp;<a href="http://blog.xianyunyehe.net/689">wordpress评论者网站在新页面打开 | 闲云野鹤情侣博客</a>: [...] 又折腾了一次博客，这次不是折腾主题，是折腾wordpress自带的源码。原因是今天小卢想要评论者的网站在新窗口打开，我也想要这个功能，于是我俩就找。最后，终于找到了，原文在这里，不过上面修改的是wordpress 2.3，已经有些不适用新的版本了，所以，我决定写一篇新的来告诉大家！ [...]</p><p><strong>15.</strong><i>2009.10.11.2:32.am</i>.&nbsp;<a href="http://www.wuyablog.cn">无涯博客</a>: 不知道现在新版本的2.8下，这么实现这效果？</p><p><strong>14.</strong><i>2009.10.05.11:32.am</i>.&nbsp;<a href="http://www.os8.org/2009/10/comments-in-a-new-window-attributes-those-links-and-no-follow.html">系统吧 &raquo; 在新窗口中打开评论者链接和no follow属性</a>: [...] 在wordpress中，默认点击评论者的链接时，会在同一窗口内打开该链接。这在浏览时，颇有不便。通过一个很简单的代码修改就可以将它改为在新窗口中打开评论者链接。您所需的仅是文本编辑工具Notepad，或者更高级点，更易于代码编辑的免费开源编辑软件Notepad++。&nbsp; [...]</p><p><strong>13.</strong><i>2009.06.10.9:07.pm</i>.&nbsp;<a href="http://www.99xunle.com">cyang</a>: thank you ！ 我按你的办法实现了 target=_blank.

现在wordpress 2.7 的 $return = “<a href="’$url’" rel="nofollow">$author</a>“; 在148行了。</p><p><strong>12.</strong><i>2009.05.05.10:12.pm</i>.&nbsp;<a href="http://duqq.org">丘丘</a>: 有没有只简单修改theme，而不修改程序本身的办法呢。</p><p><strong>11.</strong><i>2009.04.10.10:53.pm</i>.&nbsp;<a href="http://www.alive77.cn">z.Yleo77</a>: 看过。。   这么回事。。。</p><p><strong>10.</strong><i>2008.12.06.6:12.pm</i>.&nbsp;<a href="http://so.sorry">plasaear</a>:  <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_arrow.gif' alt=':arrow:' class='wp-smiley' />  不错的地方...Thinkagain..</p><p><strong>9.</strong><i>2008.09.02.9:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: <a href="#comment-70543" rel="nofollow">@googlefish </a>呵呵，近段没有打算写新插件，因为没有idea或新应用之类的，倒是准备打算将几个旧插件逐步升级下。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_razz.gif' alt=':razz:' class='wp-smiley' /> </p><p><strong>8.</strong><i>2008.09.01.9:07.pm</i>.&nbsp;<a href="http://www.girlqiqi.cn">googlefish</a>: think是不是又要出新的插件了.刚才好象看到了测试页面.很期待......</p><p><strong>7.</strong><i>2008.09.01.9:03.pm</i>.&nbsp;<a href="http://www.girlqiqi.cn">googlefish</a>: pr低的小站,如我,还是去掉nofollow吧,这样对评论者显得更友好,亲切些.</p><p><strong>6.</strong><i>2007.12.31.10:28.pm</i>.&nbsp;<a href="http://www.china-stone-export.com">Granite Counter Tops</a>: 非常同意你的观点</p><p><strong>5.</strong><i>2007.11.09.7:02.am</i>.&nbsp;<a href="http://www.digbuzz.com/">Digbuzz</a>: 好文，放到我挖网( <a href="http://www.digbuzz.com" rel="nofollow">digbuzz.com</a> )挖一挖会不错，还可给你带来大量流量！</p><p><strong>4.</strong><i>2007.10.28.7:44.pm</i>.&nbsp;<a href="http://ecvip.org/search-engine/seo/take-off-rel-external-nofollow.html">回馈读者，拿掉NoFollow链接安全套 | 电子商务博客-关注电子商务、网络营销以及SEO</a>: [...] 如果你也想拿掉NoFollow，这里有操作方法。     本文Tags：Blogger, Google, Spam, dofollow, nofollow 作者：黄海均 原载：电子商务博客 欢迎转载，原创文章转载时必须以链接形式注明作者和原始出处及本声明。  喜欢本文？您可以订阅我了解更多网络营销、电子商务、搜索引擎信息。如何订阅RSS？  阿里妈妈再掀疯狂采购风，网站广告位严重告急，急召天下站长！ [...]</p><p><strong>3.</strong><i>2007.10.23.5:41.pm</i>.&nbsp;<a href="http://lxz.name">ddkk3000</a>: 看来有必要对我的这个简单模板做一次大改了</p><p><strong>2.</strong><i>2007.10.23.12:01.am</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: 个人习惯是在新窗口中打开链接，因为这样还可以保持浏览原窗口的内容。我这里只是介绍下做法。至于改不改，自行决定。</p><p><strong>1.</strong><i>2007.10.22.11:21.pm</i>.&nbsp;<a href="http://ecvip.org/">oxygen</a>: 在新窗口中打开，在某些地方是中国网民的习惯。国外的网站都是在原窗口中打开，不利于浏览。

有时候还可以增加PV，哈哈哈哈……</p><hr/><p style="font-size:1.5em;font-weight:bold;">推荐阅读</p><p><i>2008.09.09.8:58.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/994.html" title="今天，Wordpress官方发布了2.6.2版。没有跑去Trac看代码变动地方，直接就将程">Wordpress Hacks:WP2.2版后中文邮件标题乱码解决方法 (22)</a></p><p><i>2008.07.27.10:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/971.html" title="WP2.6带来了很多新功能。如后台的turbo等。相比2.3到2.5，2.5到2.6之间给我的">Wordpress Hacks:如何关闭WP2.6的主题预览 (18)</a></p><p><i>2007.12.08.10:50.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/888.html" title="2007-12-09：注，我已经写了一个插件用于含有nextpage或more标签的feed全文输出">如何使用Wordpress内置的分页（Nextpage）功能？ (52)</a></p><p><i>2007.10.31.12:42.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/830.html" title="Updated:此问题已经在2.3.3中被修复。
*****************************
前几天，将Wordp">Wordpress Hacks:升级2.3.1可能出现邮件提醒失效的解决方法 (20)</a></p><p><i>2007.09.15.10:41.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/721.html" title="继将CSS修改符合W3C规范后，今天花了点时间，也将模板代码修改完毕，通过">继续修改模板 (4)</a></p><p><i>2007.08.21.8:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/611.html" title="又是一时心血来潮，试用过Wordpress后，想装上Movable Type 4.0玩玩看。于是就">图文介绍如何在本地服务器安装Movable Type 4.0 (15)</a></p><p><i>2007.06.11.3:55.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/189.html" title="由于博客上的图片大部分都是放在Flickr上的，所以Flickr被禁后导致国内朋友">WordPress解决Flickr图片显示方法 (3)</a></p><p><i>2007.04.30.8:14.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/161.html" title="Widgets是一个可视化Wordpress主题侧边栏编辑插件，用户可以在Wordpress后台主">如何修改代码使主题支持widgets (5)</a></p><hr/><p>Copyright &copy; 2012&nbsp;|&nbsp;<a href="http://www.thinkagain.cn">Think Again</a>&nbsp;|&nbsp;<a href="http://www.thinkagain.cn/archives/822.html">原文链接</a></p><img src="http://img.tongji.cn.yahoo.com/710673/ystat.gif"/>]]></content:encoded>
			<wfw:commentRss>http://www.thinkagain.cn/archives/822.html/feed</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>继续修改模板</title>
		<link>http://www.thinkagain.cn/archives/721.html</link>
		<comments>http://www.thinkagain.cn/archives/721.html#comments</comments>
		<pubDate>Sat, 15 Sep 2007 14:41:27 +0000</pubDate>
		<dc:creator>山之岚</dc:creator>
				<category><![CDATA[Blogger]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.thinkagain.cn/archives/721.html</guid>
		<description><![CDATA[继将CSS修改符合W3C规范后，今天花了点时间，也将模板代码修改完毕，通过W3C XHTML 1.0 Transitional验证。若不是好友风暴轻狂的提醒，我自己以前还从未注意过这些验证问题。不过狂兄最近似乎比... ]]></description>
			<content:encoded><![CDATA[<p>继将CSS修改符合W3C规范后，今天花了点时间，也将模板代码修改完毕，通过W3C XHTML 1.0 Transitional验证。若不是好友<a href="http://lxz.name" target="_blank">风暴轻狂</a>的提醒，我自己以前还从未注意过这些验证问题。不过狂兄最近似乎比较忙，很久没看到他的狂言了。</p>
<p>一直对自己现有的模板不太满意，无论是布局还是配色。且因为编写该模板时，自己刚接触Wordpress，不说php，当时连对html和css等基本不懂，几乎是边写模板，边查资料这样编过来的，所以很多地方都不符合规范。用W3C的在线XHTML检查，会查出多达几百个错误。本想花点时间重新写一个模板，计划回归2栏布局，昨天和<a href="http://ecvip.org" target="_blank">Oxygen</a>聊天，他告诉我，这是“审美疲劳”现象。回过头，想想也是，当初&#8221;<a href="http://www.thinkagain.cn/archives/103.html">首个3 columns WordPress模板制作完毕!</a>&#8220;时，也曾是无比兴奋。</p>
<p>今天是周六，研究室人比较少，难得清静。于是就挂上耳麦，边听&#8221;辛晓琪的爱的回答&#8221;，开始修改现有模板代码。一动手，马上就发现不少问题，禁不住开始要骂TMD了。看来不仅仅是我的代码，很多插件生成的代码等通不过W3C验证，随便列举几个：</p>
<p>插件生成的代码无法通过验证：</p>
<blockquote><p>Akismet提供的Spam数查看代码；</p>
<p>WS Download Manager生成的下载框代码；</p>
<p>Pagenavi提供的下拉页面显示框代码；</p>
</blockquote>
<p>&nbsp;</p>
<p>WordPress提供的下拉存档显示框代码无法通过验证，wp_get_archives函数，WP官方提供的dropdown Box代码：</p>
<blockquote><p><span style="color: #0000ff">&lt;</span><span style="color: #800000">select </span><span style="color: #ff0000">name</span>=<span style="color: #0000ff">&#8220;archive-dropdown&#8221; </span><span style="color: #ff0000">onChange</span></p>
<p><span style="color: #ff0000"></span>=<span style="color: #0000ff">&#8216;document</span><span style="color: #0000ff">.location.href=this.options</span></p>
<p><span style="color: #0000ff">[this.selectedIndex].value;&#8217;</span><span style="color: #0000ff">&gt;</span></p>
<p><span style="color: #0000ff"></span><span style="color: #0000ff">&lt;</span><span style="color: #800000">option</span> <span style="color: #ff0000">value</span>=<span style="color: #0000ff">&#8220;&#8221;</span><span style="color: #0000ff">&gt;</span></p>
<p><span style="color: #0000ff"></span><span style="color: #0000ff">&lt;?</span>php <a style="color: #0000ff" href="http://www.php.net/echo">echo</a> attribute_escape(__(&#8216;<span style="color: #8b0000">Select Month</span>&#8216;)); <span style="color: #0000ff">?&gt;</span></p>
<p><span style="color: #0000ff"></span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">option</span><span style="color: #0000ff">&gt;</span></p>
<p><span style="color: #0000ff">&lt;?</span>php wp_get_archives(&#8216;<span style="color: #8b0000">type=monthly&amp;format=option&amp;show_post_count=1</span></p>
<p><span style="color: #8b0000"></span>&#8216;); <span style="color: #0000ff">?&gt;</span> <span style="color: #0000ff">&lt;/</span><span style="color: #800000">select</span><span style="color: #0000ff">&gt;</span></p>
</blockquote>
<p>其中<span style="color: red">onChange</span>是大写，但Xhtml中所有元素必须是以小写形式出现，所以务必将<span style="color: red">onChange</span>改为<span style="color: red">onchange</span>。</p>
<p><span style="color: #0000ff"></span>&nbsp;</p>
<p>&nbsp;</p>
<p>Windows Live Writer编写的代码无法通过验证：</p>
<blockquote><p>WLW自带的表格编制功能编制的表格中，会自动生成<span style="color: red">unSelectable=&#8221;on&#8221;</span>，务必将该代码删掉。</p>
</blockquote>
<blockquote><p>WLW的图片编辑功能，有的会自动生成<span style="color: red">atomicselection=&#8221;true&#8221;</span>，必须删除该代码。</p>
</blockquote>
<blockquote><p>WLW插入图片，均为&lt;img src=&#8221;**&#8221;&gt;，此种写法，虽可以正常显示图片，但规范的写法是&lt;img src=&#8221;**&#8221;/&gt;，即每个img必须要有闭合符号/。</p>
</blockquote>
<p>&nbsp;</p>
<p>还有，Google Adsense Search代码无法通过验证，只好暂替换为WP自带的站内搜索了。Youtube提供的视频内嵌html代码也无法通过验证。这个不完全是Youtube的问题，因为Youtube的flv视频属于flash，而Xhtml对flash的支持较差。除了以上的一些问题外，其实只要在编制模板的时候，小心注意下，都能通过W3C的验证。总结了些，希望能够有所帮助，如：</p>
<p>1.页首，一般在header.php内，一定要有文档类型声明，如下面代码将文档声明为XHTML 1.0 Transitional。</p>
<blockquote><p><span style="color: #0000ff">&lt;</span>!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; </p>
<p>&#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;<span style="color: #0000ff">&gt;</span></p>
<p><span style="color: #0000ff"></span><span style="color: #0000ff">&lt;</span><span style="color: #800000">html</span> <span style="color: #ff0000">xmlns</span>=<span style="color: #0000ff">http://www.w3.org/1999/xhtml</span></p>
<p><span style="color: #0000ff"></span>&nbsp;&lt;?<span style="color: #ff0000">php</span> <span style="color: #ff0000">language_attributes</span>(); ?<span style="color: #0000ff">&gt;</span>&gt;</p>
<p><span style="color: #0000ff">&lt;</span><span style="color: #800000">head</span> <span style="color: #ff0000">profile</span>=<span style="color: #0000ff">&#8220;http://gmpg.org/xfn/11&#8243;</span><span style="color: #0000ff">&gt;</span></p>
<p><span style="color: #0000ff">&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;</span></p>
<p><span style="color: #0000ff">&lt;?php bloginfo(&#8216;html_type&#8217;); ?&gt;;</span></p>
<p><span style="color: #0000ff">&nbsp;charset=&lt;?php bloginfo(&#8216;charset&#8217;); ?&gt;&#8221; /&gt;</span></p>
</blockquote>
<p>&nbsp;</p>
<p>2.代码中的每个元素的前后标签必须都有，且前后标签内必须包含内容，即不能存在空元素。如&lt;ul&gt;&lt;/ul&gt;是非法的，且&lt;p&gt;&lt;p&gt;****&lt;/p&gt;&lt;/p&gt;之类的重复嵌套也是非法。</p>
<p>3.诸如&lt;br&gt;&lt;hr&gt;等标签必须包括闭合符/，如&lt;br&gt;是非法，而正确的是&lt;br/&gt;。</p>
<p>4.img元素必须包括alt属性，否则将视为错误。</p>
<p>5.所有元素都应该以小写形式出现。</p>
<p>6.&amp;符号，必须以&amp;amp;形式出现等。</p>
<p>晚上将目前首页内含的8个文章的html代码都修改了，除了含有ws download下载框和youtube视频外，其它的几篇都可以通过W3C验证。拟将几个页面代码修改下，其余文章就算了，任其自然吧。重要的是从现在开始要注意所发文章的代码了，因为习惯用WLW写文章，而WLW竟然存在这么多兼容性问题，所以以后每篇文章发布前都要检查下其html。看来用WLW等编辑软件离线发布文章时，最好要养成检查html代码的习惯。</p>
<p>修改模板的同时，顺手将最新留言的函数Hack了，原来留言只部分留言内容，现在改为显示留言者名字和留言内容。稍微调整了下侧边栏和页脚的显示内容，挂上了W3C XHTML和CSS验证标志，嘿嘿，以及CreativeCommon的版权说明logo。接下来打算安排点时间，将站内搜索改为Google Ajax Search，以及继续修改模板的CSS。今天只修改了菜单栏的字体显示效果，改天要来个大动作，将颜色搭配等修改下。</p>
<hr/><p style="font-size:1.5em;font-weight:bold;"><a href="http://www.thinkagain.cn/archives/721.html#comments">评论4:</a></p><p><strong>4.</strong><i>2007.09.24.9:31.am</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: 狂兄说得对。我也开始糊涂，模板到底该怎么弄了。</p><p><strong>3.</strong><i>2007.09.23.8:44.pm</i>.&nbsp;<a href="http://neimba.com">yuanzhu</a>: 模板真的不错，尤其是上面的标题画</p><p><strong>2.</strong><i>2007.09.23.1:40.pm</i>.&nbsp;<a href="http://lxz.name">ddkk3000</a>: 模板越简单越不易疲劳，字体越大越方便阅读。边栏越少越好，否则游客不会看，而且不容易集中阅读，影响视觉啊。</p><p><strong>1.</strong><i>2007.09.18.12:29.pm</i>.&nbsp;<a href="http://www.marketing-life.cn">Shaoqing</a>: 还是别改成两栏了。我采用的是两栏，SIDEBAR太多东西，拉得很长，感觉不是很好。
最新留言栏，改得不错啊，比之前的好。
另外，自带的日历样子实在太看，不会修改，我还是没用它。</p><hr/><p style="font-size:1.5em;font-weight:bold;">推荐阅读</p><p><i>2008.09.09.8:58.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/994.html" title="今天，Wordpress官方发布了2.6.2版。没有跑去Trac看代码变动地方，直接就将程">Wordpress Hacks:WP2.2版后中文邮件标题乱码解决方法 (22)</a></p><p><i>2008.07.27.10:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/971.html" title="WP2.6带来了很多新功能。如后台的turbo等。相比2.3到2.5，2.5到2.6之间给我的">Wordpress Hacks:如何关闭WP2.6的主题预览 (18)</a></p><p><i>2007.12.08.10:50.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/888.html" title="2007-12-09：注，我已经写了一个插件用于含有nextpage或more标签的feed全文输出">如何使用Wordpress内置的分页（Nextpage）功能？ (52)</a></p><p><i>2007.10.31.12:42.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/830.html" title="Updated:此问题已经在2.3.3中被修复。
*****************************
前几天，将Wordp">Wordpress Hacks:升级2.3.1可能出现邮件提醒失效的解决方法 (20)</a></p><p><i>2007.10.22.11:05.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/822.html" title="在wordpress中，默认点击评论者的链接时，会在同一窗口内打开该链接。这在">Wordpress Hacks: 在新窗口中打开评论者链接和no follow属性 (16)</a></p><p><i>2007.09.11.8:43.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/707.html" title="晚上写extended summary实在是无聊之极，打开FF又逛到了Blog上。回想起曾和风">CSS通过W3C验证 (5)</a></p><p><i>2007.08.21.8:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/611.html" title="又是一时心血来潮，试用过Wordpress后，想装上Movable Type 4.0玩玩看。于是就">图文介绍如何在本地服务器安装Movable Type 4.0 (15)</a></p><p><i>2007.06.11.3:55.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/189.html" title="由于博客上的图片大部分都是放在Flickr上的，所以Flickr被禁后导致国内朋友">WordPress解决Flickr图片显示方法 (3)</a></p><hr/><p>Copyright &copy; 2012&nbsp;|&nbsp;<a href="http://www.thinkagain.cn">Think Again</a>&nbsp;|&nbsp;<a href="http://www.thinkagain.cn/archives/721.html">原文链接</a></p><img src="http://img.tongji.cn.yahoo.com/710673/ystat.gif"/>]]></content:encoded>
			<wfw:commentRss>http://www.thinkagain.cn/archives/721.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>CSS通过W3C验证</title>
		<link>http://www.thinkagain.cn/archives/707.html</link>
		<comments>http://www.thinkagain.cn/archives/707.html#comments</comments>
		<pubDate>Tue, 11 Sep 2007 12:43:19 +0000</pubDate>
		<dc:creator>山之岚</dc:creator>
				<category><![CDATA[Blogger]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[W3C]]></category>

		<guid isPermaLink="false">http://www.thinkagain.cn/archives/707.html</guid>
		<description><![CDATA[晚上写extended summary实在是无聊之极，打开FF又逛到了Blog上。回想起曾和风暴轻狂谈过CSS的W3C验证问题，自己的模板虽然是通过了W3C的CSS验证，但提示竟然有多达58个Warnings。趁着兴头，将模板的... ]]></description>
			<content:encoded><![CDATA[<p>晚上写extended summary实在是无聊之极，打开FF又逛到了Blog上。回想起曾和<a href="http://lxz.name">风暴轻狂</a>谈过CSS的<a href="http://jigsaw.w3.org/css-validator/">W3C验证</a>问题，自己的模板虽然是通过了W3C的CSS验证，但提示竟然有多达58个Warnings。趁着兴头，将模板的style.css下载了下来，对着W3C的Warning，一个个给它修正过来。嘿嘿，功夫不负有心人哪，花了近1个小时，顺利搞定，现在模板的CSS可以完全通过W3C的验证了，Warning一个都没有。有兴趣，<a href="http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.thinkagain.cn&#038;warning=1&#038;profile=css21&#038;usermedium=all">点此</a>检查下。</p>
<p>对照着Warnings，发现很多问题都是出现在颜色的定义和诸如hover、active等伪类的定义上。也懒得多花时间去刨根问底，只是简单做了些Hacks。凑合着用吧。等下次改版重写CSS时再注意细节。</p>
<hr/><p style="font-size:1.5em;font-weight:bold;"><a href="http://www.thinkagain.cn/archives/707.html#comments">评论5:</a></p><p><strong>5.</strong><i>2008.12.19.9:26.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: <a href="#comment-81538" rel="nofollow">@WEB </a>这个是因为折叠目录那个插件生成的代码的问题。升级到2.7后，似乎这个插件工作有些不大正常。回头要修改下。</p><p><strong>4.</strong><i>2008.12.19.12:12.pm</i>.&nbsp;<a href="http://2admin_c.814e.com/order/youyi.html">WEB</a>: Result:	1 Error
Line 415, Column 10: ID "parent_3" already defined.
LZ文件类别宣告是过渡标准（Transitional）
用 严格标准（Strict）试验哈～</p><p><strong>3.</strong><i>2007.09.13.10:59.am</i>.&nbsp;<a href="http://www.marketing-life.cn">Shaoqing</a>: 我的估计不少ERRORS.唉</p><p><strong>2.</strong><i>2007.09.12.8:34.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: Warning无所谓，error就不大好了。
嘿嘿，刚才帮你测了下，有4个errors，不过都是颜色定义的，很容易改掉。</p><p><strong>1.</strong><i>2007.09.12.8:22.pm</i>.&nbsp;<a href="http://ljhui.cn">ljhui</a>: 我用的那个主题.有这么多前辈在用就该不会存在Warning的问题.</p><hr/><p style="font-size:1.5em;font-weight:bold;">推荐阅读</p><p><i>2007.09.15.10:41.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/721.html" title="继将CSS修改符合W3C规范后，今天花了点时间，也将模板代码修改完毕，通过">继续修改模板 (4)</a></p><p><i>2008.09.09.8:58.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/994.html" title="今天，Wordpress官方发布了2.6.2版。没有跑去Trac看代码变动地方，直接就将程">Wordpress Hacks:WP2.2版后中文邮件标题乱码解决方法 (22)</a></p><p><i>2008.08.20.8:11.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/987.html" title="假设您已经阅读过上文，对于此问题背景的来龙去脉有所了解。此文将正式">Wordpress Hacks:解决晒SPAM数无法通过W3C验证&#8230;续 (11)</a></p><p><i>2008.08.20.1:52.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/986.html" title="此文谨献给爱晒SPAM数的人。比如说，看这篇文章的您，因为您要不是正想">Wordpress Hacks: to 解决晒Askimet SPAM数无法通过W3C验证问题 (24)</a></p><p><i>2008.08.03.11:23.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/978.html" title="难得一个周末呆在家里，想睡个懒觉都不行。隔壁的朝鲜学校的音乐CIRCLE的">鸟儿早起 (43)</a></p><p><i>2008.07.27.10:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/971.html" title="WP2.6带来了很多新功能。如后台的turbo等。相比2.3到2.5，2.5到2.6之间给我的">Wordpress Hacks:如何关闭WP2.6的主题预览 (18)</a></p><p><i>2007.12.08.10:50.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/888.html" title="2007-12-09：注，我已经写了一个插件用于含有nextpage或more标签的feed全文输出">如何使用Wordpress内置的分页（Nextpage）功能？ (52)</a></p><p><i>2007.10.31.12:42.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/830.html" title="Updated:此问题已经在2.3.3中被修复。
*****************************
前几天，将Wordp">Wordpress Hacks:升级2.3.1可能出现邮件提醒失效的解决方法 (20)</a></p><hr/><p>Copyright &copy; 2012&nbsp;|&nbsp;<a href="http://www.thinkagain.cn">Think Again</a>&nbsp;|&nbsp;<a href="http://www.thinkagain.cn/archives/707.html">原文链接</a></p><img src="http://img.tongji.cn.yahoo.com/710673/ystat.gif"/>]]></content:encoded>
			<wfw:commentRss>http://www.thinkagain.cn/archives/707.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>图文介绍如何在本地服务器安装Movable Type 4.0</title>
		<link>http://www.thinkagain.cn/archives/611.html</link>
		<comments>http://www.thinkagain.cn/archives/611.html#comments</comments>
		<pubDate>Tue, 21 Aug 2007 00:44:14 +0000</pubDate>
		<dc:creator>山之岚</dc:creator>
				<category><![CDATA[Blogger]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Movable-Type]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.thinkagain.cn/archives/611.html</guid>
		<description><![CDATA[又是一时心血来潮，试用过Wordpress后，想装上Movable Type 4.0玩玩看。于是就到MT下载了最新版的MT4.0，无奈Freepgs上的cgi已经被禁了，只好在本地服务器(Apache+php+mysql-XAMPP)上装着试试看。然而MT这玩... ]]></description>
			<content:encoded><![CDATA[<p>又是一时心血来潮，试用过Wordpress后，想装上Movable Type 4.0玩玩看。于是就到MT下载了最新版的MT4.0，为了调试方便，准备在本地服务器(Apache+php+mysql-XAMPP)上装着试试看。然而MT这玩意可不像安装Wordpress那么简单，只需解压后的WP文件直接放入服务器文件夹中，按向导提示就可以自动完成wordpress博客的配置。MT必须手动配置些，诸如perl路径，static文件路径等。而本人对此也是半桶水，叮当响。在Baidu下搜索了下，有介绍安装MT的基本都是在远程服务器上安装，发现正儿八经的本地安装教程好像还没有（PS，没有认真地毯式搜索）。无奈上Google去，倒是找到了一篇<a href="http://www.fortysomething.ca/mt/etc/archives/005302.php">How to Install Movable Type on Windows XP</a>帮助不少，貌似很顺利，却最终卡在最后的第5步，配置blog后就停留在Initializing database&#8230; Starting installation&#8230;，无法出现login界面，检查数据库也没有建立任何表项。于是乎，继续google，跑到MT论坛上混去，搜到了一篇老贴，内容涉及同样问题的，但却无回帖。后来有找到一篇<a href="http://www.cantoni.org/2007/06/21/movabletype-wordpress-xampp">Movable Type and WordPress on XAMPP &#8211; Cantoni.org</a>，里面简要提到了几个步骤。结合2篇教程，再加上自己动手慢慢调试，最终搞定！</p>
</p>
<p>说了半天，什么是Movable Type？老Blogger应该都知道了。具体是什么东西？自己Google吧。求知过程最大乐趣就在于自己动手。MT和WP最大的区别就是MT直接生成静态HTML文件，而非每次从数据库动态加载。当初自己在选择博客建站程序的时候，也曾犹豫过，但考虑在WP上手容易以及庞大的插件支持，还是选择了WP。然而现在却在WP建的站上大谈如何安装MT，呵呵。关于MT和WP间的优劣点，可以参考下网友风暴轻狂写的一篇MT和WP对比文章：<a href="http://lxz.name/html/wp2-vs-mt4.html">客观详细中文评测，WordPress2 VS MovableType4</a>。他还写了一篇文章介绍如何在远程服务器上安装MT，有兴趣的可以借鉴下。</p>
<p>下面从零开始介绍如何建立基于Apache的本地服务器，接着在本地服务器上安装MT。<strong>文中粗体部分，请特别注意</strong>。点击图片可查看大图。</p>
<p>本法在winxp sp2，中英系统中测试通过。</p>
<p>1. 下载文件</p>
<p>从2001年至今，MT已发展到4.0了。在其官方网站上可以下载到最新的<a href="http://www.movabletype.com/download/personal-use.html">4.0个人版</a>。</p>
<p>本文将采用XAMPP用于搭建本地服务器，XAMPP也是一个非常有名的建站软件包，安装及其简单，安装后将提供Apache+PHP+Mysql环境。在其官方网站下载最新的<a href="http://www.apachefriends.org/download.php?xampp-win32-1.6.3a-installer.exe">1.6.3a windows版</a>，以及<a href="http://www.apachefriends.org/download.php?xampp-win32-perl-addon-5.8.8-2.2.4-installer.exe">Perl 5.8.8插件</a>，<strong>先安装XAMPP，然后再安装Perl插件</strong>。</p>
<p>2. 解压下载的MT-4.0-en.zip，将得到的mt-4.0-en复制到:xampp安装目录\cgi-bin下面。如我是将XAMPP安装在D盘根目录，就是D:\xmpp\htdocs，默认是安装在C盘根目录。<strong>然后将里面的mt-static文件夹剪切出来放置到：xampp\htdocs下面。</strong></p>
<p>3. 进入cgi-bin\MT-4.0-en目录，用文本编辑器如editplus等，打开任意一个cgi文件，将第一行的代码：</p>
<blockquote><p><span style="color: green">#!/usr/bin/perl -w</span></p>
</blockquote>
<p>改为：</p>
<blockquote><p><span style="color: green">#!D:\xampp\perl\bin\perl.exe</span></p>
</blockquote>
<p>其中D:\xampp是我的xampp的安装目录。保存退出。<strong>然后务必将该目录下所有*.cgi文件(共13个)的第1行代码全部改过。</strong>目录下的mt-config.cgi-original文件暂且不用动。</p>
<p>4.打开xampp的控制面板，启动apache和mysql服务，一定要确认apache和mysql服务已启动，如图1。否则将无法进行后续步骤。</p>
<p><a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/xampp1.jpg" target="_blank" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="340" alt="xampp" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/xampp-thumb1.jpg" width="425" border="0"/></a></p>
<p>图1 启动Apache和Mysql服务</p>
<p>&nbsp;</p>
<p>在浏览器地址栏中中输入：<a title="http://localhost/cgi-bin/MT-4.0-en/mt-check.cgi" href="http://localhost/cgi-bin/MT-4.0-en/mt-check.cgi">http://localhost/cgi-bin/MT-4.0-en/mt-check.cgi</a>，打开mt的测试页面。如图2。</p>
<p><a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-021.jpg" target="_blank" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="253" alt="install_MT4_02" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-02-thumb1.jpg" width="425" border="0"/></a></p>
<p>图2 MT测试页面-1</p>
<p>&nbsp;</p>
<p>因为我们还没生成mt-config.cgi，所以将会提示“Movable Type configuration file was not found”（没找到Movable type的配置文件），这个文件将会在后续步骤中自动生成。将测试页面往下来，查看下服务器是否具备了所有MT运行必需的模块(Required module和Data storage module)。如图3。正确安装XAMPP将会提供所有MT必需模块。如CGI，mysql。</p>
<p><a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-031.jpg" target="_blank" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="260" alt="install_MT4_03" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-03-thumb1.jpg" width="425" border="0"/></a></p>
<p>图3 MT测试页面-2</p>
<p>&nbsp;</p>
<p>如果是手动编辑好mt-config.cgi的话，将会在网页最后显示“Movable Type System Check Successful”的提示。如图4：</p>
<p><a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/291.jpg" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="203" alt="截取-29" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/29-thumb1.jpg" width="425" border="0"/></a></p>
<p>图4 MT测试页面-3</p>
<p>&nbsp;</p>
<p>5. 输入：<a title="http://localhost/cgi-bin/MT-4.0-en/mt-wizard.cgi" href="http://localhost/cgi-bin/MT-4.0-en/mt-wizard.cgi">http://localhost/cgi-bin/MT-4.0-en/mt-wizard.cgi</a>，开始配置MT。将会出现如图5 Welcome界面，要求输入mt-static所作目录。我们刚才将mt-static文件夹放在htdocs下面，所以只需简单输入/mt-static即可。</p>
<p><a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-041.jpg" target="_blank" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="453" alt="install_MT4_04" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-04-thumb1.jpg" width="425" border="0"/></a></p>
<p>图5 输入mt-static路径</p>
<p>&nbsp;</p>
<p>点击Begin开始配置MT。MT首先会检查所需模块是否都有。一切顺利将有图6提示“All required Perl modules were found”，所需Perl模块已找到。</p>
<p><a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-051.jpg" target="_blank" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="297" alt="install_MT4_05" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-05-thumb1.jpg" width="367" border="0"/></a></p>
<p>图6 MT模块检查结果</p>
<p>&nbsp;</p>
<p>点击Continue开始进行数据库配置。如图7。</p>
<p>&nbsp;<a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-061.jpg" target="_blank" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="273" alt="install_MT4_06" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-06-thumb1.jpg" width="367" border="0"/></a></p>
<p>图7 开始配置数据库</p>
<p>&nbsp;</p>
<p>由于我们还未建立数据库，所以暂且撇开MT，先用XAMPP自带的phpmyadmin来建立数据库。如果您有已现成数据库，请直接跳到步骤7。</p>
<p>&nbsp;</p>
<p>6. 建立数据库</p>
<p>在地址栏中输入：<a title="http://localhost/phpmyadmin/" href="http://localhost/phpmyadmin/">http://localhost/phpmyadmin/</a>&nbsp;，启动phpMyadmin连上mysql。在Create new database里面输入拟新建的数据库名称，如mt。Mysql connection collation默认为utf8_unicode_ci。如图8。然</p>
<p><a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/create-mysql-db011.jpg" target="_blank" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="272" alt="create_Mysql_db01" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/create-mysql-db01-thumb1.jpg" width="425" border="0"/></a></p>
<p>图8 建立数据库</p>
<p>&nbsp;</p>
<p>后点击Create建立名为mt的数据库，如图9。</p>
<p><a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/create-mysql-db021.jpg" target="_blank" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="178" alt="create_Mysql_db02" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/create-mysql-db02-thumb1.jpg" width="425" border="0"/></a></p>
<p>图9 mt数据库已建立</p>
<p>&nbsp;</p>
<p>7. 配置数据库</p>
<p>回到MT配置页面，在图7的下拉菜单中选中Mysql database，依次输入服务器地址，默认localhost，数据库名称，如mt，用户名和密码。xampp的默认数据库用户名是：root，密码为空。如果您有已建好数据库，请在此输入数据库名称，用户名和密码。</p>
<p><a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-071.jpg" target="_blank" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="539" alt="install_MT4_07" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-07-thumb1.jpg" width="374" border="0"/></a></p>
<p>图10 输入数据库信息</p>
<p>&nbsp;</p>
<p>点击Test Connection测试数据库连接。连接正确的话，将会有图11界面出来提示&#8221;Your database configuration is complete&#8221;，您的数据库已配置完毕。</p>
<p><a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-081.jpg" target="_blank" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="283" alt="install_MT4_08" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-08-thumb1.jpg" width="371" border="0"/></a></p>
<p>图11 数据库配置完毕</p>
<p>&nbsp;</p>
<p>8. 配置邮件以及生成mt-config.cgi文件</p>
<p>接着开始配置邮件。xammp默认不支持sendmail，（在MT的测试页面中也可以看出，在可选模块里面），无需进行邮件配置不影响MT的安装。所以邮件配置不必选择，直接点击Continue略过。如图12。</p>
<p><a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-091.jpg" target="_blank" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="310" alt="install_MT4_09" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-09-thumb1.jpg" width="368" border="0"/></a></p>
<p>图12 配置邮件</p>
<p>&nbsp;</p>
<p>图13是要求配置临时目录，默认是C:\Windows\Temp，请按默认设置，或自行新建一个文件夹，然后输入该文件夹路径。</p>
<p><a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-101.jpg" target="_blank" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="286" alt="install_MT4_10" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-10-thumb1.jpg" width="367" border="0"/></a></p>
<p>图13 配置临时目录</p>
<p>&nbsp;</p>
<p>点击Contine，MT会检查是否存在该目录，如果没有目录，会有出错提示。一切正常，则会将以上配置写入到mt-config.cgi文件中，并将该文件放置到MT-4.0-en目录（MT的安装目录）下。如图14。</p>
<p><a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-111.jpg" target="_blank" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="348" alt="install_MT4_11" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-11-thumb1.jpg" width="369" border="0"/></a></p>
<p>图14 生成mt-config.cgi</p>
<p>&nbsp;</p>
<p>至此，已完成MT的运行配置了，下面将开始配置博客。</p>
<p>&nbsp;</p>
<p>9. 博客配置</p>
<p>点击图14中的Continue将开始配置博客，如用户名，密码，博客名称，地址等。</p>
<p>在图15中输入用户名，显示名称，email地址，语言（无中文），密码和找回密码的提示语之类的用户信息。</p>
<p><a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-121.jpg" target="_blank" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="616" alt="install_MT4_12" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-12-thumb1.jpg" width="363" border="0"/></a></p>
<p>图15 输入用户信息</p>
<p>&nbsp;</p>
<p>图16中输入博客名称，地址，发布地址和时区。<strong>默认的博客地址是</strong><a href="http://localhost/BLOG-NAME"><strong>http://localhost/BLOG-NAME</strong></a><strong>，我将BLOG-NAME改为mt-demo，请在xampp\htdocs目录下手动建立mt-demo文件夹。您亦可以将BLOG-NAME改为自己喜欢的名字，但切记要在htdocs手动建立同名文件夹。</strong></p>
<p><a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-141.jpg" target="_blank" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="539" alt="install_MT4_14" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-14-thumb1.jpg" width="389" border="0"/></a></p>
<p>图16 设置博客信息</p>
<p>&nbsp;</p>
<p>点击Finish install后，MT将开始更新数据库。最终出现Sign in to Movable Type。如图17。</p>
<p><a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-161.jpg" target="_blank" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="397" alt="install_MT4_16" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-16-thumb1.jpg" width="369" border="0"/></a></p>
<p>图17 生成数据库</p>
<p>&nbsp;</p>
<p>恭喜，已成功安装MT4.0，点击Sign in to Movable Type按钮将会打开MT控制面板。如图18。控制面板中的标签页比较少，只有My First Blog（博客名）和Write Entry（写文章），不像WP有一整排。点击每个下拉箭头会出现子菜单。</p>
<p><a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-171.jpg" target="_blank" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="262" alt="install_MT4_17" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-17-thumb1.jpg" width="425" border="0"/></a></p>
<p>图18 MT后台界面</p>
<p>&nbsp;</p>
<p>点击 Write your first post来发布第一篇文章，如图19。输入标题，内容，标签，目录等，点击Save就可以发布了。</p>
<p><a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-181.jpg" target="_blank" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="256" alt="install_MT4_18" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-18-thumb1.jpg" width="425" border="0"/></a></p>
<p>图19 新建文章</p>
<p>&nbsp;</p>
<p>点击菜单栏最后一个类似页面的小按钮查看博客。默认的主题是红色的。如图20。</p>
<p><a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-191.jpg" target="_blank" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="260" alt="install_MT4_19" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-19-thumb1.jpg" width="425" border="0"/></a></p>
<p>图20 默认主题</p>
<p>&nbsp;</p>
<p>MT4.0自带了10个模板，都是3栏的页面布局。可以在菜单栏中，design-style进入主题管理页面。如图21。</p>
<p><a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-201.jpg" target="_blank" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="265" alt="install_MT4_20" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-20-thumb1.jpg" width="425" border="0"/></a></p>
<p>图21 更改主题-1</p>
<p>&nbsp;</p>
<p>点击左边的Default Styles，然后在中间选中自己中意的模板。点击Apply Design按钮即可替换模板。</p>
<p><a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-211.jpg" target="_blank" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="263" alt="install_MT4_21" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-21-thumb1.jpg" width="425" border="0"/></a></p>
<p>图22 更改主题-2</p>
<p>&nbsp;</p>
<p>刷新博客就可以看到新更换的样式。如图23。</p>
<p><a href="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-221.jpg" target="_blank" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="260" alt="install_MT4_22" src="http://www.thinkagain.cn/wp-content/uploads/2007/08/install-mt4-22-thumb1.jpg" width="425" border="0"/></a></p>
<p>图23 新的MT主题</p>
<p>&nbsp;</p>
<p>其实我也是从今天开始刚刚接触MT的，对于它的具体应用还不是很了解。希望今后有空能学下如何编制MT的模板。无论是MT或WP，在本地服务器顺利运行它们将会大大简化调试程序工作量。希望这篇介绍如何在本地服务器安装MT的文章对网友能有所帮助。</p>
<hr/><p style="font-size:1.5em;font-weight:bold;"><a href="http://www.thinkagain.cn/archives/611.html#comments">评论15:</a></p><p><strong>15.</strong><i>2011.04.04.8:50.am</i>.&nbsp;贺中一: 怎么手动编辑mt-config.cgi</p><p><strong>14.</strong><i>2011.04.04.8:44.am</i>.&nbsp;贺中一: http://localhost/cgi-bin/MT-4.0-en/mt-check.cgi不存在 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_evil.gif' alt=':evil:' class='wp-smiley' /> </p><p><strong>13.</strong><i>2009.03.12.9:17.pm</i>.&nbsp;沙漠里的活鱼: 谢谢你完美的教程！～
把AppServ卸载过后终于在本机架上MT！
慢慢学习！～</p><p><strong>12.</strong><i>2009.02.13.9:12.pm</i>.&nbsp;<a href="http://www.teikinka.com/movabletype.html">Godaddy主机上安装Movable Type</a>: [...] 有一篇图文介绍如何在本地服务器安装Movable Type的教程，可以作为参考。 [...]</p><p><strong>11.</strong><i>2008.04.09.8:35.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: 这大概是半年前写的文章，因为自己基本没什么接触MT，所以现在很难来回答你的问题了。如果是WP的话，还好。Sorry。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_redface.gif' alt=':oops:' class='wp-smiley' /> </p><p><strong>10.</strong><i>2008.04.09.6:16.pm</i>.&nbsp;<a href="http://www.teikinka.com">YoungCheon</a>: 我把config手动编辑以后进入页面 等signin的时候出来如下信息<code>
Can't connect to data source '' because I can't work out what driver to use (it doesn't seem to contain a 'dbi:driver:' prefix and the DBI_DRIVER env var is not set) at D:\xampp\cgi-bin\MT\extlib/Data/ObjectDriver/Driver/DBI.pm line 54 at D:\xampp\cgi-bin\MT\extlib/Data/ObjectDriver/Driver/BaseCache.pm line 234</code>

该如何去做？？</p><p><strong>9.</strong><i>2008.04.09.3:32.pm</i>.&nbsp;<a href="http://www.teikinka.com">YoungCheon</a>: 详细写一下请帮忙
xampp 是1.6.6a 安装正确
下载是MTOS4.1版本
CGI文件 不是13个是12个
其他都没有问题 也就是你说的第5步开始出现问题
输入/mt-static的时候总是出现Error: ‘/mt-static’ could not be found 和你的完全一致 多次试验
路径没有错放在htdocs下。
到底什么问题？</p><p><strong>8.</strong><i>2008.04.09.3:06.pm</i>.&nbsp;<a href="http://www.teikinka.com">YoungCheon</a>: Error: '/mt-static' could not be found

我下载了mtos4.1  却输入mt-static的时候总是出现Error: '/mt-static' could not be found  和你的完全一致  多次试验 ，不一样之处CGI是12个  xampp1.6.6a</p><p><strong>7.</strong><i>2008.03.16.7:12.pm</i>.&nbsp;dingdang1972: 感谢分享,我终于安上了MT. <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_surprised.gif' alt=':eek:' class='wp-smiley' /> </p><p><strong>6.</strong><i>2008.01.21.7:30.pm</i>.&nbsp;<a href="http://k12info.net">newmarco</a>:  <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_idea.gif' alt=':idea:' class='wp-smiley' />   感谢你的分享，我终于安装了MT。</p><p><strong>5.</strong><i>2007.11.05.8:55.pm</i>.&nbsp;<a href="http://orrio.cn/movabletype4-on-localmachine/internet/movabletype/">图文介绍如何在本地服务器安装Movable Type 4.0 | orrio</a>: [...] 原文在这里。 [...]</p><p><strong>4.</strong><i>2007.10.05.10:02.pm</i>.&nbsp;<a href="http://touke.net/posts/490.html">探花 @ Tinn Walk &raquo; 本地安装Movable Type 4.01</a>: [...] 可惜没成功 也不想动脑 就google了一下 找到了陈希力老师儿写的一篇图文教程 写的太详细了 禁不住对他的细心和耐心敬佩一下 按部就班 [...]</p><p><strong>3.</strong><i>2007.09.23.10:46.am</i>.&nbsp;<a href="http://hilogin.3322.org/weblog/2007/09/movabletype40.html">网络与电脑维护</a>: <strong>MovableType4.0安装成功...</strong>

在Appserv下面一直不能安装MovableType4.0，原来用的也只能安装......</p><p><strong>2.</strong><i>2007.08.26.6:23.pm</i>.&nbsp;<a href="http://lxz.name">ddkk3000</a>: 不会比远程麻烦多少

用pma创立一个数据库，用户名，跟着mt安装就可以了，mt现在做的也很简便了</p><p><strong>1.</strong><i>2007.08.23.11:04.am</i>.&nbsp;<a href="http://ecvip.org/">oxygen</a>: 不错啊，很详细的介绍。

我也想去试试了，不过现在来说还是更喜欢wp一些。</p><hr/><p style="font-size:1.5em;font-weight:bold;">推荐阅读</p><p><i>2007.03.11.1:50.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/101.html" title="因为上次搬家的时候，是直接将bokee上的文章拷贝到网址上来的，现在想在">如何在本地服务器建远程服务器上wordpress的镜像 (2)</a></p><p><i>2008.09.09.8:58.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/994.html" title="今天，Wordpress官方发布了2.6.2版。没有跑去Trac看代码变动地方，直接就将程">Wordpress Hacks:WP2.2版后中文邮件标题乱码解决方法 (22)</a></p><p><i>2008.07.27.10:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/971.html" title="WP2.6带来了很多新功能。如后台的turbo等。相比2.3到2.5，2.5到2.6之间给我的">Wordpress Hacks:如何关闭WP2.6的主题预览 (18)</a></p><p><i>2007.12.08.10:50.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/888.html" title="2007-12-09：注，我已经写了一个插件用于含有nextpage或more标签的feed全文输出">如何使用Wordpress内置的分页（Nextpage）功能？ (52)</a></p><p><i>2007.10.31.12:42.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/830.html" title="Updated:此问题已经在2.3.3中被修复。
*****************************
前几天，将Wordp">Wordpress Hacks:升级2.3.1可能出现邮件提醒失效的解决方法 (20)</a></p><p><i>2007.10.22.11:05.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/822.html" title="在wordpress中，默认点击评论者的链接时，会在同一窗口内打开该链接。这在">Wordpress Hacks: 在新窗口中打开评论者链接和no follow属性 (16)</a></p><p><i>2007.09.15.10:41.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/721.html" title="继将CSS修改符合W3C规范后，今天花了点时间，也将模板代码修改完毕，通过">继续修改模板 (4)</a></p><p><i>2007.06.11.3:55.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/189.html" title="由于博客上的图片大部分都是放在Flickr上的，所以Flickr被禁后导致国内朋友">WordPress解决Flickr图片显示方法 (3)</a></p><hr/><p>Copyright &copy; 2012&nbsp;|&nbsp;<a href="http://www.thinkagain.cn">Think Again</a>&nbsp;|&nbsp;<a href="http://www.thinkagain.cn/archives/611.html">原文链接</a></p><img src="http://img.tongji.cn.yahoo.com/710673/ystat.gif"/>]]></content:encoded>
			<wfw:commentRss>http://www.thinkagain.cn/archives/611.html/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>WordPress解决Flickr图片显示方法</title>
		<link>http://www.thinkagain.cn/archives/189.html</link>
		<comments>http://www.thinkagain.cn/archives/189.html#comments</comments>
		<pubDate>Mon, 11 Jun 2007 07:55:02 +0000</pubDate>
		<dc:creator>山之岚</dc:creator>
				<category><![CDATA[Blogger]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.thinkagain.cn/archives/189.html</guid>
		<description><![CDATA[由于博客上的图片大部分都是放在Flickr上的，所以Flickr被禁后导致国内朋友在浏览博客时都无法看到图片了。在Google reader上看到有文章说，flickr只是DNS解析服务被禁了，直接输入ip地址的话，... ]]></description>
			<content:encoded><![CDATA[<p>由于博客上的图片大部分都是放在Flickr上的，所以Flickr被禁后导致国内朋友在浏览博客时都无法看到图片了。在Google reader上看到有文章说，flickr只是DNS解析服务被禁了，直接输入ip地址的话，仍可以正常显示图片。于是找了张图片，看了下图片地址是：<a title="http://farm1.static.flickr.com/196/517657253_3a6d59890b_o.jpg" href="http://farm1.static.flickr.com/196/517657253_3a6d59890b_o.jpg">http://farm1.static.flickr.com/196/517657253_3a6d59890b_o.jpg</a>，用cmd调出dos窗口，ping了下在farm1.static.flickr.com反馈ip地址为68.142.213.135，然后用68.142.213.135替代farm1.static.flickr.com，打开一个新窗口，将更换后的图片地址输入<a title="http://68.142.213.135/196/517657253_3a6d59890b_o.jpg" href="http://68.142.213.135/196/517657253_3a6d59890b_o.jpg">http://68.142.213.135/196/517657253_3a6d59890b_o.jpg</a>，果然可以正确显示。</p>
<p>但我的问题，并不是自己浏览网页时的显示问题，因为我在国外可以正常访问flickr，而是国内朋友看我网站时的图片显示问题。换个角度来考虑问题，如果只是DNS被禁的话，直接将数据库内的图片地址全部转换成ip形式不就可以了吗。</p>
<p>flickr的图片主要放在farm1.static.flickr.com和farm2.static.flickr.com服务器上，ping了下farm2.static.flickr.com，得到ip地址是：69.147.90.156。</p>
<p>打开phpMyAdmin，连到wp数据库，点击SQL，输入下列2行SQL代码然后可分别分别将post_content（存放文章内容的地方，隶属leo_posts表格）内的flickr url地址改为ip地址：</p>
<blockquote><p>UPDATE `leo_posts` SET `post_content` = REPLACE(`post_content`, &#8216;farm1.static.flickr.com&#8217;, &#8217;68.142.213.135&#8242;);<br />69.147.123.56</p>
<p>UPDATE `leo_posts` SET `post_content` = REPLACE(`post_content`, &#8216;farm2.static.flickr.com&#8217;, &#8217;69.147.90.156&#8242;);</p>
</blockquote>
<p>&nbsp;</p>
<p>点击Go执行后，从执行结果发现farm1服务器的图片占了大多数，有32张，farm2的图片才1张。</p>
<p>有一个叫花儿的网友写了一个wordpress插件下载开了代码，原理基本一样，是在wordpress显示帖子内容的时候中直接将farm1.static.flickr.com显示为ip地址。激活该插件后，无需修改数据库就可以正常显示flickr图片了。但我发现它里面提供的farm2.static.flickr.com的ip地址是69.147.123.56，竟然和我ping的结果69.147.90.156不大一样。按插件提供的ip地址也能正常访问flickr。头2部分ip地址69.147一样，说明指向是同一个域名的，难道DNS的解析还按地区分类？具体就不得而知了。</p>
<p>不过这都只是治标方法，如果flickr的ip也被禁的话，那就没有方法了。所以准备以后文章中的引用图片都放在自己站点上了。如果是自己的原创图片的话，都准备用live writer打上ThinkAgain.CN水印了。:-)</p>
<p>打算今后都用live writer来写文章了。不单单是看中它的图片管理功能（阴影，水印等），新版的live writer在功能有了很大的改进。而且还支持插入表格，地图等了。</p>
<hr/><p style="font-size:1.5em;font-weight:bold;"><a href="http://www.thinkagain.cn/archives/189.html#comments">评论3:</a></p><p><strong>3.</strong><i>2010.01.28.8:06.pm</i>.&nbsp;<a href="http://www.uptall.com">uptall</a>: 我的网站的图片也都是存在自己的主机里的，但是很占空间啊，想寻找可靠的第三方存图片。</p><p><strong>2.</strong><i>2009.11.17.6:33.pm</i>.&nbsp;<a href="http://www.skun.cn">skun</a>: 从来不敢将图片放到第三方。。。</p><p><strong>1.</strong><i>2008.04.24.4:00.pm</i>.&nbsp;<a href="http://kof2002.vicp.net/wp/?p=14">梦雨部落格 &raquo; blog archive &raquo; WordPress解决Flickr图片显示方法</a>: [...] 由于博客上的图片大部分都是放在Flickr上的，所以Flickr被禁后导致国内朋友在浏览博客时都无法看到图片了。在Google reader上看到有文章说，flickr只是DNS解析服务被禁了，直接输入ip地址的话，仍可以正常显示图片。于是找了张图片，看了下图片地址是：http://farm1.static.flickr.com/196/517657253_3a6d59890b_o.jpg，用cmd调出dos窗口，ping了下在farm1.static.flickr.com反馈ip地址为68.142.213.135，然后用68.142.213.135替代farm1.static.flickr.com，打开一个新窗口，将更换后的图片地址输入http://68.142.213.135/196/517657253_3a6d59890b_o.jpg，果然可以正确显示。  [...]</p><hr/><p style="font-size:1.5em;font-weight:bold;">推荐阅读</p><p><i>2008.09.09.8:58.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/994.html" title="今天，Wordpress官方发布了2.6.2版。没有跑去Trac看代码变动地方，直接就将程">Wordpress Hacks:WP2.2版后中文邮件标题乱码解决方法 (22)</a></p><p><i>2008.07.27.10:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/971.html" title="WP2.6带来了很多新功能。如后台的turbo等。相比2.3到2.5，2.5到2.6之间给我的">Wordpress Hacks:如何关闭WP2.6的主题预览 (18)</a></p><p><i>2007.12.08.10:50.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/888.html" title="2007-12-09：注，我已经写了一个插件用于含有nextpage或more标签的feed全文输出">如何使用Wordpress内置的分页（Nextpage）功能？ (52)</a></p><p><i>2007.10.31.12:42.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/830.html" title="Updated:此问题已经在2.3.3中被修复。
*****************************
前几天，将Wordp">Wordpress Hacks:升级2.3.1可能出现邮件提醒失效的解决方法 (20)</a></p><p><i>2007.10.22.11:05.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/822.html" title="在wordpress中，默认点击评论者的链接时，会在同一窗口内打开该链接。这在">Wordpress Hacks: 在新窗口中打开评论者链接和no follow属性 (16)</a></p><p><i>2007.09.15.10:41.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/721.html" title="继将CSS修改符合W3C规范后，今天花了点时间，也将模板代码修改完毕，通过">继续修改模板 (4)</a></p><p><i>2007.08.21.8:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/611.html" title="又是一时心血来潮，试用过Wordpress后，想装上Movable Type 4.0玩玩看。于是就">图文介绍如何在本地服务器安装Movable Type 4.0 (15)</a></p><p><i>2007.04.30.8:14.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/161.html" title="Widgets是一个可视化Wordpress主题侧边栏编辑插件，用户可以在Wordpress后台主">如何修改代码使主题支持widgets (5)</a></p><hr/><p>Copyright &copy; 2012&nbsp;|&nbsp;<a href="http://www.thinkagain.cn">Think Again</a>&nbsp;|&nbsp;<a href="http://www.thinkagain.cn/archives/189.html">原文链接</a></p><img src="http://img.tongji.cn.yahoo.com/710673/ystat.gif"/>]]></content:encoded>
			<wfw:commentRss>http://www.thinkagain.cn/archives/189.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>如何修改代码使主题支持widgets</title>
		<link>http://www.thinkagain.cn/archives/161.html</link>
		<comments>http://www.thinkagain.cn/archives/161.html#comments</comments>
		<pubDate>Mon, 30 Apr 2007 12:14:13 +0000</pubDate>
		<dc:creator>山之岚</dc:creator>
				<category><![CDATA[Blogger]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[widget]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.thinkagain.cn/archives/161.html</guid>
		<description><![CDATA[Widgets是一个可视化Wordpress主题侧边栏编辑插件，用户可以在Wordpress后台主题配置里面，通过拖曳相应模块到侧边栏来自定义侧边栏内容显示。具体使用说明，详见本人另外一篇文章：Widgets 1.21... ]]></description>
			<content:encoded><![CDATA[<p>Widgets是一个可视化Wordpress主题侧边栏编辑插件，用户可以在Wordpress后台主题配置里面，通过拖曳相应模块到侧边栏来自定义侧边栏内容显示。具体使用说明，详见本人另外一篇文章：<a href="http://www.thinkagain.cn/archives/158.html">Widgets 1.21中文版及使用说明（附图）</a>。</p>
<p>只需在主题文件里面加入适当代码，就可以让主题支持widget拖曳。</p>
<p><strong>1. 修改functions.php代码</strong></p>
<p>如果该主题有functions.php，请在&lt;?php 代码后中加入：</p>
<p>if ( function_exists(&#8216;register_sidebars&#8217;) )</p>
<p>register_sidebars();</p>
<p>如果没有functions.php文件，请建立一个functions.php文件，并输入如下4行代码：</p>
<p>&lt;?php</p>
<p>if ( function_exists(&#8216;register_sidebars&#8217;) )</p>
<p>register_sidebars();</p>
<p>?&gt;</p>
<p>注意，如果侧边栏数量大于1，请在register_sidebars()的()中输入具体数量。例，侧边栏的数目为2，代码为register_sidebars(2);</p>
<p><strong>2.2 修改侧边栏代码</strong></p>
<p>在主题文件中找到侧边栏定义代码，例如：</p>
<p>&lt;div id=&#8221;sidebar&#8221;&gt;</p>
<p>&#8230;侧边栏内容</p>
<p>&lt;/div&gt;</p>
<p>将</p>
<p>&lt;?php if ( function_exists(&#8216;dynamic_sidebar&#8217;) &amp;&amp; dynamic_sidebar() ) : else : ?&gt;</p>
<p>&lt;?php endif; ?&gt;</p>
<p>代码嵌套在sidebar的&lt;div&gt;标签里面即可。</p>
<p>&lt;div id=&#8221;sidebar&#8221;&gt;</p>
<p>&lt;?php if ( function_exists(&#8216;dynamic_sidebar&#8217;) &amp;&amp; dynamic_sidebar() ) : else : ?&gt;</p>
<p>&#8230;侧边栏内容</p>
<p>&lt;?php endif; ?&gt;</p>
<p>&lt;/div&gt;</p>
<p>侧边栏的数目为2的时候，要分别定义。例：</p>
<p>&lt;div id=&#8221;sidebar1&#8243;&gt;</p>
<p>&lt;?php if ( function_exists(&#8216;dynamic_sidebar&#8217;) &amp;&amp; dynamic_sidebar(1) ) : else : ?&gt;<br />
&#8230;侧边栏内容</p>
<p>&lt;?php endif; ?&gt;</p>
<p>&lt;/div&gt;</p>
<p>&lt;div id=&#8221;sidebar2&#8243;&gt;</p>
<p>&lt;?php if ( function_exists(&#8216;dynamic_sidebar&#8217;) &amp;&amp; dynamic_sidebar(2) ) : else : ?&gt;<br />
&#8230;侧边栏内容</p>
<p>&lt;?php endif; ?&gt;</p>
<p>&lt;/div&gt;</p>
<p>注意：dynamic_sidebar()括号里面内容要各个侧边栏相对应。默认Widget中的样式，标题是h2格式，内容以&lt;ul&gt;和&lt;li&gt;标签嵌套。</p>
<hr/><p style="font-size:1.5em;font-weight:bold;"><a href="http://www.thinkagain.cn/archives/161.html#comments">评论5:</a></p><p><strong>5.</strong><i>2008.11.08.10:54.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: <a href="#comment-76412" rel="nofollow">@notycn </a>谢谢提醒。已更正。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_razz.gif' alt=':razz:' class='wp-smiley' /> </p><p><strong>4.</strong><i>2008.11.08.10:18.pm</i>.&nbsp;<a href="http://www.notycn.com">notycn</a>: 有个错误,f ( function_exists(’register_sidebars’) )   少了个I</p><p><strong>3.</strong><i>2008.05.29.7:59.pm</i>.&nbsp;<a href="http://www2.netyifan.cn/?p=34">让主题支持widgets？ | 在德国</a>: [...]        首先：经比较发现，凡是支持的widget功能的的主题，其目录里都含有文件functions.php 。而不支持的没有。故该文件是能否实现widget功能的关键原因。若主题的目录里无functions.php 文件，请建立一个functions.php文件，并输入如下代码：  [...]</p><p><strong>2.</strong><i>2008.05.09.10:44.am</i>.&nbsp;<a href="http://www.okweb.cn">上海网站设计</a>: 学习了，正好找这篇文章！
谢谢了！</p><p><strong>1.</strong><i>2007.12.20.9:21.pm</i>.&nbsp;<a href="http://www.365share.cn/?p=14">StylZone &raquo; Blog Archive &raquo; 如何修改代码使主题支持widgets</a>: [...] Widgets是一个可视化Wordpress主题侧边栏编辑插件，用户可以在Wordpress后台主题配置里面，通过拖曳相应模块到侧边栏来自定义侧边栏内容显示。具体使用说明，详见另外一篇文章：Widgets 1.21中文版及使用说明（附图）。  [...]</p><hr/><p style="font-size:1.5em;font-weight:bold;">推荐阅读</p><p><i>2007.04.17.12:18.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/147.html" title="Latest Updated:无需修改源代码即可以实现评论显示倒序。在评论模板comments.php">如何更改Wordpress评论显示顺序 (33)</a></p><p><i>2007.03.31.12:04.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/129.html" title="前阵子看Feedsky正在进行话题广告内测，于是就申请了一个。估计Feedsky进行">如何在Wordpress进行Feedsky话题广告验证 (0)</a></p><p><i>2007.03.15.11:32.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/109.html" title="每次打开Wordpress后台控制面板首页，Wordpress都会加载一些诸如外部链接，Wor">无需插件删除Wordpress后台控制面板中的外部链接 (6)</a></p><p><i>2007.03.11.1:50.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/101.html" title="因为上次搬家的时候，是直接将bokee上的文章拷贝到网址上来的，现在想在">如何在本地服务器建远程服务器上wordpress的镜像 (2)</a></p><p><i>2008.09.09.8:58.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/994.html" title="今天，Wordpress官方发布了2.6.2版。没有跑去Trac看代码变动地方，直接就将程">Wordpress Hacks:WP2.2版后中文邮件标题乱码解决方法 (22)</a></p><p><i>2008.08.03.11:23.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/978.html" title="难得一个周末呆在家里，想睡个懒觉都不行。隔壁的朝鲜学校的音乐CIRCLE的">鸟儿早起 (43)</a></p><p><i>2008.07.27.10:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/971.html" title="WP2.6带来了很多新功能。如后台的turbo等。相比2.3到2.5，2.5到2.6之间给我的">Wordpress Hacks:如何关闭WP2.6的主题预览 (18)</a></p><p><i>2007.12.08.10:50.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/888.html" title="2007-12-09：注，我已经写了一个插件用于含有nextpage或more标签的feed全文输出">如何使用Wordpress内置的分页（Nextpage）功能？ (52)</a></p><hr/><p>Copyright &copy; 2012&nbsp;|&nbsp;<a href="http://www.thinkagain.cn">Think Again</a>&nbsp;|&nbsp;<a href="http://www.thinkagain.cn/archives/161.html">原文链接</a></p><img src="http://img.tongji.cn.yahoo.com/710673/ystat.gif"/>]]></content:encoded>
			<wfw:commentRss>http://www.thinkagain.cn/archives/161.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>如何更改WordPress评论显示顺序</title>
		<link>http://www.thinkagain.cn/archives/147.html</link>
		<comments>http://www.thinkagain.cn/archives/147.html#comments</comments>
		<pubDate>Tue, 17 Apr 2007 04:18:10 +0000</pubDate>
		<dc:creator>山之岚</dc:creator>
				<category><![CDATA[Blogger]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.thinkagain.cn/archives/147.html</guid>
		<description><![CDATA[Latest Updated:无需修改源代码即可以实现评论显示倒序。在评论模板comments.php中找到下列语句： &#60;?php if ($comments) : ?&#62; 在其后面添加上让评论倒序的代码： &#60;?php $comments = array_reverse($comments) ... ]]></description>
			<content:encoded><![CDATA[<p><strong>Latest Updated:</strong>无需修改源代码即可以实现评论显示倒序。在评论模板comments.php中找到下列语句：</p>
<p><code>&lt;?php if ($comments) : ?&gt;</code></p>
<p>在其后面添加上让评论倒序的代码：</p>
<p><code>&lt;?php $comments = array_reverse($comments) ?&gt;</code></p>
<p>谢谢<a href="http://zhiqiang.org/blog/">Zhang</a>。<br />
<strong><br />
*************************</strong></p>
<p>WordPress默认的评论（留言）顺序是按照时间顺序升序来显示的，这样最新的评论会被显示在最下面，比较不符合阅读习惯（或者说是不符合我的阅读习惯吧）。通过更改comments_template的代码可以实现降序显示评论，从而将最新的评论显示在最前面。</p>
<p>进入Wordpress安装目录下的wp-includes目录，用文本编辑器打开comment-template.php文件，找到如下代码：</p>
<p><code>$comments = $wpdb-&gt;get_results("SELECT * FROM $wpdb-&gt;comments WHERE  comment_post_ID = '$post-&gt;ID' AND comment_approved = '1' ORDER BY  comment_date");</code></p>
<p>在“ORDER BY comment_date”后面加上“DESC”，</p>
<p><code>$comments = $wpdb-&gt;get_results("SELECT * FROM $wpdb-&gt;comments WHERE  comment_post_ID = '$post-&gt;ID' AND comment_approved = '1' ORDER BY  comment_date DESC");</code></p>
<p>保存退出，即可。这样评论的显示顺序就被改为以时间降序来显示了。</p>
<p>注：请将if else里面的3条get_results都加上DESC。</p>
<p>本方法在wordpress2.1、2.2中测试通过。</p>
<hr/><p style="font-size:1.5em;font-weight:bold;"><a href="http://www.thinkagain.cn/archives/147.html#comments">评论33:</a></p><p><strong>33.</strong><i>2011.11.17.11:49.am</i>.&nbsp;<a href="http://junsjourney.com/?p=262">玩[转]WordPress - 我的旅程</a>: [...] 无需修改源代码即可以实现评论显示倒序。在评论模板comments.php中找到下列语句：  [...]</p><p><strong>32.</strong><i>2011.07.03.9:40.am</i>.&nbsp;<a href="http://www.littlehana.cn/blog/?p=262">玩[转]WordPress &laquo; JunsJourney Studio</a>: [...] 无需修改源代码即可以实现评论显示倒序。在评论模板comments.php中找到下列语句：  [...]</p><p><strong>31.</strong><i>2011.04.16.1:40.pm</i>.&nbsp;<a href="http://junsjourney.wordpress.com/2011/04/15/%e7%8e%a9%e8%bd%acwordpress/">玩[转]WordPress &laquo; My Journey</a>: [...] &lt;?php $comments = array_reverse($comments) ?&gt; 即可 [...]</p><p><strong>30.</strong><i>2009.09.05.11:07.am</i>.&nbsp;<a href="http://liu.emstudy.cn/wordpress/wordpress-comments-order.html">更改Wordpress评论的显示顺序</a>: [...] 无需修改源代码即可以实现评论显示倒序。在评论模板comments.php中找到下列语句：  &lt;?php if ($comments) : ?&gt; [...]</p><p><strong>29.</strong><i>2009.08.05.11:23.pm</i>.&nbsp;<a href="http://www.neilblog.net/topsy-wordpress.html">玩转WordPress - Neil Blog</a>: [...] 无需修改源代码即可以实现评论显示倒序。在评论模板comments.php中找到下列语句：  [...]</p><p><strong>28.</strong><i>2008.11.15.12:55.pm</i>.&nbsp;<a href="http://blog.shiwode.net/blog/lets-latest-comments-show-that-in-the-above/">平凡生活，非凡人生 &raquo; 让最新的评论显示在最上边</a>: [...] 在评论模板comments.php中找到下列语句：  [...]</p><p><strong>27.</strong><i>2008.10.14.10:42.pm</i>.&nbsp;<a href="http://aunsen.com/index.php/post/271">玩转WordPress | 北风</a>: [...] 无需修改源代码即可以实现评论显示倒序。在评论模板comments.php中找到下列语句：  [...]</p><p><strong>26.</strong><i>2008.10.05.1:42.am</i>.&nbsp;<a href="http://www.iebookshop.com/2008/10/wordpress%e6%8a%80%e5%b7%a7%e4%b8%80%ef%bc%9a%e6%94%b9%e5%8f%98wordpress%e8%af%84%e8%ae%ba%e6%98%be%e7%a4%ba%e9%a1%ba%e5%ba%8f.html">Wordpress技巧一：改变Wordpress评论显示顺序 | 浏览者</a>: [...] 在评论模板comments.php中找到下列语句：  [...]</p><p><strong>25.</strong><i>2008.09.05.10:38.pm</i>.&nbsp;<a href="http://www.chancat.cn">禅猫</a>: @@山之岚 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_smile.gif' alt=':smile:' class='wp-smiley' />   我已经修改好了 按照博主 更新的 那段语句！</p><p><strong>24.</strong><i>2008.09.05.10:40.am</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: <a href="#comment-71028" rel="nofollow">@禅猫 </a>请按文中latest update的方法添加代码就可以了。不会出现问题的。
p.s，if else是基本的判断的语句。</p><p><strong>23.</strong><i>2008.09.05.2:02.am</i>.&nbsp;<a href="http://www.chancat.cn">禅猫</a>: if else是个啥哦  <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_eek.gif' alt=':shock:' class='wp-smiley' />  我是2.61 按您的方法修改 。。出现错误。。</p><p><strong>22.</strong><i>2008.08.06.1:48.pm</i>.&nbsp;<a href="http://3284265.cn">shamas</a>: 现在什么都讲究人性化 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_razz.gif' alt=':razz:' class='wp-smiley' /> </p><p><strong>21.</strong><i>2008.08.06.1:09.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: @shamas: 嗯，shamas这个意见不错。前阵子，刚刚将原来的降序改为正常了，就是因为回复不方便。</p><p><strong>20.</strong><i>2008.08.06.12:40.pm</i>.&nbsp;<a href="http://3284265.cn">shamas</a>: 我现在发现,如果评论进行降序的话,把评论发布框也应该放在上面,这样更合理,还有就是序号也相应进行降序排列,特别是评论太长了,翻到累才能发发评论</p><p><strong>19.</strong><i>2008.05.14.6:00.pm</i>.&nbsp;<a href="http://tioner.cn/archives/408">Simple Live &raquo; Blog Archive &raquo; WP2.5.1评论关闭消失</a>: [...] Latest Updated:无需修改源代码即可以实现评论显示倒序。在评论模板comments.php中找到下列语句：  [...]</p><p><strong>18.</strong><i>2008.05.10.11:23.am</i>.&nbsp;<a href="http://tioner.cn/archives/398">Simple Live &raquo; Blog Archive &raquo; WP2.5.1后解决评论关闭问题</a>: [...] Latest Updated:无需修改源代码即可以实现评论显示倒序。在评论模板comments.php中找到下列语句：  [...]</p><p><strong>17.</strong><i>2008.05.01.9:35.am</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: To 独木: 回复标号，是要通过自己编写代码来显示的。你可以参考下我的这个留言里面的代码：
<a href="http://www.thinkagain.cn/guestbook#comment-22197" rel="nofollow">http://www.thinkagain.cn/guestbook#comment-22197</a></p><p><strong>16.</strong><i>2008.05.01.1:12.am</i>.&nbsp;<a href="http://www.infoea.com">独木</a>: 也为此问题困扰，用了zhang的办法，马上解决问题，但是仍然有个问题存在，就是回复编号并没有倒序，不知该如何解决？谢谢分享经验</p><p><strong>15.</strong><i>2008.04.04.10:22.pm</i>.&nbsp;<a href="http://www.aftertown.cn/2008/04/how-to-change-comments-order/">城市@后 &raquo; 如何更改Wordpress评论显示顺序</a>: [...] 保存退出，即可。这样评论的显示顺序就被改为以时间降序来显示了。 注：请将if else里面的3条get_results都加上DESC。（文章技术来源：点击查看） [...]</p><p><strong>14.</strong><i>2008.03.30.10:50.pm</i>.&nbsp;<a href="http://www.lovelvey.cn/wordpress/%e6%94%b9%e5%8f%98wordpress%e8%af%84%e8%ae%ba%e6%8e%92%e5%88%97%e9%a1%ba%e5%ba%8f.html">改变Wordpress评论排列顺序 - ┡Love★Lvey┪━不可思议</a>: [...] Wordpress默认的评论（留言）顺序是按照时间顺序升序来显示的，这样最新的评论会被显示在最下面，比较不符合阅读习惯（或者说是不符合我的阅读习惯吧）。通过更改comments_template的代码可以实现降序显示评论，从而将最新的评论显示在最前面。  [...]</p><p><strong>13.</strong><i>2008.02.18.4:30.pm</i>.&nbsp;<a href="http://www.crescentdev.net/?p=160">The process for Crescent Blog | Crescent</a>: [...] Wordpress默认的评论（留言）顺序是按照时间顺序升序来显示的，这样最新的评论会被显示在最下面，比较不符合阅读习惯（或者说是不符合我的阅读习惯吧）。通过更改comments_template的代码可以实现降序显示评论，从而将最新的评论显示在最前面。  [...]</p><p><strong>12.</strong><i>2008.02.14.8:43.am</i>.&nbsp;<a href="http://www.briefdream.com/blog-update/">梦.:如此短暂</a>: <strong>Blog Update...</strong>

2008-2-12: Feed烧录由feedsky提供。启用了1个留言回复插件，1个附件管理插件，重新整理了图片。更新了Subscribe Button。启用侧边栏登录。换用exec-php执行侧边栏和页面中的php代码。
2008-2-13: 试图启...</p><p><strong>11.</strong><i>2008.02.04.10:28.am</i>.&nbsp;<a href="http://www.crescentdev.net/?p=44">The process for Crescent Blog &raquo; Crescent</a>: [...] Wordpress默认的评论（留言）顺序是按照时间顺序升序来显示的，这样最新的评论会被显示在最下面，比较不符合阅读习惯（或者说是不符合我的阅读习惯吧）。通过更改comments_template的代码可以实现降序显示评论，从而将最新的评论显示在最前面。  [...]</p><p><strong>10.</strong><i>2008.02.02.8:36.pm</i>.&nbsp;alexgao: 你的留言板ajx？</p><p><strong>9.</strong><i>2008.01.27.10:08.pm</i>.&nbsp;<a href="http://zhiqiang.org/blog/">zhang</a>: 晕，哪用得着这么麻烦啊，还去修改系统核心源代码。。


在comments.php最开始加上 $comments = array_reverse($comments)； 就可以了。</p><p><strong>8.</strong><i>2007.12.17.9:01.pm</i>.&nbsp;谢谢！: 能分享自己成果的人，真不错！
我的程序由于htaccess的缘故，出现了内部服务错误，在网上搜了半天，终于搜到一个和我有同样问题的人，他在论坛提问后，几个人回复都没有解决，最后他自己回复说，“问题解决了！”只留下了这几个字
没有办法，我现在在从装程序，看能不能好！</p><p><strong>7.</strong><i>2007.07.12.10:38.am</i>.&nbsp;<a href="http://together4u.cn">together4u</a>: wordpress博客刚建好.留言一出现后,就发现wordpress默认留言排序的缺点.google到你这,修改了文件,立刻见效.万分感谢!</p><p><strong>6.</strong><i>2007.06.06.2:45.pm</i>.&nbsp;motta: 非常感谢!
我刚才在本记测试的时候怎么也不行,但是这会儿刚刚回来,重新打开页面,就ok了!

太感谢你了!</p><p><strong>5.</strong><i>2007.06.06.1:37.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: 该方法在wp2.2下是可行的，因为我现在用的就是wp2.2。我是将3个select 语句都修改了。你可以再试试看。另已给你发邮件了，请查收。</p><p><strong>4.</strong><i>2007.06.06.12:21.pm</i>.&nbsp;motta: 按照您的办法试过了,但是还是不行....
您说的代码段附近有3个select语句,是不是都修改呢?还是说只改那一句?

我在用wordpress2.2

期待您的回复,谢谢</p><p><strong>3.</strong><i>2007.04.24.10:29.am</i>.&nbsp;<a href="http://">山之岚</a>: 如果你要只让留言板这页的评论倒序而其它文章保持不变的话，那么只能新建一个自定义的页面模板作为留言板，然后在模板里面编写代码设置评论的顺序，这样比较麻烦。要不就直接用插件了。</p><p><strong>2.</strong><i>2007.04.23.5:01.pm</i>.&nbsp;zriver: 请问有没有方法只让留言板这一页的评论倒序，而其他文章的评论保持不变呢？</p><p><strong>1.</strong><i>2007.04.20.5:55.pm</i>.&nbsp;老杨先生: 好深奥看不懂了!通知你我可能10月27办喜酒有空没空都给我想办法回来!乖哦!</p><hr/><p style="font-size:1.5em;font-weight:bold;">推荐阅读</p><p><i>2007.04.30.8:14.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/161.html" title="Widgets是一个可视化Wordpress主题侧边栏编辑插件，用户可以在Wordpress后台主">如何修改代码使主题支持widgets (5)</a></p><p><i>2007.03.31.12:04.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/129.html" title="前阵子看Feedsky正在进行话题广告内测，于是就申请了一个。估计Feedsky进行">如何在Wordpress进行Feedsky话题广告验证 (0)</a></p><p><i>2007.03.15.11:32.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/109.html" title="每次打开Wordpress后台控制面板首页，Wordpress都会加载一些诸如外部链接，Wor">无需插件删除Wordpress后台控制面板中的外部链接 (6)</a></p><p><i>2007.03.11.1:50.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/101.html" title="因为上次搬家的时候，是直接将bokee上的文章拷贝到网址上来的，现在想在">如何在本地服务器建远程服务器上wordpress的镜像 (2)</a></p><p><i>2008.09.09.8:58.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/994.html" title="今天，Wordpress官方发布了2.6.2版。没有跑去Trac看代码变动地方，直接就将程">Wordpress Hacks:WP2.2版后中文邮件标题乱码解决方法 (22)</a></p><p><i>2008.07.27.10:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/971.html" title="WP2.6带来了很多新功能。如后台的turbo等。相比2.3到2.5，2.5到2.6之间给我的">Wordpress Hacks:如何关闭WP2.6的主题预览 (18)</a></p><p><i>2007.12.08.10:50.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/888.html" title="2007-12-09：注，我已经写了一个插件用于含有nextpage或more标签的feed全文输出">如何使用Wordpress内置的分页（Nextpage）功能？ (52)</a></p><p><i>2007.10.31.12:42.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/830.html" title="Updated:此问题已经在2.3.3中被修复。
*****************************
前几天，将Wordp">Wordpress Hacks:升级2.3.1可能出现邮件提醒失效的解决方法 (20)</a></p><hr/><p>Copyright &copy; 2012&nbsp;|&nbsp;<a href="http://www.thinkagain.cn">Think Again</a>&nbsp;|&nbsp;<a href="http://www.thinkagain.cn/archives/147.html">原文链接</a></p><img src="http://img.tongji.cn.yahoo.com/710673/ystat.gif"/>]]></content:encoded>
			<wfw:commentRss>http://www.thinkagain.cn/archives/147.html/feed</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>如何在WordPress中编辑自定义页面</title>
		<link>http://www.thinkagain.cn/archives/142.html</link>
		<comments>http://www.thinkagain.cn/archives/142.html#comments</comments>
		<pubDate>Sat, 14 Apr 2007 04:46:53 +0000</pubDate>
		<dc:creator>山之岚</dc:creator>
				<category><![CDATA[Blogger]]></category>
		<category><![CDATA[页面]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.thinkagain.cn/archives/142.html</guid>
		<description><![CDATA[在wordpress可以通过“撰写页面”来撰写新的页面，但此方法和撰写文章一样，只是将页面内容像文章一样编辑，页面的布局等仍和模板一样，无法自定义页面的布局样式。但是我们可以通过建... ]]></description>
			<content:encoded><![CDATA[<p>在wordpress可以通过“撰写页面”来撰写新的页面，但此方法和撰写文章一样，只是将页面内容像文章一样编辑，页面的布局等仍和模板一样，无法自定义页面的布局样式。但是我们可以通过建立页面模板来定义页面的内容、样式及布局，通过设定页面采用新建的页面模板来实现自定义页面。具体步骤如下，</p>
<p>用文本编辑器在<strong>模板目录</strong>下面建立一个名问abc的php文件，输入如下代码，将abc.php文件保存问utf-8格式。</p>
<p><img src="http://68.142.213.135/210/458353332_fd2e96f298_o.jpg" /></p>
<p>&lt;?php</p>
<p>/*</p>
<p>Template Name:ABC</p>
<p>*/</p>
<p>?&gt;</p>
<p>这部分代码是告诉wordpress，这是一个名为abc的页面模板。</p>
<p>然后登录到wordpress后台，点击“撰写”、“撰写页面”打开一个新的页面，输入标题名字，如ABC，无需输入内容，在页面右下角找到“页面”或“页面模板”栏目，如果你已经abc.php正确保存在模板的目录下，那么在下拉菜单里面就可以看到ABC选项了。</p>
<p><img src="http://68.142.213.135/197/458369047_1632356eed_o.jpg" /></p>
<p>选中ABC，即选中自定义的页面模板，然后点击“发表”即可。</p>
<p>这时你已新建了一个名为ABC的自定义页面，如果你在首页有设定页面导航栏的话，那么已经可以看到在导航栏里面多了ABC按钮了。</p>
<p><img src="http://68.142.213.135/181/458369155_f5b4ad46fe_o.jpg" height="132" width="420" /></p>
<p>点击ABC，打开新建的自定义页面，你可以看到，里面内容、样式、布局等均和现有模板不同，为abc.php里面的html代码内容。</p>
<p><img src="http://68.142.213.135/228/458369133_831b865c2c_o.jpg" height="81" width="420" /></p>
<p>你也可以将这个自定义页面设为博客的首页。在后台，点击“选项”，“阅读”，将首页显示设置为静态页面，然后在静态页面里面选中ABC为首页，更新选项即可。这样你打开博客时，首先显示的就是自定义页面了。</p>
<p><img src="http://68.142.213.135/188/458379801_91628f834e_o.jpg" /></p>
<hr/><p style="font-size:1.5em;font-weight:bold;"><a href="http://www.thinkagain.cn/archives/142.html#comments">评论13:</a></p><p><strong>13.</strong><i>2010.03.06.10:18.am</i>.&nbsp;<a href="http://www.liaozuhui.com/2010/03/%e5%a6%82%e4%bd%95%e5%9c%a8wordpress%e4%b8%ad%e7%bc%96%e8%be%91%e8%87%aa%e5%ae%9a%e4%b9%89%e9%a1%b5%e9%9d%a2/">如何在Wordpress中编辑自定义页面 - wordpress教程</a>: [...] ﻿ 在wordpress可以通过“撰写页面”来撰写新的页面，但此方法和撰写文章一样，只是将页面内容像文章一样编辑，页面的布局等仍和模板一样，无法自定义页面的布局样式。但是我们可以通过建立页面模板来定义页面的内容、样式及布局，通过设定页面采用新建的页面模板来实现自定义页面。具体步骤如下，  [...]</p><p><strong>12.</strong><i>2009.10.06.8:54.pm</i>.&nbsp;<a href="http://enjoytea.freetzi.com/">enjoytea</a>: 用默认的ABOUT修改就是了 何必这么麻烦啊</p><p><strong>11.</strong><i>2009.05.22.2:18.pm</i>.&nbsp;我是新手: 哈哈，谢谢啦。。。学到不少东西。。。 <img src='http://www.thinkagain.cn/wp-includes/images/smilies/icon_smile.gif' alt=':smile:' class='wp-smiley' /> </p><p><strong>10.</strong><i>2008.11.06.8:54.am</i>.&nbsp;<a href="http://sink.net.ru/">二手科学家</a>: google搜索到此，原来酱紫。学写了</p><p><strong>9.</strong><i>2008.02.22.2:44.pm</i>.&nbsp;<a href="http://www.maxbelive.com/%e5%9c%a8wordpress%e4%b8%ad%e7%bc%96%e8%be%91%e8%87%aa%e5%ae%9a%e4%b9%89%e9%a1%b5%e9%9d%a2.html">在Wordpress中编辑自定义页面</a>: [...] 在wordpress可以通过“撰写页面”来撰写新的页面，但此方法和撰写文章一样，只是将页面内容像文章一样编辑，页面的布局等仍和模板一样，无法自定 义页面的布局样式。但是我们可以通过建立页面模板来定义页面的内容、样式及布局，通过设定页面采用新建的页面模板来实现自定义页面。具体步骤如下，  [...]</p><p><strong>8.</strong><i>2007.12.28.7:36.pm</i>.&nbsp;<a href="http://la-hoo.cn/2007/12/wordpress-page-template-271.html">wordpress2.3下自定义页面</a>: [...] 具体设置可以参考以下链接：http://www.thinkagain.cn/archives/142.html#more-142 [...]</p><p><strong>7.</strong><i>2007.10.30.5:58.pm</i>.&nbsp;<a href="http://222.82.16.199/index.php/archives/138">冰山上的播客 &raquo; Blog Archive &raquo; 为WordPress 2.3建立Tag Cloud页面</a>: [...] 上面那段代码的意思为 这个模板的名字为Tag。“自定义内容”就是在这个tag.php中要达到的目的，即一段php代码。由于这是新建页面，如果要让建立以后的Tag页面有 和其它页面一样的效果，则必须调用其它页面默认的函数。以我的Tag Cloud页面为例，此处tag.php的所有代码为： &lt;?php /* Template Name: Tag */ ?&gt; &lt;?php get_header();?&gt; &lt;div id=”main”&gt; &lt;div id=”content”&gt; &lt;div id=”post-&lt;?php the_ID(); ?&gt;” class=”postentity”&gt; &lt;div class=”posthead”&gt; &lt;h3 class=”posttitle”&gt;Tag Cloud&lt;/h3&gt; &lt;/div&gt; &lt;div class=”postcontent”&gt; &lt;?php wp_tag_cloud(’number=1000′); ?&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;?php get_sidebar();?&gt; &lt;/div&gt; &lt;?php get_footer();?&gt; [...]</p><p><strong>6.</strong><i>2007.10.12.1:16.pm</i>.&nbsp;<a href="http://ecvip.org/blog/wordpress-create-new-template.html">为WordPress 2.3建立Tag Cloud页面 | 电子商务博客</a>: [...] 上面那段代码的意思为这个模板的名字为Tag。&#x201C;自定义内容&#x201D;就是在这个tag.php中要达到的目的，即一段php代码。由于这是新建页面，如果要让建立以后的Tag页面有和其它页面一样的效果，则必须调用其它页面默认的函数。以我的Tag Cloud页面为例，此处tag.php的所有代码为：  &lt;?php /* Template Name: Tag */ ?&gt; &lt;?php get_header();?&gt; &#xA0;&#xA0;&#xA0; &lt;div id=&quot;main&quot;&gt; &#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0; &lt;div id=&quot;content&quot;&gt; &#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0; &lt;div id=&quot;post-&lt;?php the_ID(); ?&gt;&quot; class=&quot;postentity&quot;&gt; &#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0; &lt;div class=&quot;posthead&quot;&gt; &#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0; &lt;h3 class=&quot;posttitle&quot;&gt;Tag Cloud&lt;/h3&gt; &#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0; &lt;/div&gt; &#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0; &lt;div class=&quot;postcontent&quot;&gt; &#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0; &lt;?php wp_tag_cloud(&#8217;number=1000&#8242;); ?&gt; &#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0; &lt;/div&gt; &#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0; &lt;/div&gt; &#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0; &lt;/div&gt; &#xA0;&#xA0;&#xA0; &lt;?php get_sidebar();?&gt; &#xA0;&#xA0;&#xA0; &lt;/div&gt; &#xA0;&#xA0;&#xA0; &lt;?php get_footer();?&gt; [...]</p><p><strong>5.</strong><i>2007.07.27.4:27.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: 请注意，只有在模板目录下存在页面模板时，才可以选择页面模板。</p><p><strong>4.</strong><i>2007.07.27.4:11.pm</i>.&nbsp;<a href="http://boyeut.com">boyeut</a>: 我在Yo2建的blog，好像不能选择页面模板，不知道为什么要限制这么功能。</p><p><strong>3.</strong><i>2007.06.09.5:15.pm</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: 我是从wp2.0一路升级过来的。还没碰到您所提到的问题，请注意，只有在模板目录下存在页面模板时，才可以选择页面模板。</p><p><strong>2.</strong><i>2007.06.09.4:53.pm</i>.&nbsp;xiao: 升级wp到2.1，发现新建页面的时候，竟然没有选择页面模板的选项？</p><p><strong>1.</strong><i>2007.05.20.9:30.pm</i>.&nbsp;<a href="http://cfi.kilu.net/">阿C</a>: 嗯哦，受教了！学到了不少！</p><hr/><p style="font-size:1.5em;font-weight:bold;">推荐阅读</p><p><i>2008.09.09.8:58.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/994.html" title="今天，Wordpress官方发布了2.6.2版。没有跑去Trac看代码变动地方，直接就将程">Wordpress Hacks:WP2.2版后中文邮件标题乱码解决方法 (22)</a></p><p><i>2008.07.27.10:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/971.html" title="WP2.6带来了很多新功能。如后台的turbo等。相比2.3到2.5，2.5到2.6之间给我的">Wordpress Hacks:如何关闭WP2.6的主题预览 (18)</a></p><p><i>2007.12.08.10:50.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/888.html" title="2007-12-09：注，我已经写了一个插件用于含有nextpage或more标签的feed全文输出">如何使用Wordpress内置的分页（Nextpage）功能？ (52)</a></p><p><i>2007.10.31.12:42.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/830.html" title="Updated:此问题已经在2.3.3中被修复。
*****************************
前几天，将Wordp">Wordpress Hacks:升级2.3.1可能出现邮件提醒失效的解决方法 (20)</a></p><p><i>2007.10.22.11:05.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/822.html" title="在wordpress中，默认点击评论者的链接时，会在同一窗口内打开该链接。这在">Wordpress Hacks: 在新窗口中打开评论者链接和no follow属性 (16)</a></p><p><i>2007.09.15.10:41.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/721.html" title="继将CSS修改符合W3C规范后，今天花了点时间，也将模板代码修改完毕，通过">继续修改模板 (4)</a></p><p><i>2007.08.21.8:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/611.html" title="又是一时心血来潮，试用过Wordpress后，想装上Movable Type 4.0玩玩看。于是就">图文介绍如何在本地服务器安装Movable Type 4.0 (15)</a></p><p><i>2007.06.11.3:55.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/189.html" title="由于博客上的图片大部分都是放在Flickr上的，所以Flickr被禁后导致国内朋友">WordPress解决Flickr图片显示方法 (3)</a></p><hr/><p>Copyright &copy; 2012&nbsp;|&nbsp;<a href="http://www.thinkagain.cn">Think Again</a>&nbsp;|&nbsp;<a href="http://www.thinkagain.cn/archives/142.html">原文链接</a></p><img src="http://img.tongji.cn.yahoo.com/710673/ystat.gif"/>]]></content:encoded>
			<wfw:commentRss>http://www.thinkagain.cn/archives/142.html/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>如何使WordPress不再屏蔽embed</title>
		<link>http://www.thinkagain.cn/archives/133.html</link>
		<comments>http://www.thinkagain.cn/archives/133.html#comments</comments>
		<pubDate>Sat, 07 Apr 2007 06:36:30 +0000</pubDate>
		<dc:creator>山之岚</dc:creator>
				<category><![CDATA[Blogger]]></category>
		<category><![CDATA[embed]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.thinkagain.cn/archives/133.html</guid>
		<description><![CDATA[因为wordpress会自动屏蔽embed，将embed转换为ibed，所以就无法在撰写文章时用embed标签插入如youtube的视频，flash，mp3等多媒体文件。当然采用插件自然可以解决这个问题，如国产的coolplay9插件可以... ]]></description>
			<content:encoded><![CDATA[<p>因为wordpress会自动屏蔽embed，将embed转换为ibed，所以就无法在撰写文章时用embed标签插入如youtube的视频，flash，mp3等多媒体文件。当然采用插件自然可以解决这个问题，如国产的coolplay9插件可以在文章中插入flv，mp3，rm等多达几十种的多媒体格式文件。其实不用插件也可以简单实现不让wordpress屏蔽embed标签。wordpress采用tinymce作为可视化编辑器的，也正是tinymce自动将embed转换成ibed的，所以解决方法也很简单，就是从tinymce上入手：</p>
<p>方法一，将编辑时的可视化编辑器关闭，这是最简单的方法，但是关闭可视化编辑器，在撰写文章时，难免觉得不方便。</p>
<p>方法二，修改代码，将tinymce中转换embed的那部分代码屏蔽掉就可以了。</p>
<p>step1，进入wordpress的安装目录，进入\wp-includes\js\tinymce文件夹， 找到tiny_mce.js文件，用文本编译器打开，</p>
<p>step2，查找如下代码：</p>
<p>// Convert all strong/em to b/i in Gecko</p>
<p>if (tinyMCE.isGecko) {</p>
<p>h = h.replace(/&lt;strong/gi, &#8216;&lt;b&#8217;);</p>
<p>h = h.replace(/&lt;em(\/?)/gi, &#8216;&lt;i&#8217;);</p>
<p>h = h.replace(/&lt;em /gi, &#8216;&lt;i&#8217;);</p>
<p>h = h.replace(/&lt;\/strong&gt;/gi, &#8216;&lt;/b&gt;&#8217;);</p>
<p>h = h.replace(/&lt;\/em&gt;/gi, &#8216;&lt;/i&gt;&#8217;);</p>
<p>}</p>
<p>然后，在</p>
<p>h = h.replace(/&lt;em(\/?)/gi, &#8216;&lt;i&#8217;);</p>
<p>h = h.replace(/&lt;em /gi, &#8216;&lt;i&#8217;);</p>
<p>h = h.replace(/&lt;\/em&gt;/gi, &#8216;&lt;/i&gt;&#8217;);</p>
<p>这3行代码前分别加入注释代码“//”，</p>
<p>// h = h.replace(/&lt;em(\/?)/gi, &#8216;&lt;i&#8217;);</p>
<p>// h = h.replace(/&lt;em /gi, &#8216;&lt;i&#8217;);</p>
<p>// h = h.replace(/&lt;\/em&gt;/gi, &#8216;&lt;/i&gt;&#8217;);</p>
<p>保存退出。<strong>记住要清空下浏览器缓存。</strong></p>
<p>就是这么简单。增加注释代码后，tinymce再不会自动将embed转换为ibed了。在编辑文章的时候，只需切换到html编辑模式，然后就可以直接插入多媒体代码了。</p>
<hr/><p style="font-size:1.5em;font-weight:bold;"><a href="http://www.thinkagain.cn/archives/133.html#comments">评论12:</a></p><p><strong>12.</strong><i>2010.02.08.3:55.am</i>.&nbsp;Firm: 俺拿去试试看，还有俺网址在你这边好像被屏蔽了，都输不了</p><p><strong>11.</strong><i>2009.04.01.4:03.pm</i>.&nbsp;<a href="http://www.cnpens.com">Waterman pens</a>: 
  
    
  
  
    Woww, Thank you brother . Very good theme .
  
</p><p><strong>10.</strong><i>2008.12.07.2:22.am</i>.&nbsp;<a href="http://blog.neau.cn/wordpress/2008/12/07/%e5%a6%82%e4%bd%95%e4%bd%bfwordpress%e4%b8%8d%e5%86%8d%e5%b1%8f%e8%94%bdembed/">Myth&#8217;s BLOG &raquo; 如何使Wordpress不再屏蔽embed</a>: [...] 因为wordpress会自动屏蔽embed，将embed转换为ibed，所以就无法在撰写文章时用embed标签插入如youtube的视频，flash，mp3等多媒体文件。当然采用插件自然可以解决这个问题，如国产的coolplay9插件可以在文章中插入flv，mp3，rm等多达几十种的多媒体格式文件。其实不用插件也可以简单实现不让wordpress屏蔽embed标签。wordpress采用tinymce作为可视化编辑器的，也正是tinymce自动将embed转换成ibed的，所以解决方法也很简单，就是从tinymce上入手：  [...]</p><p><strong>9.</strong><i>2007.11.12.10:42.am</i>.&nbsp;<a href="http://semor.awardspace.com">semor</a>: It does work，thank you again</p><p><strong>8.</strong><i>2007.11.12.10:25.am</i>.&nbsp;<a href="http://semor.awardspace.com">semor</a>: 不错，而且应该管用，正在测试，谢谢！</p><p><strong>7.</strong><i>2007.08.22.4:08.am</i>.&nbsp;<a href="http://mul1.suwanneevalley4cs.org">Jenniffer</a>: <strong>Jenniffer...</strong>

I Love this page design, makes reading the articles a real pleasure....</p><p><strong>6.</strong><i>2007.06.10.1:14.pm</i>.&nbsp;<a href="http://www.5dtupian.com/xgmv/">性感美女</a>: 这个方法不错,一定要学会 !!!!!!!</p><p><strong>5.</strong><i>2007.05.25.3:37.pm</i>.&nbsp;<a href="http://bbs.gospelst.com/boke.asp?anna1981.showtopic.23.html">julia</a>: 说得很有道理，支持！</p><p><strong>4.</strong><i>2007.05.11.3:30.pm</i>.&nbsp;<a href="http://www.akay.cn">Akay</a>: 非常感谢！很实用

对PHP不熟悉，想问一下“//”与 “h”之间是否需要空格？</p><p><strong>3.</strong><i>2007.04.28.9:15.am</i>.&nbsp;<a href="http://www.thinkagain.cn">山之岚</a>: 应该不会吧，你是用什么版本的wordpress？这个方法我在2.1和2.1.3上都可以通过的。你可以查看下html代码，看是否存在embed标签。</p><p><strong>2.</strong><i>2007.04.28.3:01.am</i>.&nbsp;walkingcat: 试了一下方法2，不管用，被迫关闭了可视化编辑。</p><p><strong>1.</strong><i>2007.04.17.9:59.am</i>.&nbsp;<a href="http://jincute.512j.com/wordpress/?p=267">Life Attitude &raquo; 转：如何使Wordpress不再屏蔽embed</a>: [...] 就是这么简单。增加注释代码后，tinymce再不会自动将embed转换为ibed了。在编辑文章的时候，只需切换到html编辑模式，然后就可以直接插入多媒体代码了。 本文引用地址:http://www.thinkagain.cn/archives/133.html/trackback/ [...]</p><hr/><p style="font-size:1.5em;font-weight:bold;">推荐阅读</p><p><i>2008.09.09.8:58.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/994.html" title="今天，Wordpress官方发布了2.6.2版。没有跑去Trac看代码变动地方，直接就将程">Wordpress Hacks:WP2.2版后中文邮件标题乱码解决方法 (22)</a></p><p><i>2008.07.27.10:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/971.html" title="WP2.6带来了很多新功能。如后台的turbo等。相比2.3到2.5，2.5到2.6之间给我的">Wordpress Hacks:如何关闭WP2.6的主题预览 (18)</a></p><p><i>2007.12.08.10:50.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/888.html" title="2007-12-09：注，我已经写了一个插件用于含有nextpage或more标签的feed全文输出">如何使用Wordpress内置的分页（Nextpage）功能？ (52)</a></p><p><i>2007.10.31.12:42.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/830.html" title="Updated:此问题已经在2.3.3中被修复。
*****************************
前几天，将Wordp">Wordpress Hacks:升级2.3.1可能出现邮件提醒失效的解决方法 (20)</a></p><p><i>2007.10.22.11:05.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/822.html" title="在wordpress中，默认点击评论者的链接时，会在同一窗口内打开该链接。这在">Wordpress Hacks: 在新窗口中打开评论者链接和no follow属性 (16)</a></p><p><i>2007.09.15.10:41.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/721.html" title="继将CSS修改符合W3C规范后，今天花了点时间，也将模板代码修改完毕，通过">继续修改模板 (4)</a></p><p><i>2007.08.21.8:44.am</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/611.html" title="又是一时心血来潮，试用过Wordpress后，想装上Movable Type 4.0玩玩看。于是就">图文介绍如何在本地服务器安装Movable Type 4.0 (15)</a></p><p><i>2007.06.11.3:55.pm</i>.&nbsp;<a href="http://www.thinkagain.cn/archives/189.html" title="由于博客上的图片大部分都是放在Flickr上的，所以Flickr被禁后导致国内朋友">WordPress解决Flickr图片显示方法 (3)</a></p><hr/><p>Copyright &copy; 2012&nbsp;|&nbsp;<a href="http://www.thinkagain.cn">Think Again</a>&nbsp;|&nbsp;<a href="http://www.thinkagain.cn/archives/133.html">原文链接</a></p><img src="http://img.tongji.cn.yahoo.com/710673/ystat.gif"/>]]></content:encoded>
			<wfw:commentRss>http://www.thinkagain.cn/archives/133.html/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

