<?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>三水清wordpress</title>
	<atom:link href="http://js8.in/tag/wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://js8.in</link>
	<description>专注前端开发,分享Javascript/CSS/PHP等Web前端开发技巧</description>
	<lastBuildDate>Wed, 08 Feb 2012 11:59:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>利用google博客的ping服务接口API加快网站收录</title>
		<link>http://js8.in/644.html</link>
		<comments>http://js8.in/644.html#comments</comments>
		<pubDate>Sat, 18 Dec 2010 02:38:02 +0000</pubDate>
		<dc:creator>三水清</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[网络技术]]></category>
		<category><![CDATA[API接口]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[RPC]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.js8.in/?p=644</guid>
		<description><![CDATA[谷歌博客推出了ping服务已经很长时间了，如果我们的博客是wordpress可以很方便的设置ping服务，但是如果我们的博客不是wordpress，或者我们的网站程序是自己手写的，那么就要自己写RPC代码了。今天断桥残雪分享一下自己写的PHP的XML-RPC代码。在此之前先说说ping服务的好处以及wordpress的ping设置。<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">猜你喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="php、js两种不同方式根据关键词返回经纬度接口【基于Google map API】" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F342.html&from=http%3A%2F%2Fjs8.in%2F644.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10977810.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">php、js两种不同方式根据关键词返回经纬度接口【基于Google map API】</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="jQuery+google weather API轻松实现天气地图（一）" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F278.html&from=http%3A%2F%2Fjs8.in%2F644.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10979364.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">jQuery+google weather API轻松实现天气地图（一）</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="利用百度ping服务API加快文章收录，秒收不是梦" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F645.html&from=http%3A%2F%2Fjs8.in%2F644.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10979121.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">利用百度ping服务API加快文章收录，秒收不是梦</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="新浪微博jsSDK操作指南" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F700.html&from=http%3A%2F%2Fjs8.in%2F644.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/15/31207374.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">新浪微博jsSDK操作指南</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>谷歌博客推出了<strong>ping</strong>服务已经很长时间了，如果我们的博客是wordpress可以很方便的设置ping服务，但是如果我们的博客不是wordpress，或者我们的网站程序是自己手写的，那么就要自己写<strong>RPC</strong>代码了。今天断桥残雪分享一下自己写的PHP的XML-RPC代码。在此之前先说说ping服务的好处以及wordpress的ping设置。</p>
<h3>配置ping服务，加快收录速度</h3>
<p>谷歌的ping服务是一种快速收录的方法，打个比方就是：我们写了一篇文章想要谷歌收录，我们就可以使用ping服务来通知下谷歌，要googlebot尽快来抓取收录。谷歌官方的解释：</p>
<blockquote><p>通过 Google“博客搜索”Ping API, 用户可以程序化的方式将博客内容的更新通知给 Google“博客搜索”引擎。这对于经常更新博客内容的用户尤其有用。博客服务提供商的管理人员也可以利用此API将其平台上的博客内容变化向 Google 通告，以便 Google“博客搜索”及时抓取来自这一服务提供商的最新内容。为设置对 Google“博客搜索”的自动 Ping 机制，请按照如下所述设置<strong>XML-RPC</strong>客户端或REST客户端以发送请求。您可以任选一种方法进行通知；两者都将按照相同的方式进行处理。</p></blockquote>
<h3>wordpress设置ping的方法</h3>
<p>wordpress自身就带着ping服务，只要我们配置一下就可以了，步骤是：设置→撰写→更新服务。常用的ping服务有以下几个：</p>
<blockquote><p>http://rpc.pingomatic.com/<br />
http://ping.baidu.com/ping/RPC2(百度的)<br />
http://blogsearch.google.com/ping/RPC2(谷歌的)<br />
http://api.my.yahoo.com/RPC2(雅虎的)<br />
http://api.my.yahoo.com/rss/ping(雅虎的)<br />
http://www.feedsky.com/api/RPC2(feedsky的)</p></blockquote>
<h3>谷歌ping服务的PHP代码</h3>
<p>关于RPC的详细介绍可以移步<a target="_blank" href="http://www.google.com/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CBwQFjAA&amp;url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FRemote_procedure_call&amp;ei=KRkMTdv4DdCOcY-t0cEK&amp;usg=AFQjCNFk4Xj6zVRWzO_H81TzbHeO9cBhjw&amp;sig2=_CO0Vdcrd56r46zJM3oyJw" target="_blank">维基百科</a>，谷歌ping服务的标准：</p>
<p><span>RPC端点：<span> </span>http://blogsearch.google.com/ping/RPC2<span> </span><br />
调用方法名：<span> </span>weblogUpdates.extendedPing<span> </span><br />
参数：<span> </span>(应按照如下所列的相同顺序传送)</span></p>
<ul><span></p>
<li>站点名</li>
<li>站点URL</li>
<li>需要检查更新的页面URL</li>
<li>相应的RSS、RDF或Atom种子的URL</li>
<li>可选：页面内容的分类名称(或标签)。您可以指定多个值，之间用&#8217;|'字符进行分隔。</li>
<p></span></ul>
<p><span id="more-644"></span><br />
首先要写一个CURL的函数，来POST谷歌的RPC端点：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> postUrl<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span> <span style="color: #000088;">$postvar</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$ch</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$headers</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
            <span style="color: #0000ff;">&quot;POST &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$url</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; HTTP/1.0&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Content-type: text/xml;charset=<span style="color: #000099; font-weight: bold;">\&quot;</span>utf-8<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Accept: text/xml&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Content-length: &quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$postvar</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_URL<span style="color: #339933;">,</span> <span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_RETURNTRANSFER<span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_POST<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_HTTPHEADER<span style="color: #339933;">,</span> <span style="color: #000088;">$headers</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_POSTFIELDS<span style="color: #339933;">,</span> <span style="color: #000088;">$postvar</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$res</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_exec</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_close</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$res</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>上面的代码不多做解释，关于PHP的详细curl功能，请参考《<a href="http://js8.in/379.html" target="_blank" title="cURL常用的几个PHP函数">cURL常用的几个PHP函数</a>》。</p>
<p>主要的curl写好了之后，剩下就是要根据谷歌的XML-RPC标准组装发送的数据了，详细的请求例子可以<a target="_blank" href="http://www.google.com/intl/zh-CN/help/blogsearch/pinging_API.html">点这里</a>。</p>
<p>例如我的代码是这样写的：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">$googleXML = &lt;&lt;&lt;END
<span style="color: #000000; font-weight: bold;">&lt;?</span>xml version<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;1.0&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;methodCall&gt;
  &lt;methodName&gt;weblogUpdates.extendedPing&lt;/methodName&gt;
  &lt;params&gt;
    &lt;param&gt;
      &lt;value&gt;断桥残雪部落格&lt;/value&gt;
    &lt;/param&gt;
    &lt;param&gt;
      &lt;value&gt;http://js8.in&lt;/value&gt;
    &lt;/param&gt;
    &lt;param&gt;
      &lt;value&gt;http://js8.in/379.html&lt;/value&gt;
    &lt;/param&gt;
    &lt;param&gt;
      &lt;value&gt;http://js8.in/rss.xml&lt;/value&gt;
    &lt;/param&gt;
  &lt;/params&gt;
&lt;/methodCall&gt;
END;
$res = postUrl('http://blogsearch.google.com/ping/RPC2', $googleXML);
//下面是返回成功与否的判断（根据谷歌ping的接口说明）
if (strpos($res, &quot;&lt;boolean&gt;0&lt;/boolean&gt;&quot;))
        echo &quot;PING成功&quot;;
    else
        echo &quot;PING失败&quot;;</pre></div></div>

<p>百度的ping服务xml代码是跟谷歌不同的，百度总是会有自己的特点，哎，情何以堪啊。下一次写一下百度的博客ping服务&#8211;《<a href="http://js8.in/645.html" title="百度ping服务API">利用百度ping服务API加快文章收录，秒收不是梦</a>》
<div class="copyright">
<strong>声明：</strong>文章未声明为原创文章，本文链接 <a href="http://js8.in/644.html" title="利用google博客的ping服务接口API加快网站收录">http://js8.in/644.html</a>. 转载请注明转自<a href="http://js8.in" title="前端开发博客"> JS8.IN ™</a></span></span></div>
<h3 class="box-title">随机文章</h3>
<ul class="box_random">
<li><a href="http://js8.in/552.html" title="2010年世界杯比赛时间表-北京时间" rel="bookmark inlinks">2010年世界杯比赛时间表-北京时间</a></li>
<li><a href="http://js8.in/271.html" title="重装系统啦~看看桌面截图吧~" rel="bookmark inlinks">重装系统啦~看看桌面截图吧~</a></li>
<li><a href="http://js8.in/378.html" title="樱花草，假如爱有天意" rel="bookmark inlinks">樱花草，假如爱有天意</a></li>
<li><a href="http://js8.in/758.html" title="使用cygwin在windows下安装nodeJS" rel="bookmark inlinks">使用cygwin在windows下安装nodeJS</a></li>
<li><a href="http://js8.in/626.html" title="爆料：其实淘宝团购的聚划算每天有18款" rel="bookmark inlinks">爆料：其实淘宝团购的聚划算每天有18款</a></li>
<li><a href="http://js8.in/647.html" title="前端必须掌握30个CSS3选择器" rel="bookmark inlinks">前端必须掌握30个CSS3选择器</a></li>
<li><a href="http://js8.in/414.html" title="js判断浏览器的函数，可区分chrome，safari" rel="bookmark inlinks">js判断浏览器的函数，可区分chrome，safari</a></li>
<li><a href="http://js8.in/31.html" title="08.11.15" rel="bookmark inlinks">08.11.15</a></li>
</ul>
<hr />
<p><small>© 三水清 for <a href="http://js8.in">三水清</a>, 2010. |
<a href="http://js8.in/644.html#comments">8 comments</a> |在微博关注我：<a href="//weibo.com/sanshuiqing" target="_blank" title="关注断桥残雪的新浪微博">@清-三水清</a>
<br/>收藏到：
<a rel="nofollow" href="http://share.renren.com/share/buttonshare.do?link=%posturl%&title=%posttitle%" title="收藏本文到人人网" target="_blank">人人网</a> | <a rel="nofollow" href="http://www.douban.com/recommend/?url=%posturl%&title=%posttitle%" title="收藏本文到豆瓣" target="_blank">豆瓣</a> | <a rel="nofollow" href="http://www.kaixin001.com/repaste/share.php?rtitle=%posttitle%&rurl=%posturl%" title="收藏本文到开心网" target="_blank">开心网</a> | <a rel="nofollow" href="http://shuqian.qq.com/post?title=%posttitle%&%20uri=%posturl%" title="收藏本文到QQ书签" target="_blank">QQ书签</a> | <a rel="nofollow" href="http://v.t.sina.com.cn/share/share.php?url=%posturl%&title=%posttitle%" title="收藏本文到新浪微博" target="_blank">新浪微博</a> | <a rel="nofollow" href="http://v.t.qq.com/share/share.php?title=%posttitle%&url=%posturl%&site=http://www.kaixin100.info" title="收藏本文到腾讯微博" target="_blank">腾讯微博</a>
<br/>
Post tags: <a href="http://js8.in/tag/api%e6%8e%a5%e5%8f%a3" rel="tag">API接口</a>, <a href="http://js8.in/tag/google" rel="tag">google</a>, <a href="http://js8.in/tag/rpc" rel="tag">RPC</a>, <a href="http://js8.in/tag/wordpress" rel="tag">wordpress</a><br/>
</small></p><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">猜你喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="php、js两种不同方式根据关键词返回经纬度接口【基于Google map API】" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F342.html&from=http%3A%2F%2Fjs8.in%2F644.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10977810.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">php、js两种不同方式根据关键词返回经纬度接口【基于Google map API】</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="jQuery+google weather API轻松实现天气地图（一）" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F278.html&from=http%3A%2F%2Fjs8.in%2F644.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10979364.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">jQuery+google weather API轻松实现天气地图（一）</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="利用百度ping服务API加快文章收录，秒收不是梦" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F645.html&from=http%3A%2F%2Fjs8.in%2F644.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10979121.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">利用百度ping服务API加快文章收录，秒收不是梦</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="新浪微博jsSDK操作指南" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F700.html&from=http%3A%2F%2Fjs8.in%2F644.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/15/31207374.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">新浪微博jsSDK操作指南</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://js8.in/644.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>WordPress博客的 SEO 技巧</title>
		<link>http://js8.in/496.html</link>
		<comments>http://js8.in/496.html#comments</comments>
		<pubDate>Mon, 01 Mar 2010 00:38:57 +0000</pubDate>
		<dc:creator>三水清</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.js8.in/496.html</guid>
		<description><![CDATA[搜索引擎会带来很多有价值的来源, 所以花点时间针对搜索引擎优化一下WordPress 博客也是值得的.页面的标题不要包含博客名称。优化博客副标题Keywords ，Description<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">猜你喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="三个使用WordPress自定义域做的小工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F436.html&from=http%3A%2F%2Fjs8.in%2F496.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10979536.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">三个使用WordPress自定义域做的小工具</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="七大让WordPress后台管理界面更漂亮的WP插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F465.html&from=http%3A%2F%2Fjs8.in%2F496.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/07/09/16776541.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">七大让WordPress后台管理界面更漂亮的WP插件</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress插件开发之Widget侧边栏挂件插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F404.html&from=http%3A%2F%2Fjs8.in%2F496.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/11009724.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress插件开发之Widget侧边栏挂件插件</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="六个精美的WordPress圣诞插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F385.html&from=http%3A%2F%2Fjs8.in%2F496.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/18/11027118.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">六个精美的WordPress圣诞插件</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>随着搜索引擎大兴, 排列在前的网站在引入大量流量. 无论是搜索页面的广告还是查出来的结果, 与搜索者的目标匹配度都比较高 (如果搜索引擎足够智能), 所以通过搜索引擎而来的访客很可能会从网站上得到他想要的东西, 并记住这个网站. 也就是说, 搜索引擎会带来很多有价值的来源, 所以花点时间针对搜索引擎优化一下 <strong>WordPress </strong>博客也是值得的.</p>
<p>我一直没有花太多时间做<strong>搜索引擎优化,</strong> 否则也不会把博客首页做成展开式的显示, 所以一直搜索引擎<strong>收录</strong>不是很好. 前段时间, 我终于为博客搞了一下 SEO, 比之前有所改善, 下面我就分享一下我都做了些什么.</p>
<p>我并不是什么 <strong>SEO </strong>高手, 但整天泡在网页里面, 或多或少知道一点, 折腾一下算是自我陶醉, 高人请绕道前行.</p>
<p><strong>1. 优化博客副标题</strong><br />
副标题 (slogan), WordPress 中称为 tagline. 它与博客标题不一样, 可能会承载一些描述博客的文字. 如我的 tagline 是 &#8220;mg12&#8217;s Blog &#8211; Just Another WordPress Blog&#8221;, 其中的 WordPress Blog 被我设置为 h1. 因为我想告诉爬虫, 这是一个关于 WordPress 的博客.</p>
<p><strong>2. 页面的标题不要包含博客名称</strong><br />
<strong>WordPress </strong>标题一般会用到 bloginfo(&#8217;name&#8217;) 和 wp_title() 两部分, 前者是博客名称, 后者是文章标题 (如果标题不存在则不显示). 经典主题和默认主题输出标题用的代码如下.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;title&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_title<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&amp;laquo;'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'right'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/title&gt;</pre></div></div>

<p>输出的标题结构是 &#8220;文章标题 « 博客名称&#8221;.</p>
<p>除非你的标题和文章内容相关度比较高, 否则这样的标题对 SEO 显然是不好的. 标题是爬虫认为重要的内容之一, 如果标题中包含了与文章内容无关的信息, 多少会对该页面有所影响.</p>
<p>那应该怎么弄呢? 一些包含大量内容的, 或者属于某一类的页面, 只显示标题. 其他的页面只显示博客名称. 我的实现代码如下.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;title&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_category<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_tag<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> wp_title<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/title&gt;</pre></div></div>

<p><span id="more-496"></span><br />
<strong>3. Keywords &amp; Description</strong><br />
Keywords 为搜索引擎提供网页包含的核心内容, Description 则为搜索引擎提供网页的描述信息. 我发布的主题曾经包括了对 keywords 和 description 的处理, 但因为这与一些 SEO 插件发生冲突, 在较新的版本中已经去除. 笔者认为 WordPress 的很多所谓 SEO 插件做得并不到位, 对中文博客支持都很差, 自己修改一下效果可能更好.</p>
<p>以下是我的处理规则.</p>
<table style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #ffffff; border-collapse: collapse; margin-top: 5px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; background-position: initial initial; background-repeat: initial initial; border: 2px solid #cccccc;" border="0">
<thead>
<tr>
<th style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #edeff0; background-position: initial initial; background-repeat: initial initial; border: 1px solid #cccccc;">页面类型</th>
<th style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #edeff0; background-position: initial initial; background-repeat: initial initial; border: 1px solid #cccccc;">Keywords</th>
<th style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #edeff0; background-position: initial initial; background-repeat: initial initial; border: 1px solid #cccccc;">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; border: 1px solid #cccccc;">首页</td>
<td style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; border: 1px solid #cccccc;">自定义 keywords</td>
<td style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; border: 1px solid #cccccc;">自定义 description</td>
</tr>
<tr>
<td style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f7f7f7; background-position: initial initial; background-repeat: initial initial; border: 1px solid #cccccc;">文章页面</td>
<td style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f7f7f7; background-position: initial initial; background-repeat: initial initial; border: 1px solid #cccccc;">标签组合</td>
<td style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f7f7f7; background-position: initial initial; background-repeat: initial initial; border: 1px solid #cccccc;">摘要或者文章前 220 个字符<br />
(截取文章需要特殊处理全角字符)</td>
</tr>
<tr>
<td style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; border: 1px solid #cccccc;">搜索页面</td>
<td style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; border: 1px solid #cccccc;">-</td>
<td style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; border: 1px solid #cccccc;">搜索关键字</td>
</tr>
<tr>
<td style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f7f7f7; background-position: initial initial; background-repeat: initial initial; border: 1px solid #cccccc;">分类存档页面</td>
<td style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f7f7f7; background-position: initial initial; background-repeat: initial initial; border: 1px solid #cccccc;">-</td>
<td style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f7f7f7; background-position: initial initial; background-repeat: initial initial; border: 1px solid #cccccc;">分类</td>
</tr>
<tr>
<td style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; border: 1px solid #cccccc;">标签存档页面</td>
<td style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; border: 1px solid #cccccc;">-</td>
<td style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; border: 1px solid #cccccc;">标签</td>
</tr>
<tr>
<td style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f7f7f7; background-position: initial initial; background-repeat: initial initial; border: 1px solid #cccccc;">日期存档页面</td>
<td style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f7f7f7; background-position: initial initial; background-repeat: initial initial; border: 1px solid #cccccc;">-</td>
<td style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f7f7f7; background-position: initial initial; background-repeat: initial initial; border: 1px solid #cccccc;">日期</td>
</tr>
<tr>
<td style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; border: 1px solid #cccccc;">其他页面</td>
<td style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; border: 1px solid #cccccc;">-</td>
<td style="text-align: left; vertical-align: top; padding-top: 3px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; border: 1px solid #cccccc;">页面标题</td>
</tr>
</tbody>
</table>
<p><strong>4. h1, h2, h3, strong 标签的使用</strong><br />
一般将 h1 给予文章标题或者与网站相关性高的推广性内容, 而不是博客标题. h2 是跟文章有关的描述式信息, 如分类和标签. h3 是其他类似内容, 如相关文章. strong 给文章内的关键字.</p>
<p><strong>5. 将 Related Post 改为 More posts about XXX</strong><br />
其中 XXX 是关键字及其链接, 本人建议使用分类或者标签链接代替. 因为 Related 一词与几个文章的链接没有任何关系, 但标签与之相关度很高. (一般相关文章是通过相似标签来确定的.)</p>
<p><strong>6. 与文章无关内容后移</strong><br />
有人认为爬虫只会分析页面的前 N 个字节的内容, 未必如此, 但前面内容的权重相对会比较高. 为了爬虫有效的收录, 应该尽量将无关内容后移. 如 JavaScript 等可以用 DOM ready 来实现. 另外, 如搜索栏, 订阅按钮等可以放到页脚, 再通过 CSS 或者 JavaScript 重新定位.</p>
<p><strong>7. 消灭内嵌 CSS 和内嵌 JavaScript</strong><br />
内嵌的 CSS 和 JavaScript 可能带有一些关键字和链接, 影响爬虫收录. 尽量将这些写在外部文件中.</p>
<p><strong>8. 如果评论分页, 避免出现重复内容的文章</strong><br />
我已经在 《<a target="_blank" href="http://www.neoease.com/paged-comments-seo/" rel="nofollow" target="_blank">对评论分页的 SEO</a>》 一文写过处理办法.</p>
<p><strong>9. 为 Read more 加上 nofollow</strong><br />
因为 Read more 链接的路径实际和文章标题相同, 没必要再多加一个文本与页面内容无关的链接. 再者, &#8220;Read more&#8230;&#8221; 在网站出现 N 多次, 可能会干扰爬虫.</p>
<p><strong>10. 不要把首页做成欢迎页面, 尽量显示文章内容</strong><br />
很多朋友喜欢把博客首页做成欢迎页面, 但因为大量链接链向首页, 它是最重要的页面, 应该尽量放置与博客相关的内容.</p>
<p>还有人喜欢用标题列表的作为首页的主要内容, 但经过我长期的实验这明显不如包含部分文章内容的文章列表. 作为折中处理, 现在我的博客会显示前几个文章的内容, 其他折叠 (折叠可以加快网页加载速度).</p>
<p>以上几点仅为个人意见, 具体效果可以参考本博客, 如发现问题或有好的建议请务必提出.<br />
另外, 我没有提供具体的代码, 只是说了自己的想法或者做法. 如果你对其中某项有兴趣, 请在留言说明, 需求大的我会另起文章具体说明.
<div class="copyright">
<strong>声明：</strong>文章未声明为原创文章，本文链接 <a href="http://js8.in/496.html" title="WordPress博客的 SEO 技巧">http://js8.in/496.html</a>. 转载请注明转自<a href="http://js8.in" title="前端开发博客"> JS8.IN ™</a></span></span></div>
<h3 class="box-title">随机文章</h3>
<ul class="box_random">
<li><a href="http://js8.in/752.html" title="使用html5 postMessage和window.name实现多浏览器跨域" rel="bookmark inlinks">使用html5 postMessage和window.name实现多浏览器跨域</a></li>
<li><a href="http://js8.in/490.html" title="使用CSS设置文字反选的背景颜色" rel="bookmark inlinks">使用CSS设置文字反选的背景颜色</a></li>
<li><a href="http://js8.in/7.html" title="Cause I Believe" rel="bookmark inlinks">Cause I Believe</a></li>
<li><a href="http://js8.in/338.html" title="最新的DreamHost优惠码免费发放" rel="bookmark inlinks">最新的DreamHost优惠码免费发放</a></li>
<li><a href="http://js8.in/506.html" title="最新版wBox 解决IE6 背景太小bug" rel="bookmark inlinks">最新版wBox 解决IE6 背景太小bug</a></li>
<li><a href="http://js8.in/574.html" title="只要20元，你也可以做个QQ爱墙" rel="bookmark inlinks">只要20元，你也可以做个QQ爱墙</a></li>
<li><a href="http://js8.in/537.html" title="承接企业网站建设，企业建站工作" rel="bookmark inlinks">承接企业网站建设，企业建站工作</a></li>
<li><a href="http://js8.in/632.html" title="网易推出LBS产品网易八方" rel="bookmark inlinks">网易推出LBS产品网易八方</a></li>
</ul>
<hr />
<p><small>© 三水清 for <a href="http://js8.in">三水清</a>, 2010. |
<a href="http://js8.in/496.html#comments">One comment</a> |在微博关注我：<a href="//weibo.com/sanshuiqing" target="_blank" title="关注断桥残雪的新浪微博">@清-三水清</a>
<br/>收藏到：
<a rel="nofollow" href="http://share.renren.com/share/buttonshare.do?link=%posturl%&title=%posttitle%" title="收藏本文到人人网" target="_blank">人人网</a> | <a rel="nofollow" href="http://www.douban.com/recommend/?url=%posturl%&title=%posttitle%" title="收藏本文到豆瓣" target="_blank">豆瓣</a> | <a rel="nofollow" href="http://www.kaixin001.com/repaste/share.php?rtitle=%posttitle%&rurl=%posturl%" title="收藏本文到开心网" target="_blank">开心网</a> | <a rel="nofollow" href="http://shuqian.qq.com/post?title=%posttitle%&%20uri=%posturl%" title="收藏本文到QQ书签" target="_blank">QQ书签</a> | <a rel="nofollow" href="http://v.t.sina.com.cn/share/share.php?url=%posturl%&title=%posttitle%" title="收藏本文到新浪微博" target="_blank">新浪微博</a> | <a rel="nofollow" href="http://v.t.qq.com/share/share.php?title=%posttitle%&url=%posturl%&site=http://www.kaixin100.info" title="收藏本文到腾讯微博" target="_blank">腾讯微博</a>
<br/>
Post tags: <a href="http://js8.in/tag/seo" rel="tag">seo</a>, <a href="http://js8.in/tag/wordpress" rel="tag">wordpress</a><br/>
</small></p><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">猜你喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="三个使用WordPress自定义域做的小工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F436.html&from=http%3A%2F%2Fjs8.in%2F496.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10979536.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">三个使用WordPress自定义域做的小工具</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="七大让WordPress后台管理界面更漂亮的WP插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F465.html&from=http%3A%2F%2Fjs8.in%2F496.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/07/09/16776541.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">七大让WordPress后台管理界面更漂亮的WP插件</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress插件开发之Widget侧边栏挂件插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F404.html&from=http%3A%2F%2Fjs8.in%2F496.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/11009724.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress插件开发之Widget侧边栏挂件插件</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="六个精美的WordPress圣诞插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F385.html&from=http%3A%2F%2Fjs8.in%2F496.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/18/11027118.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">六个精美的WordPress圣诞插件</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://js8.in/496.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>七大让WordPress后台管理界面更漂亮的WP插件</title>
		<link>http://js8.in/465.html</link>
		<comments>http://js8.in/465.html#comments</comments>
		<pubDate>Thu, 28 Jan 2010 08:13:36 +0000</pubDate>
		<dc:creator>三水清</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[网络技术]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.js8.in/?p=465</guid>
		<description><![CDATA[如果你是一个像我一样的WordPress用户，那么你可能会对WordPress的默认的管理界面感到厌倦。虽然WordPress的用户界面是很好的，但总是有改进的余地。 据消息称，WordPress背后支持公司已决定举办一次WordPress开放源码的设计比赛，用于美化WordPress的用户界面。在本文中，我们将使用一些WordPress插件来替代的默认的WordPress的用户界面，使用户管理界面更加友好美观。
1. Ozh’s Admin Drop Down Menu
Admin Drop Down Menu是最好的WordPress用户界面的插件之一，改变WordPress的管理方面的默认的用户界面。该插件替换所有的管理连接为超漂亮的CSS横向下拉菜单。该插件还可以节省不必要的点击次数，扩大菜单，提高您的效率。
该插件带有一个综合设置页面。您可以更改管理下拉菜单的配色方案，来提高插件速度，还可以禁用管理链接图标。
一个更加有趣的特点是它的紧凑模式，只显示顶部链接图标，而下拉管理菜单链接在点击之后出现。下面的屏幕截图阐述了此功能。
2. Fluency Admin 2.2
Fluency Admin可以给你的WordPress的一个有吸引力的外观。该插件替换所有管理面板为漂亮的CSS下拉管理菜单系。Fluency Admin还增加了键盘快捷键的支持，从而使您能够通过你的键盘来控制WordPress。并且Fluency Admin还可以一键完成在全菜单浏览模式和图标浏览模式。
Fluency Admin还支持在系统后台设置登陆页面主题。您可以轻松的改变WordPress logo为自己的网站logo。
3. Easy Admin Color Schemes
默认的WordPress安装配有两个配色方案，灰色和蓝色。Easy Admin Color Schemes插件增加了对您的管理面板的配色方案。此外，通过它还可以自己创建自己的配色方案。您还可以导出自定义配色方案到其他的博客中。根据不同的设置，每个用户可以有自己的定制的配色方案。看一下下面的这个配置方案截图效果吧：
4. Qwerty Admin Panel Theme
Qwerty Admin Panel Theme是一个很好看的WordPress后台主题。它允许您设置自己风格管理面板和登录页面。您也可以用自己网站的logo来替换掉WordPress默认的登录logo。
此插件的一个显着特点是“Limited Interface”，即根据不同的用户权限显示不同的用户面板功能。
5. Pop Menus for WP-Admin
Pop Menus插件将为您创建一个节省时间的“常用功能”的WP-admin 侧边栏。Pop Menus使用jQuery和CSS弹出动画管理快捷界面。此外，Pop Menus还可以随页面滚动。
6. Adminimize
Adminimize是一个非常全面和先进的WordPress的插件，具有很多特点来定制你的WordPress后台。该插件有隐藏不必要的WordPress的管理子菜单，甚至 “Dashboard”等不必要的功能菜单。该插件有50多个选项来调整你的WordPress安装后端。
下面的屏幕截图显示了Adminimize管理选项面板。
7. My Brand
通过My Brand插件自定义您的WordPress页面变得如此的容易。只要安装这个插件，并根据插件选项的帮助，您可以为您的WordPress登陆页面选择的背景颜色或背景，或者登录Logo。您也可以上载您的登录页面，自定义自己的Logo。
如果您有什么好的WordPress管理界面插件，可以拿出来跟我们分享给大家使用哦~
原文：《7 Awesome WordPress Plugins To Give Your Dashboard A New [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">猜你喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="发布WordPress来访者天气预报插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F374.html&from=http%3A%2F%2Fjs8.in%2F465.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10977484.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">发布WordPress来访者天气预报插件</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress博客的 SEO 技巧" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F496.html&from=http%3A%2F%2Fjs8.in%2F465.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/18/11027279.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress博客的 SEO 技巧</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress插件开发之Widget侧边栏挂件插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F404.html&from=http%3A%2F%2Fjs8.in%2F465.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/11009724.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress插件开发之Widget侧边栏挂件插件</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="三个使用WordPress自定义域做的小工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F436.html&from=http%3A%2F%2Fjs8.in%2F465.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10979536.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">三个使用WordPress自定义域做的小工具</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>如果你是一个像我一样的<strong>WordPress</strong>用户，那么你可能会对WordPress的默认的<strong>管理界</strong>面感到厌倦。虽然WordPress的<strong>用户界面</strong>是很好的，但总是有改进的余地。 据消息称，WordPress背后支持公司已决定举办一次WordPress开放源码的设计比赛，用于<strong>美化WordPress</strong>的用户界面。在本文中，我们将使用一些WordPress插件来替代的默认的WordPress的用户界面，使用户管理界面更加友好美观。</p>
<h3>1. Ozh’s Admin Drop Down Menu</h3>
<div class="wp-caption aligncenter" style="width: 390px"><img title="Admin Drop Down Menu" src="http://www.1stwebdesigner.com/wp-content/uploads/2010/01/admin-drop-down-menu-preview.jpg" alt="Admin Drop Down Menu" width="380" height="253" /><p class="wp-caption-text">Admin Drop Down Menu</p></div>
<p><strong>Admin Drop Down Menu</strong>是最好的WordPress用户界面的插件之一，改变WordPress的管理方面的默认的用户界面。该插件替换所有的管理连接为超漂亮的CSS横向下拉菜单。该插件还可以节省不必要的点击次数，扩大菜单，提高您的效率。<span id="more-465"></span></p>
<div class="wp-caption aligncenter" style="width: 580px"><img title="Admin Drop Down Dashboard" src="http://www.1stwebdesigner.com/wp-content/uploads/2010/01/wordpress-admin-area-redesign-1.jpg" alt="Admin Drop Down Dashboard" width="570" height="202" /><p class="wp-caption-text">Admin Drop Down Dashboard</p></div>
<p>该插件带有一个综合设置页面。您可以更改管理下拉菜单的配色方案，来提高插件速度，还可以禁用管理链接图标。</p>
<div class="wp-caption aligncenter" style="width: 580px"><img title="Admin Drop Down Options" src="http://www.1stwebdesigner.com/wp-content/uploads/2010/01/wordpress-admin-area-redesign-2.jpg" alt="Admin Drop Down Options" width="570" height="362" /><p class="wp-caption-text">Admin Drop Down Options</p></div>
<p>一个更加有趣的特点是它的紧凑模式，只显示顶部链接图标，而下拉管理菜单链接在点击之后出现。下面的屏幕截图阐述了此功能。</p>
<div class="wp-caption aligncenter" style="width: 390px"><img title="Compact Mode" src="http://www.1stwebdesigner.com/wp-content/uploads/2010/01/admin-drop-down-menu-compact.jpg" alt="Compact Mode" width="380" height="340" /><p class="wp-caption-text">Compact Mode</p></div>
<p><strong>2. Fluency Admin 2.2</strong></p>
<p><strong>Fluency Admin</strong>可以给你的WordPress的一个有吸引力的外观。该插件替换所有管理面板为漂亮的CSS下拉管理菜单系。Fluency Admin还增加了键盘快捷键的支持，从而使您能够通过你的键盘来控制WordPress。并且Fluency Admin还可以一键完成在全菜单浏览模式和图标浏览模式。</p>
<div class="wp-caption aligncenter" style="width: 580px"><img title="Fluency Wordpress Dashboard" src="http://www.1stwebdesigner.com/wp-content/uploads/2010/01/fluency-wordpress-dashboard.jpg" alt="Fluency Wordpress Dashboard" width="570" height="232" /><p class="wp-caption-text">Fluency Wordpress Dashboard</p></div>
<p>Fluency Admin还支持在系统后台设置登陆页面主题。您可以轻松的改变WordPress logo为自己的网站logo。</p>
<div class="wp-caption aligncenter" style="width: 580px"><img title="Fluency Options Menu" src="http://www.1stwebdesigner.com/wp-content/uploads/2010/01/fluency-option-panel.jpg" alt="Fluency Options Menu" width="570" height="324" /><p class="wp-caption-text">Fluency Options Menu</p></div>
<div class="wp-caption aligncenter" style="width: 249px"><img class="  " title="Fluency Login Theme" src="http://www.1stwebdesigner.com/wp-content/uploads/2010/01/fluency-ordpress-login-theme.jpg" alt="Fluency Login Theme" width="239" height="285" /><p class="wp-caption-text">Fluency Login Theme</p></div>
<p><strong>3. Easy Admin Color Schemes</strong></p>
<p>默认的WordPress安装配有两个配色方案，灰色和蓝色。<strong>Easy Admin Color Schemes</strong>插件增加了对您的管理面板的配色方案。此外，通过它还可以自己创建自己的配色方案。您还可以导出自定义配色方案到其他的博客中。根据不同的设置，每个用户可以有自己的定制的配色方案。看一下下面的这个配置方案截图效果吧：</p>
<div class="wp-caption aligncenter" style="width: 580px"><img title="WordPress dashboard green color scheme" src="http://www.1stwebdesigner.com/wp-content/uploads/2010/01/wordpress-dashboard-green-color-scheme.jpg" alt="WordPress dashboard green color scheme" width="570" height="207" /><p class="wp-caption-text">WordPress dashboard green color scheme</p></div>
<div class="wp-caption aligncenter" style="width: 580px"><img title="Easy admin color scheme options" src="http://www.1stwebdesigner.com/wp-content/uploads/2010/01/easy-admin-color-scheme-options.jpg" alt="Easy admin color scheme options" width="570" height="315" /><p class="wp-caption-text">Easy admin color scheme options</p></div>
<h3>4. Qwerty Admin Panel Theme</h3>
<p><strong>Qwerty Admin Panel Theme</strong>是一个很好看的WordPress后台主题。它允许您设置自己风格管理面板和登录页面。您也可以用自己网站的logo来替换掉WordPress默认的登录logo。</p>
<div class="wp-caption aligncenter" style="width: 580px"><img title="Qwerty WordPress admin panel theme" src="http://www.1stwebdesigner.com/wp-content/uploads/2010/01/qwerty-wordpress-admin-panel-theme.jpg" alt="Qwerty WordPress admin panel theme" width="570" height="279" /><p class="wp-caption-text">Qwerty WordPress admin panel theme</p></div>
<div class="wp-caption aligncenter" style="width: 580px"><img title="Qwerty WordPress admin panel options" src="http://www.1stwebdesigner.com/wp-content/uploads/2010/01/qwerty-wordpress-option-panel.jpg" alt="Qwerty WordPress admin panel options" width="570" height="261" /><p class="wp-caption-text">Qwerty WordPress admin panel options</p></div>
<p>此插件的一个显着特点是“<strong>Limited Interface</strong>”，即根据不同的用户权限显示不同的用户面板功能。</p>
<div class="wp-caption aligncenter" style="width: 394px"><img title="Qwerty Login theme" src="http://www.1stwebdesigner.com/wp-content/uploads/2010/01/qwerty-wordpress-login-panel-theme.jpg" alt="Qwerty Login theme" width="384" height="398" /><p class="wp-caption-text">Qwerty Login theme</p></div>
<h3>5. Pop Menus for WP-Admin</h3>
<p><strong>Pop Menus</strong>插件将为您创建一个节省时间的“常用功能”的WP-admin 侧边栏。Pop Menus使用jQuery和CSS弹出动画管理快捷界面。此外，Pop Menus还可以随页面滚动。</p>
<div class="wp-caption aligncenter" style="width: 580px"><img title="Pop-Menus Dashboard" src="http://www.1stwebdesigner.com/wp-content/uploads/2010/01/pop-menus-wordpress-dashboard.jpg" alt="Pop-Menus Dashboard" width="570" height="275" /><p class="wp-caption-text">Pop-Menus Dashboard</p></div>
<h3>6. Adminimize</h3>
<p><strong>Adminimize</strong>是一个非常全面和先进的WordPress的插件，具有很多特点来定制你的WordPress后台。该插件有隐藏不必要的WordPress的管理子菜单，甚至 “Dashboard”等不必要的功能菜单。该插件有50多个选项来调整你的WordPress安装后端。<br />
下面的屏幕截图显示了Adminimize管理选项面板。</p>
<div class="wp-caption aligncenter" style="width: 580px"><img title="Adminimize Option Panel" src="http://www.1stwebdesigner.com/wp-content/uploads/2010/01/adminimize-option-panel.jpg" alt="Adminimize Option Panel" width="570" height="687" /><p class="wp-caption-text">Adminimize Option Panel</p></div>
<h3>7. My Brand</h3>
<p>通过<strong>My Brand</strong>插件自定义您的WordPress页面变得如此的容易。只要安装这个插件，并根据插件选项的帮助，您可以为您的WordPress登陆页面选择的背景颜色或背景，或者<strong>登录Logo</strong>。您也可以上载您的登录页面，自定义自己的Logo。</p>
<div class="wp-caption aligncenter" style="width: 580px"><img title="My Brand Options Panel" src="http://www.1stwebdesigner.com/wp-content/uploads/2010/01/my-brand-options-page.jpg" alt="My Brand Options Panel" width="570" height="429" /><p class="wp-caption-text">My Brand Options Panel</p></div>
<p>如果您有什么好的WordPress管理界面插件，可以拿出来跟我们分享给大家使用哦~</p>
<p style="text-indent:0">原文：《<a target="_blank" title="http://www.1stwebdesigner.com/wordpress/awesome-wordpress-plugin-your-dashboard/" href="http://www.1stwebdesigner.com/wordpress/awesome-wordpress-plugin-your-dashboard/" target="_blank">7 Awesome WordPress Plugins To Give Your Dashboard A New Look</a>》<br />
翻译：《<a target="_blank" title="七大让WordPress后台管理页面更漂亮的WP插件" href=" http://js8.in/465.html" target="_self">七大让WordPress后台管理界面更漂亮的WP插件</a>》 | <a title="断桥残雪部落格" href="http://js8.in" target="_self">断桥残雪部落格 </a></p>
<div class="copyright">
<strong>声明：</strong>文章未声明为原创文章，本文链接 <a href="http://js8.in/465.html" title="七大让WordPress后台管理界面更漂亮的WP插件">http://js8.in/465.html</a>. 转载请注明转自<a href="http://js8.in" title="前端开发博客"> JS8.IN ™</a></span></span></div>
<h3 class="box-title">随机文章</h3>
<ul class="box_random">
<li><a href="http://js8.in/519.html" title="windows下安装基于Apache的SVN服务器" rel="bookmark inlinks">windows下安装基于Apache的SVN服务器</a></li>
<li><a href="http://js8.in/15.html" title="奋斗了两天！" rel="bookmark inlinks">奋斗了两天！</a></li>
<li><a href="http://js8.in/461.html" title="断桥残雪部落格更换新域名JS8.in" rel="bookmark inlinks">断桥残雪部落格更换新域名JS8.in</a></li>
<li><a href="http://js8.in/63.html" title="jQuery插件pager修改版-更加智能" rel="bookmark inlinks">jQuery插件pager修改版-更加智能</a></li>
<li><a href="http://js8.in/445.html" title="Google AdWords免费广告费用申请下来了" rel="bookmark inlinks">Google AdWords免费广告费用申请下来了</a></li>
<li><a href="http://js8.in/802.html" title="HTMl5的sessionStorage和localStorage" rel="bookmark inlinks">HTMl5的sessionStorage和localStorage</a></li>
<li><a href="http://js8.in/666.html" title="练手：一个获取验证码图片到本地的PHP程序" rel="bookmark inlinks">练手：一个获取验证码图片到本地的PHP程序</a></li>
<li><a href="http://js8.in/691.html" title="拿福能中国千人挑战活动" rel="bookmark inlinks">拿福能中国千人挑战活动</a></li>
</ul>
<hr />
<p><small>© 三水清 for <a href="http://js8.in">三水清</a>, 2010. |
<a href="http://js8.in/465.html#comments">19 comments</a> |在微博关注我：<a href="//weibo.com/sanshuiqing" target="_blank" title="关注断桥残雪的新浪微博">@清-三水清</a>
<br/>收藏到：
<a rel="nofollow" href="http://share.renren.com/share/buttonshare.do?link=%posturl%&title=%posttitle%" title="收藏本文到人人网" target="_blank">人人网</a> | <a rel="nofollow" href="http://www.douban.com/recommend/?url=%posturl%&title=%posttitle%" title="收藏本文到豆瓣" target="_blank">豆瓣</a> | <a rel="nofollow" href="http://www.kaixin001.com/repaste/share.php?rtitle=%posttitle%&rurl=%posturl%" title="收藏本文到开心网" target="_blank">开心网</a> | <a rel="nofollow" href="http://shuqian.qq.com/post?title=%posttitle%&%20uri=%posturl%" title="收藏本文到QQ书签" target="_blank">QQ书签</a> | <a rel="nofollow" href="http://v.t.sina.com.cn/share/share.php?url=%posturl%&title=%posttitle%" title="收藏本文到新浪微博" target="_blank">新浪微博</a> | <a rel="nofollow" href="http://v.t.qq.com/share/share.php?title=%posttitle%&url=%posturl%&site=http://www.kaixin100.info" title="收藏本文到腾讯微博" target="_blank">腾讯微博</a>
<br/>
Post tags: <a href="http://js8.in/tag/plugin" rel="tag">plugin</a>, <a href="http://js8.in/tag/wordpress" rel="tag">wordpress</a><br/>
</small></p><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">猜你喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="发布WordPress来访者天气预报插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F374.html&from=http%3A%2F%2Fjs8.in%2F465.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10977484.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">发布WordPress来访者天气预报插件</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress博客的 SEO 技巧" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F496.html&from=http%3A%2F%2Fjs8.in%2F465.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/18/11027279.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress博客的 SEO 技巧</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress插件开发之Widget侧边栏挂件插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F404.html&from=http%3A%2F%2Fjs8.in%2F465.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/11009724.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress插件开发之Widget侧边栏挂件插件</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="三个使用WordPress自定义域做的小工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F436.html&from=http%3A%2F%2Fjs8.in%2F465.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10979536.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">三个使用WordPress自定义域做的小工具</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://js8.in/465.html/feed</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>三个使用WordPress自定义域做的小工具</title>
		<link>http://js8.in/436.html</link>
		<comments>http://js8.in/436.html#comments</comments>
		<pubDate>Fri, 01 Jan 2010 00:26:10 +0000</pubDate>
		<dc:creator>三水清</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[网络技术]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.js8.in/?p=436</guid>
		<description><![CDATA[今天断桥残雪就说说WordPress自定义域三个用处：给某一日记添加js或者CSS用于运行代码，给加密的日志添加密码提示信息、首页显示日志缩略图。文章最后再介绍一种管理WordPress自定义域的小技巧工具。<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">猜你喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress插件开发之Widget侧边栏挂件插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F404.html&from=http%3A%2F%2Fjs8.in%2F436.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/11009724.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress插件开发之Widget侧边栏挂件插件</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress博客的 SEO 技巧" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F496.html&from=http%3A%2F%2Fjs8.in%2F436.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/18/11027279.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress博客的 SEO 技巧</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="六个精美的WordPress圣诞插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F385.html&from=http%3A%2F%2Fjs8.in%2F436.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/18/11027118.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">六个精美的WordPress圣诞插件</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress Follow5插件发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F352.html&from=http%3A%2F%2Fjs8.in%2F436.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10982263.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress Follow5插件发布</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>刚开始建立WordPress博客的时候对于自定义域不是很了解，之后通过搜索相关知识：发现原来<strong>WordPress自定义域</strong>可以做很多事情，今天断桥残雪就说说WordPress自定义域三个用处：<strong>给某一日记添加js或者CSS</strong>，<strong>给加密的日志添加密码提示信息</strong>、<strong>首页显示日志缩略图</strong>。</p>
<h3>给某一日记添加js或者CSS</h3>
<p>WordPress 在发布日志时会对过滤一些Javascript、CSS内容，所以我们无法直接把JS、CSS直接写到日志，当然我们可以通过修改主题来实现。可是如果修改主题，把JS或者CSS的内容添加到 header.php 文件中，那么博客所有的页面都会加载这些内容，这样势必会造成整个博客效率下降。所以这个时候我们可以通过 WordPress 自定义域来给某篇的日志单独加<strong>载Javascript 和CSS</strong>。文章最后再介绍一种管理WordPress自定义域的小技巧工具。</p>
<p>假设我们给日志单独加载JS、CSS的自定义域名称是 head_JS_CSS。那么你首先需要把下面这段代码复制到你主题根目录下的 functions.php 文件中：</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> head_JS_CSS<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$post</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$head_JS_CSS</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'head_JS_CSS'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$head_JS_CSS</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;wp_head&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;head_JS_CSS&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</blockquote>
<p>现在你在添加日志的时候，在WordPress自定义域区域，创建一个新的名称为：&#8221;head_JS_CSS&#8221;自定义域，在“值”输入你要单独为这篇日志加载的 Javascript 代码或者 CSS 即可。<br />
<span id="more-436"></span></p>
<h3>给加密的日志添加密码提示信息</h3>
<p>当我们添加一篇加密的文章时，或许我们需要部分人知道密码的时候，可以试试做个<strong>密码提示</strong>，例如：××的生日。<br />
假设我们给日志添加密码提示的自定义域名称是password_hint。那么你首先需要把下面这段代码复制到你主题根目录下的 functions.php 文件中：</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> password_hint<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$c</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$post</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user_ID</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user_identity</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_password</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$c</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'wp-postpass_'</span><span style="color: #339933;">.</span>COOKIEHASH<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">stripslashes</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'wp-postpass_'</span><span style="color: #339933;">.</span>COOKIEHASH<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_password</span> <span style="color: #009900;">&#41;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$c</span><span style="color: #339933;">;</span>
	<span style="color: #666666; font-style: italic;">//替换</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$hint</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'password_hint'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'siteurl'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/wp-pass.php'</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$hint</span><span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$hint</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'密码提示：'</span><span style="color: #339933;">.</span><span style="color: #000088;">$hint</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">else</span>
		<span style="color: #000088;">$hint</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;请输入您的密码&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$user_ID</span><span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$hint</span> <span style="color: #339933;">.=</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'欢迎进入，您的密码是：'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user_identity</span><span style="color: #339933;">,</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_password</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$out</span> <span style="color: #339933;">=</span> <span style="color: #0000cc; font-style: italic;">&lt;&lt;&lt;END
&lt;form method=&quot;post&quot; action=&quot;$url&quot;&gt;
	&lt;p&gt;这篇文章是受保护的文章，请输入密码继续阅读:&lt;/p&gt;
	&lt;div class=&quot;rowl&quot;&gt;
	&lt;label&gt;$hint&lt;br/&gt;
	&lt;input class=&quot;textfield&quot; type=&quot;password&quot; name=&quot;post_password&quot;/&gt;&lt;/label&gt;
	&lt;input class=&quot;button bias&quot; type=&quot;submit&quot; value=&quot;Submit&quot; name=&quot;Submit&quot;/&gt;
	&lt;/div&gt;
&lt;/form&gt;
END</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$out</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$c</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_content'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'password_hint'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</blockquote>
<p>然后在你添加日志的时候，在WordPress自定义域区域，创建一个新的名称为：&#8221;password_hint&#8221;的自定义域，在“值”输入你密码提示：如断桥残雪的生日阳历是几号？</p>
<h3>显示日志缩略图</h3>
<p>这个比较简单，不过效果很帅，会实现就像cnbeta那样的首页日记<strong>缩略图</strong>功能。<br />
假设我们给日志添加缩略图的自定义域名称是 image_thumb。那么你首先需要找到你主题根目录下的 index.php文件中的类似</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> the_content<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Read the rest of this entry &amp;raquo;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

</blockquote>
<p>代码前面添加如下代码：</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; title=&quot;&lt;?php the_title(); ?&gt;&quot;&gt;
&lt;img src=&quot;&lt;?php $values = get_post_custom_values(&quot;image_thumb&quot;); echo $values[0]; ?&gt;&quot; alt=&quot;&lt;?php the_title(); ?&gt;&quot; /&gt;
&lt;/a&gt;</pre></div></div>

</blockquote>
<p>然后在你添加日志的时候，在WordPress自定义域区域，创建一个新的名称为：&#8221;image_thumb&#8221;自定义域，在“值”输入你要为本篇日志上传的图片的 URL。</p>
<h3>自定义域多了的小技巧</h3>
<p>自定义域多了，我们都不好记了，或者类似加密提示的自定义域我们不经常用，当用起来的时候也许我们就忘记他们的名字了，怎么办呢~断桥残雪有个好方法，就是在后台添加、编辑日记的页面右侧添加一个提示，效果如下所示：<br />
<div id="attachment_437" class="wp-caption alignnone" style="width: 300px"><a href="http://js8.in/wp-content/uploads/2009/12/Snap15.jpg"><img src="http://js8.in/wp-content/uploads/2009/12/Snap15.jpg" alt="WordPress添加自定义域提示" title="WordPress添加自定义域提示" width="290" height="120" class="size-full wp-image-437" /></a><p class="wp-caption-text">WordPress添加自定义域提示</p></div></p>
<p>我们只需要找到主题文件夹的根目录下的functions.php文件，添加以下代码即可：</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> custom_fields_tip<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$h3</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;欢迎使用自定义域&quot;</span><span style="color: #339933;">;</span>	
	<span style="color: #000088;">$html</span><span style="color: #339933;">=</span><span style="color: #0000cc; font-style: italic;">&lt;&lt;&lt;END
&lt;div class=&quot;stuffbox meta-box-sortables ui-sortable&quot;&gt;
	&lt;h3&gt;$h3&lt;/h3&gt;
	&lt;div class=&quot;inside&quot;&gt;
		&lt;p&gt;如果你正在发布或编辑一篇受密码保护的文章,建议您添加一个名称为'password_hint'的自定义域.用来提示访客.&lt;br/&gt;使用'head_JS_CSS'可以添加css、js到头部.&lt;br/&gt;使用'image_thumb'可以给文章添加缩略图&lt;/p&gt;		
	&lt;/div&gt;
&lt;/div&gt;
END</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$html</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'submitpost_box'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'custom_fields_tip'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'submitpage_box'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'custom_fields_tip'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</blockquote>
<div class="copyright">
<strong>声明：</strong>文章未声明为原创文章，本文链接 <a href="http://js8.in/436.html" title="三个使用WordPress自定义域做的小工具">http://js8.in/436.html</a>. 转载请注明转自<a href="http://js8.in" title="前端开发博客"> JS8.IN ™</a></span></span></div>
<h3 class="box-title">随机文章</h3>
<ul class="box_random">
<li><a href="http://js8.in/15.html" title="奋斗了两天！" rel="bookmark inlinks">奋斗了两天！</a></li>
<li><a href="http://js8.in/346.html" title="Wordpress Follow5 插件开发日记—插件后台Ajax应用及jQuery的使用" rel="bookmark inlinks">Wordpress Follow5 插件开发日记—插件后台Ajax应用及jQuery的使用</a></li>
<li><a href="http://js8.in/20.html" title="手把手图解教你使用PQ魔法师调节硬盘分区大小" rel="bookmark inlinks">手把手图解教你使用PQ魔法师调节硬盘分区大小</a></li>
<li><a href="http://js8.in/677.html" title="自己写的一个轻量级javascript框架的设计模式" rel="bookmark inlinks">自己写的一个轻量级javascript框架的设计模式</a></li>
<li><a href="http://js8.in/240.html" title="是不是应该出售2fool.cn的域名" rel="bookmark inlinks">是不是应该出售2fool.cn的域名</a></li>
<li><a href="http://js8.in/453.html" title="全世界都在笑中国傻" rel="bookmark inlinks">全世界都在笑中国傻</a></li>
<li><a href="http://js8.in/416.html" title="jQuery选择器使用详解" rel="bookmark inlinks">jQuery选择器使用详解</a></li>
<li><a href="http://js8.in/471.html" title="简单修改.htaccess来提高Yslow等级" rel="bookmark inlinks">简单修改.htaccess来提高Yslow等级</a></li>
</ul>
<hr />
<p><small>© 三水清 for <a href="http://js8.in">三水清</a>, 2009. |
<a href="http://js8.in/436.html#comments">12 comments</a> |在微博关注我：<a href="//weibo.com/sanshuiqing" target="_blank" title="关注断桥残雪的新浪微博">@清-三水清</a>
<br/>收藏到：
<a rel="nofollow" href="http://share.renren.com/share/buttonshare.do?link=%posturl%&title=%posttitle%" title="收藏本文到人人网" target="_blank">人人网</a> | <a rel="nofollow" href="http://www.douban.com/recommend/?url=%posturl%&title=%posttitle%" title="收藏本文到豆瓣" target="_blank">豆瓣</a> | <a rel="nofollow" href="http://www.kaixin001.com/repaste/share.php?rtitle=%posttitle%&rurl=%posturl%" title="收藏本文到开心网" target="_blank">开心网</a> | <a rel="nofollow" href="http://shuqian.qq.com/post?title=%posttitle%&%20uri=%posturl%" title="收藏本文到QQ书签" target="_blank">QQ书签</a> | <a rel="nofollow" href="http://v.t.sina.com.cn/share/share.php?url=%posturl%&title=%posttitle%" title="收藏本文到新浪微博" target="_blank">新浪微博</a> | <a rel="nofollow" href="http://v.t.qq.com/share/share.php?title=%posttitle%&url=%posturl%&site=http://www.kaixin100.info" title="收藏本文到腾讯微博" target="_blank">腾讯微博</a>
<br/>
Post tags: <a href="http://js8.in/tag/wordpress" rel="tag">wordpress</a><br/>
</small></p><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">猜你喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress插件开发之Widget侧边栏挂件插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F404.html&from=http%3A%2F%2Fjs8.in%2F436.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/11009724.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress插件开发之Widget侧边栏挂件插件</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress博客的 SEO 技巧" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F496.html&from=http%3A%2F%2Fjs8.in%2F436.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/18/11027279.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress博客的 SEO 技巧</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="六个精美的WordPress圣诞插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F385.html&from=http%3A%2F%2Fjs8.in%2F436.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/18/11027118.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">六个精美的WordPress圣诞插件</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress Follow5插件发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F352.html&from=http%3A%2F%2Fjs8.in%2F436.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10982263.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress Follow5插件发布</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://js8.in/436.html/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>推荐漂亮的一款WordPress新年插件</title>
		<link>http://js8.in/422.html</link>
		<comments>http://js8.in/422.html#comments</comments>
		<pubDate>Tue, 29 Dec 2009 06:40:48 +0000</pubDate>
		<dc:creator>三水清</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[网络技术]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.js8.in/?p=422</guid>
		<description><![CDATA[2010年新年就要到了，我在之前的博客推荐过六款WordPress圣诞插件，并且推荐了一款漂亮的WordPress圣诞新年主题，今天我再给大家推荐一款WordPress新年插件，本插件是由国人开发的哦~当然要支持一下啦<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">猜你喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="推荐一款免费圣诞节新年WordPress主题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F402.html&from=http%3A%2F%2Fjs8.in%2F422.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/18/11026195.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">推荐一款免费圣诞节新年WordPress主题</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress博客的 SEO 技巧" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F496.html&from=http%3A%2F%2Fjs8.in%2F422.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/18/11027279.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress博客的 SEO 技巧</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress插件开发之Widget侧边栏挂件插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F404.html&from=http%3A%2F%2Fjs8.in%2F422.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/11009724.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress插件开发之Widget侧边栏挂件插件</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="三个使用WordPress自定义域做的小工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F436.html&from=http%3A%2F%2Fjs8.in%2F422.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10979536.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">三个使用WordPress自定义域做的小工具</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>2010年新年就要到了，我在之前的博客<a href="http://js8.in/385.html" target="_blank">推荐过六款WordPress圣诞插件</a>，并且推荐了<a href="http://js8.in/402.html" target="_blank">一款漂亮的WordPress圣诞新年主题</a>，今天我再给大家推荐一款<strong>WordPress新年插件</strong>，本插件是由国人开发的哦~当然要支持一下啦~其实在开始推荐的<strong><a href="http://js8.in/385.html" target="_blank">六款WordPress圣诞插件</a></strong>中就有一款是这个人开发的插件了~废话不多说，开始正式介绍插件啦~<br />
老规矩先上截图：</p>
<div id="attachment_421" class="wp-caption alignnone" style="width: 276px"><a href="http://js8.in/wp-content/uploads/2009/12/screenshot-1.jpg"><img class="size-medium wp-image-421" title="新年插件" src="http://js8.in/wp-content/uploads/2009/12/screenshot-1-266x300.jpg" alt="WordPress新年插件" width="266" height="300" /></a><p class="wp-caption-text">WordPress新年插件</p></div>
<p>主要效果是在页面的右上角做一个翻页效果的Flash。<br />
<span id="more-422"></span></p>
<p>下载地址：<a target="_blank" href="http://wordpress.org/extend/plugins/chinese-new-year/" target="_blank">WordPress新年插件下载地址</a><br />
预览地址：<a target="_blank" href="http://liucheng.name/1169/" target="_blank">柳城博客</a><br />
使用方法：下载后解压，然后上传后 wp-content/plugins 目录。在后台激活，就能用了。后台有详细的参数设置。可以选择在不同的页面下显示（首页、目录、标签等页面）。</p>
<h3>非WordPress通用插件方法</h3>
<p>不喜欢用插件的，或不是用WP博客的博友也无所谓。这里有一个通用的版本。把以下代码放在<body></body>之间。如果是<strong>WordPress</strong>博客，推荐放在footer.php的</body>之前。</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div id=layer11 style=&quot;z-index: 1; right: 22px; right: 240px \9; visibility: visible; width: 240px; position: absolute; top: 1px; height: 240px&quot;&gt;
   &lt;object codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0
     height=480 width=480
     classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000&gt;
  &lt;param name=&quot;_cx&quot; value=&quot;6879&quot;&gt;
  &lt;param name=&quot;_cy&quot; value=&quot;6879&quot;&gt;
  &lt;param name=&quot;flashvars&quot; value&gt;
  &lt;param name=&quot;movie&quot; value=&quot;http://liucheng.name/wp-content/plugins/chinese-new-year/Chinese-new-year.swf&quot;&gt;
  &lt;param name=&quot;src&quot; value=&quot;http://liucheng.name/wp-content/plugins/chinese-new-year/Chinese-new-year.swf&quot;&gt;
  &lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;
  &lt;param name=&quot;quality&quot; value=&quot;high&quot;&gt;
  &lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;
  &lt;param name=&quot;devicefont&quot; value=&quot;0&quot;&gt;
  &lt;param name=&quot;embedmovie&quot; value=&quot;0&quot;&gt;
  &lt;param name=&quot;swremote&quot; value&gt;
  &lt;param name=&quot;moviedata&quot; value&gt;
  &lt;param name=&quot;seamlesstabbing&quot; value=&quot;1&quot;&gt;
  &lt;embed src=&quot;http://liucheng.name/wp-content/plugins/chinese-new-year/Chinese-new-year.swf&quot; quality=&quot;high&quot; pluginspage=&quot;http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;260&quot; height=&quot;260&quot; wmode=&quot;transparent&quot;&gt;
   &lt;/object&gt;
 &lt;/div&gt;</pre></div></div>

</blockquote>
<div class="copyright">
<strong>声明：</strong>文章未声明为原创文章，本文链接 <a href="http://js8.in/422.html" title="推荐漂亮的一款WordPress新年插件">http://js8.in/422.html</a>. 转载请注明转自<a href="http://js8.in" title="前端开发博客"> JS8.IN ™</a></span></span></div>
<h3 class="box-title">随机文章</h3>
<ul class="box_random">
<li><a href="http://js8.in/941.html" title="PHP实现javascript的escape和unescape函数" rel="bookmark inlinks">PHP实现javascript的escape和unescape函数</a></li>
<li><a href="http://js8.in/736.html" title="javascript变量类型" rel="bookmark inlinks">javascript变量类型</a></li>
<li><a href="http://js8.in/414.html" title="js判断浏览器的函数，可区分chrome，safari" rel="bookmark inlinks">js判断浏览器的函数，可区分chrome，safari</a></li>
<li><a href="http://js8.in/63.html" title="jQuery插件pager修改版-更加智能" rel="bookmark inlinks">jQuery插件pager修改版-更加智能</a></li>
<li><a href="http://js8.in/337.html" title="jQuery浏览器判断一个bug，以及修改建议" rel="bookmark inlinks">jQuery浏览器判断一个bug，以及修改建议</a></li>
<li><a href="http://js8.in/640.html" title="dedeeims列表页面导航条当前样式实现方法" rel="bookmark inlinks">dedeeims列表页面导航条当前样式实现方法</a></li>
<li><a href="http://js8.in/559.html" title="实时公布腾讯微博邀请种子" rel="bookmark inlinks">实时公布腾讯微博邀请种子</a></li>
<li><a href="http://js8.in/349.html" title="发布一个Follow5的API PHP类" rel="bookmark inlinks">发布一个Follow5的API PHP类</a></li>
</ul>
<hr />
<p><small>© 三水清 for <a href="http://js8.in">三水清</a>, 2009. |
<a href="http://js8.in/422.html#comments">One comment</a> |在微博关注我：<a href="//weibo.com/sanshuiqing" target="_blank" title="关注断桥残雪的新浪微博">@清-三水清</a>
<br/>收藏到：
<a rel="nofollow" href="http://share.renren.com/share/buttonshare.do?link=%posturl%&title=%posttitle%" title="收藏本文到人人网" target="_blank">人人网</a> | <a rel="nofollow" href="http://www.douban.com/recommend/?url=%posturl%&title=%posttitle%" title="收藏本文到豆瓣" target="_blank">豆瓣</a> | <a rel="nofollow" href="http://www.kaixin001.com/repaste/share.php?rtitle=%posttitle%&rurl=%posturl%" title="收藏本文到开心网" target="_blank">开心网</a> | <a rel="nofollow" href="http://shuqian.qq.com/post?title=%posttitle%&%20uri=%posturl%" title="收藏本文到QQ书签" target="_blank">QQ书签</a> | <a rel="nofollow" href="http://v.t.sina.com.cn/share/share.php?url=%posturl%&title=%posttitle%" title="收藏本文到新浪微博" target="_blank">新浪微博</a> | <a rel="nofollow" href="http://v.t.qq.com/share/share.php?title=%posttitle%&url=%posturl%&site=http://www.kaixin100.info" title="收藏本文到腾讯微博" target="_blank">腾讯微博</a>
<br/>
Post tags: <a href="http://js8.in/tag/wordpress" rel="tag">wordpress</a>, <a href="http://js8.in/tag/wordpress-%e7%bd%91%e7%bb%9c%e6%8a%80%e6%9c%af" rel="tag">WordPress</a><br/>
</small></p><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">猜你喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="推荐一款免费圣诞节新年WordPress主题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F402.html&from=http%3A%2F%2Fjs8.in%2F422.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/18/11026195.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">推荐一款免费圣诞节新年WordPress主题</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress博客的 SEO 技巧" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F496.html&from=http%3A%2F%2Fjs8.in%2F422.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/18/11027279.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress博客的 SEO 技巧</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress插件开发之Widget侧边栏挂件插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F404.html&from=http%3A%2F%2Fjs8.in%2F422.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/11009724.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress插件开发之Widget侧边栏挂件插件</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="三个使用WordPress自定义域做的小工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F436.html&from=http%3A%2F%2Fjs8.in%2F422.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10979536.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">三个使用WordPress自定义域做的小工具</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://js8.in/422.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress插件开发之Widget侧边栏挂件插件</title>
		<link>http://js8.in/404.html</link>
		<comments>http://js8.in/404.html#comments</comments>
		<pubDate>Thu, 24 Dec 2009 03:46:34 +0000</pubDate>
		<dc:creator>三水清</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[网络技术]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.js8.in/?p=404</guid>
		<description><![CDATA[之前开发Follow5和天气预报的WordPress插件，都是用了WordPress的WP_Widget函数开发的WordPress侧边栏挂件插件。今天就说说WordPress2.8+的版本使用WP_Widget函数轻松开发widget的方法。<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">猜你喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="Wordpress Follow5 插件开发日记—插件后台Ajax应用及jQuery的使用" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F346.html&from=http%3A%2F%2Fjs8.in%2F404.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10980604.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Wordpress Follow5 插件开发日记—插件后台Ajax应用及jQuery的使用</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="三个使用WordPress自定义域做的小工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F436.html&from=http%3A%2F%2Fjs8.in%2F404.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10979536.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">三个使用WordPress自定义域做的小工具</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="七大让WordPress后台管理界面更漂亮的WP插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F465.html&from=http%3A%2F%2Fjs8.in%2F404.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/07/09/16776541.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">七大让WordPress后台管理界面更漂亮的WP插件</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="六个精美的WordPress圣诞插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F385.html&from=http%3A%2F%2Fjs8.in%2F404.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/18/11027118.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">六个精美的WordPress圣诞插件</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>之前开发<a target="_blank" href="http://js8.in/352.html" target="_blank">Follow5</a>和<a href="http://js8.in/wordpress-weather" target="_blank">天气预报</a>的WordPress插件，都是用了WordPress的<a href="http://codex.wordpress.org/zh-cn:%E6%8C%82%E4%BB%B6%E6%8E%A5%E5%8F%A3" target="_blank">WP_Widget函数</a>开发的WordPress侧边栏挂件插件。今天就说说WordPress2.8+的版本使用<strong>WP_Widget函数</strong>轻松开发widget的方法。</p>
<p>WP_Widget函数的默认用法是这样子的：</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> My_Widget <span style="color: #000000; font-weight: bold;">extends</span> WP_Widget <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">function</span> My_Widget<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// 挂件实例化</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">function</span> widget<span style="color: #009900;">&#40;</span><span style="color: #000088;">$args</span><span style="color: #339933;">,</span> <span style="color: #000088;">$instance</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// 输出挂件内容</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">function</span> update<span style="color: #009900;">&#40;</span><span style="color: #000088;">$new_instance</span><span style="color: #339933;">,</span> <span style="color: #000088;">$old_instance</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// 选项保存过程</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">function</span> form<span style="color: #009900;">&#40;</span><span style="color: #000088;">$instance</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// 在管理界面输出选项表单</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
register_widget<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'My_Widget'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</blockquote>
<p>简单分析一下：</p>
<p style="padding-left: 30px;text-indent:0px; "><strong>My_Widget </strong>:可以是任意的你喜欢的名字，是你开发插件的构造函数<br />
<strong> widget</strong>：跟下面的update，form都是WordPress默认的名字，不得改变。widget为在页面侧边栏输出的挂件内容<br />
<strong> update</strong>：选项更新时候保存处理的函数<br />
<strong> form</strong>：在后台管理界面显示的输出选项表单</p>
<p><span id="more-404"></span><br />
下面我分析一下我的<a title="wordpress天气预报插件下载地址" href="http://js8.in/wordpress-weather" target="_blank">天气预报插件</a>的源代码，解释一下WP_Widget的用法，源代码如下所示：</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> Weather_Widget <span style="color: #000000; font-weight: bold;">extends</span> WP_Widget <span style="color: #009900;">&#123;</span>
    <span style="color: #009933; font-style: italic;">/** 构造函数 */</span>
    <span style="color: #000000; font-weight: bold;">function</span> Weather_Widget<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>        
		<span style="color: #000088;">$widget_ops</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>			
			<span style="color: #0000ff;">'description'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'设置您的&lt;strong&gt;来访者天气&lt;/strong&gt; Widget,拖动到右侧侧边栏即可使用'</span>
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        parent<span style="color: #339933;">::</span><span style="color: #004000;">WP_Widget</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Weather'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Weather Widget'</span><span style="color: #339933;">,</span><span style="color: #000088;">$widget_ops</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000000; font-weight: bold;">function</span> widget<span style="color: #009900;">&#40;</span><span style="color: #000088;">$args</span><span style="color: #339933;">,</span> <span style="color: #000088;">$instance</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">extract</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$args</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>   
    <span style="color: #000088;">$my_Weather_content</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;div id=&quot;myTQ&quot;&gt;&lt;div id=&quot;weatherLoad&quot;&gt;&lt;img src=&quot;'</span><span style="color: #339933;">.</span>get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/wp-content/plugins/weather/images/loading.gif&quot; /&gt;&lt;br/&gt;&lt;span&gt;天气加载中……&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$before_widget</span><span style="color: #339933;">.</span><span style="color: #000088;">$before_title</span><span style="color: #339933;">.</span><span style="color: #000088;">$instance</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #000088;">$after_title</span><span style="color: #339933;">.</span><span style="color: #000088;">$my_Weather_content</span><span style="color: #339933;">.</span><span style="color: #000088;">$after_widget</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
    <span style="color: #000000; font-weight: bold;">function</span> update<span style="color: #009900;">&#40;</span><span style="color: #000088;">$new_instance</span><span style="color: #339933;">,</span> <span style="color: #000088;">$old_instance</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>				
        <span style="color: #b1b100;">return</span> <span style="color: #000088;">$new_instance</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000000; font-weight: bold;">function</span> form<span style="color: #009900;">&#40;</span><span style="color: #000088;">$instance</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>				
        <span style="color: #000088;">$title</span> <span style="color: #339933;">=</span> esc_attr<span style="color: #009900;">&#40;</span><span style="color: #000088;">$instance</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">?&gt;</span>
            &lt;p&gt;&lt;label for=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_field_id</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Title:'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;input class=&quot;widefat&quot; id=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_field_id</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; name=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_field_name</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; type=&quot;text&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$title</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;&lt;/label&gt;&lt;/p&gt;
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> 
    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'widgets_init'</span><span style="color: #339933;">,</span> <span style="color: #990000;">create_function</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'return register_widget(&quot;Weather_Widget&quot;);'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</blockquote>
<h3>构造函数Weather_Widget</h3>
<p>作用是构造函数，添加后台显示信息。<br />
两个数组：</p>
<p style="padding-left: 30px;text-indent:0px; "><strong>$widget_ops</strong>，用来保存类名和描述，以便在控制面板正确显示工具信息<br />
<strong>$control_ops</strong> 是可选参数，用来定义小工具在控制面板显示的宽度和高度（可选，天气预报插件未使用本数组）</p>
<p>最后一步代码：<br />
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">parent<span style="color: #339933;">::</span><span style="color: #004000;">WP_Widget</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Weather'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Weather Widget'</span><span style="color: #339933;">,</span><span style="color: #000088;">$widget_ops</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</blockquote>
<p>调用<strong>WP_Widget</strong>来初始化我们的小工具，其中name为插件在后台显示的名称。<br />
效果截图：<br />
<div id="attachment_405" class="wp-caption alignnone" style="width: 269px"><a href="http://js8.in/wp-content/uploads/2009/12/Snap21.jpg"><img src="http://js8.in/wp-content/uploads/2009/12/Snap21.jpg" alt="WordPress挂件插件开发" title="WordPress挂件插件开发" width="259" height="81" class="size-full wp-image-405" /></a><p class="wp-caption-text">WordPress挂件插件开发</p></div></p>
<h3>前端显示函数widget</h3>
<p>首先使用了<strong>extract函数</strong>把数组中的keys转换成变量，比如下面用到的$before_widget、$before_title、$after_title、$after_widget，这些变量不同的主题模块有不同的值。<br />
然后我们使用echo来显示到页面上来</p>
<h3>更新处理函数update</h3>
<p>update函数用于更新保存的设置。其实这个函数可以不定义，不过为了提高安全性，我们一般用此函数进行字符串的过滤。如下面的代码：</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #000088;">$instance</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$old_instance</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$instance</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strip_tags</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">stripslashes</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$new_instance</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$instance</span><span style="color: #339933;">;</span></pre></div></div>

</blockquote>
<p>可以过滤掉不安全的title字符</p>
<h3>选项设置表单函数form</h3>
<p>form函数一般是用来显示小工具的选项设置表单，表单的内容根据需要自己定义。天气预报插件小工具可以让用户自定义1个内容：title插件名称。<br />
$instance数组的key：title是可以自己定义的，但在前后的使用过程中要保持一致。另外wordpress提供了两函数<strong>get_field_name</strong> 和<strong>get_field_id</strong>来保证表单内每一项设置都保存到相应的数组Key中。<br />
效果截图：<br />
<div id="attachment_406" class="wp-caption alignnone" style="width: 268px"><a href="http://js8.in/wp-content/uploads/2009/12/Snap11.jpg"><img src="http://js8.in/wp-content/uploads/2009/12/Snap11.jpg" alt="WordPress挂件插件开发——设置标题" title="WordPress挂件插件开发——设置标题" width="258" height="134" class="size-full wp-image-406" /></a><p class="wp-caption-text">WordPress挂件插件开发——设置标题</p></div></p>
<h3>注册小工具，使之激活</h3>
<p>最后使用WordPress内置的<strong>add_action函数</strong>激活天气预报插件就可以了~<br />
注意：注册工具的代码要添加到上面的类定义之外！<br />
最终来访者天气预报插件的效果图：<br />
<img alt="" src="http://js8.in/wp-content/uploads/2009/12/screenshot.jpg" title="WordPress来访者天气预报插件截图" class="alignnone" width="253" height="199" /></p>
<p>有关该来访者天气预报插件的源代码下载以及安装和使用方法，可以参看:<br />
<a href="http://js8.in/wordpress-weather">http://js8.in/wordpress-weather</a>
<div class="copyright">
<strong>声明：</strong>文章未声明为原创文章，本文链接 <a href="http://js8.in/404.html" title="WordPress插件开发之Widget侧边栏挂件插件">http://js8.in/404.html</a>. 转载请注明转自<a href="http://js8.in" title="前端开发博客"> JS8.IN ™</a></span></span></div>
<h3 class="box-title">随机文章</h3>
<ul class="box_random">
<li><a href="http://js8.in/556.html" title="前端开发常见图片格式详解" rel="bookmark inlinks">前端开发常见图片格式详解</a></li>
<li><a href="http://js8.in/607.html" title="提高Firefox的innerHTML()的性能" rel="bookmark inlinks">提高Firefox的innerHTML()的性能</a></li>
<li><a href="http://js8.in/43.html" title="对Zblog的页面分页链接的修改" rel="bookmark inlinks">对Zblog的页面分页链接的修改</a></li>
<li><a href="http://js8.in/630.html" title="我开发的新浪微博应用：微博送祝福" rel="bookmark inlinks">我开发的新浪微博应用：微博送祝福</a></li>
<li><a href="http://js8.in/236.html" title="淘宝秒杀门事件始末" rel="bookmark inlinks">淘宝秒杀门事件始末</a></li>
<li><a href="http://js8.in/463.html" title="使用JavaScript在IE和Firefox下进行iframe的DOM操作" rel="bookmark inlinks">使用JavaScript在IE和Firefox下进行iframe的DOM操作</a></li>
<li><a href="http://js8.in/445.html" title="Google AdWords免费广告费用申请下来了" rel="bookmark inlinks">Google AdWords免费广告费用申请下来了</a></li>
<li><a href="http://js8.in/530.html" title="断桥残雪爱墙出国啦！" rel="bookmark inlinks">断桥残雪爱墙出国啦！</a></li>
</ul>
<hr />
<p><small>© 三水清 for <a href="http://js8.in">三水清</a>, 2009. |
<a href="http://js8.in/404.html#comments">7 comments</a> |在微博关注我：<a href="//weibo.com/sanshuiqing" target="_blank" title="关注断桥残雪的新浪微博">@清-三水清</a>
<br/>收藏到：
<a rel="nofollow" href="http://share.renren.com/share/buttonshare.do?link=%posturl%&title=%posttitle%" title="收藏本文到人人网" target="_blank">人人网</a> | <a rel="nofollow" href="http://www.douban.com/recommend/?url=%posturl%&title=%posttitle%" title="收藏本文到豆瓣" target="_blank">豆瓣</a> | <a rel="nofollow" href="http://www.kaixin001.com/repaste/share.php?rtitle=%posttitle%&rurl=%posturl%" title="收藏本文到开心网" target="_blank">开心网</a> | <a rel="nofollow" href="http://shuqian.qq.com/post?title=%posttitle%&%20uri=%posturl%" title="收藏本文到QQ书签" target="_blank">QQ书签</a> | <a rel="nofollow" href="http://v.t.sina.com.cn/share/share.php?url=%posturl%&title=%posttitle%" title="收藏本文到新浪微博" target="_blank">新浪微博</a> | <a rel="nofollow" href="http://v.t.qq.com/share/share.php?title=%posttitle%&url=%posturl%&site=http://www.kaixin100.info" title="收藏本文到腾讯微博" target="_blank">腾讯微博</a>
<br/>
Post tags: <a href="http://js8.in/tag/wordpress" rel="tag">wordpress</a><br/>
</small></p><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">猜你喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="Wordpress Follow5 插件开发日记—插件后台Ajax应用及jQuery的使用" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F346.html&from=http%3A%2F%2Fjs8.in%2F404.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10980604.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Wordpress Follow5 插件开发日记—插件后台Ajax应用及jQuery的使用</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="三个使用WordPress自定义域做的小工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F436.html&from=http%3A%2F%2Fjs8.in%2F404.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10979536.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">三个使用WordPress自定义域做的小工具</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="七大让WordPress后台管理界面更漂亮的WP插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F465.html&from=http%3A%2F%2Fjs8.in%2F404.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/07/09/16776541.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">七大让WordPress后台管理界面更漂亮的WP插件</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="六个精美的WordPress圣诞插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F385.html&from=http%3A%2F%2Fjs8.in%2F404.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/18/11027118.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">六个精美的WordPress圣诞插件</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://js8.in/404.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>六个精美的WordPress圣诞插件</title>
		<link>http://js8.in/385.html</link>
		<comments>http://js8.in/385.html#comments</comments>
		<pubDate>Sat, 19 Dec 2009 02:12:25 +0000</pubDate>
		<dc:creator>三水清</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[网络技术]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[圣诞节]]></category>
		<category><![CDATA[插件]]></category>

		<guid isPermaLink="false">http://www.js8.in/?p=385</guid>
		<description><![CDATA[圣诞节马上就要到了， 大家是否感觉自己的页面有点空虚，圣诞节我们的WordPress也应该圣诞一把，come on，让我来看看有哪些精美的WordPress圣诞节插件。<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">猜你喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress插件开发之Widget侧边栏挂件插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F404.html&from=http%3A%2F%2Fjs8.in%2F385.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/11009724.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress插件开发之Widget侧边栏挂件插件</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress Follow5插件发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F352.html&from=http%3A%2F%2Fjs8.in%2F385.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10982263.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress Follow5插件发布</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="七大让WordPress后台管理界面更漂亮的WP插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F465.html&from=http%3A%2F%2Fjs8.in%2F385.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/07/09/16776541.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">七大让WordPress后台管理界面更漂亮的WP插件</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="发布WordPress来访者天气预报插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F374.html&from=http%3A%2F%2Fjs8.in%2F385.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10977484.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">发布WordPress来访者天气预报插件</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>圣诞节马上就要到了， 大家是否感觉自己的页面有点空虚，<strong>圣诞节</strong>我们的WordPress也应该圣诞一把，come on，让我来看看有哪些精美的<strong>WordPress</strong>圣诞节插件。</p>
<h3>1、Christmas Countdown 圣诞倒计时</h3>
<div id="attachment_384" class="wp-caption alignnone" style="width: 360px"><a href="http://js8.in/wp-content/uploads/2009/12/screenshot-2.png"><img class="size-full wp-image-384" title="Christmas Countdown" src="http://js8.in/wp-content/uploads/2009/12/screenshot-2.png" alt="Christmas Countdown" width="350" height="117" /></a><p class="wp-caption-text">Christmas Countdown</p></div>
<p>一个很漂亮的圣诞倒计时<strong>Widget插件</strong>，可以显示距离圣诞节还有多少时间，是个一个flash，带着飘雪的效果。<br />
演示地址：<a target="_blank" href="http://christmas0.com/" target="_blank">http://christmas0.com/</a><br />
下载地址：<a target="_blank" href="http://wordpress.org/extend/plugins/christmas-countdown/" target="_blank">http://wordpress.org/extend/plugins/christmas-countdown/</a></p>
<h3>2、WP-Christmas一对小雪人</h3>
<div id="attachment_386" class="wp-caption alignnone" style="width: 288px"><a href="http://js8.in/wp-content/uploads/2009/12/screenshot-2-1.png"><img class="size-full wp-image-386" title="圣诞雪人" src="http://js8.in/wp-content/uploads/2009/12/screenshot-2-1.png" alt="一对小雪人" width="278" height="232" /></a><p class="wp-caption-text">一对小雪人</p></div>
<p>国人产品，一对雪人祝大家圣诞快乐! 飘着小雪。感觉还不错，就是<strong>Flash</strong>做工有点差。<br />
演示地址：<a target="_blank" href="http://liucheng.name/1166/" target="_blank">http://liucheng.name/1166/</a><br />
下载地址：<a target="_blank" href="http://wordpress.org/extend/plugins/wp-christmas/" target="_blank">http://wordpress.org/extend/plugins/wp-christmas/</a><br />
<span id="more-385"></span></p>
<h3>3、iCaughtSanta ( Falling Snow )</h3>
<div id="attachment_387" class="wp-caption alignnone" style="width: 310px"><a href="http://js8.in/wp-content/uploads/2009/12/screenshot-2-2.png"><img class="size-medium wp-image-387" title="iCaughtSanta ( Falling Snow )" src="http://js8.in/wp-content/uploads/2009/12/screenshot-2-2-300x160.png" alt="iCaughtSanta ( Falling Snow )漂亮的降雪" width="300" height="160" /></a><p class="wp-caption-text">iCaughtSanta ( Falling Snow )漂亮的降雪</p></div>
<p>增加了一个美丽的<strong>飘雪效果</strong>的任何WordPress的网站。让访问者体验这个奇妙的<strong>冬天</strong>的景色。<br />
演示地址：<a target="_blank" href="http://www.icaughtsanta.com/ics-snow-plugin/" target="_blank">http://www.icaughtsanta.com/ics-snow-plugin/</a><br />
下载地址：<a target="_blank" href="http://wordpress.org/extend/plugins/icaughtsanta-falling-snow/" target="_blank">http://wordpress.org/extend/plugins/icaughtsanta-falling-snow/</a></p>
<h3>4、Let It Snow!让它下雪吧！</h3>
<div id="attachment_388" class="wp-caption alignnone" style="width: 492px"><a href="http://js8.in/wp-content/uploads/2009/12/Snap41.jpg"><img class="size-full wp-image-388" title="Let It Snow" src="http://js8.in/wp-content/uploads/2009/12/Snap41.jpg" alt="漂亮的下雪wp插件" width="482" height="330" /></a><p class="wp-caption-text">漂亮的下雪wp插件</p></div>
<p>这是一个小雪花插件，提供细小的点状<strong>雪花</strong>效果，著名的 WordPress.com 目前就使用的这种雪花效果。我个人比较喜欢这个<strong>雪花插件</strong>，效果比较细腻，不仔细看还看不出来。<br />
<span style="background-color: #ffffff;">演示地址：<a target="_blank" href="http://www.theorchardsblog.net/" target="_blank">http://www.theorchardsblog.net/</a><br />
下载地址：<a target="_blank" href="http://wordpress.org/extend/plugins/let-it-snow/" target="_blank">http://wordpress.org/extend/plugins/let-it-snow/</a> </span></p>
<h3>5、Snow, balloons and more 想下啥就下啥！</h3>
<div id="attachment_389" class="wp-caption alignnone" style="width: 309px"><a href="http://js8.in/wp-content/uploads/2009/12/Snap5.jpg"><img class="size-full wp-image-389" title="Snow, balloons and more" src="http://js8.in/wp-content/uploads/2009/12/Snap5.jpg" alt="雪花、叶子、瓶子甚至刀子，想下啥就下啥！" width="299" height="149" /></a><p class="wp-caption-text">雪花、叶子、瓶子甚至刀子，想下啥就下啥！</p></div>
<p><span style="background-color: #ffffff;">这是一款 <strong>WordPress</strong> 上比较老的雪花效果插件，提供那种大片的结晶的雪花，圣诞老人图片。但是它又不仅仅是一款<strong>下雪</strong>效果插件，还提供了落叶效果 ，它的图片是可以更改的，只要你高兴下刀子都没有问题。<br />
演示地址：<a target="_blank" href="http://www.nkuttler.de/wordpress/snow-balloons-and-more/" target="_blank">http://www.nkuttler.de/wordpress/snow-balloons-and-more/<br />
</a>下载地址：<a target="_blank" href="http://wordpress.org/extend/plugins/nksnow/" target="_blank">http://wordpress.org/extend/plugins/nksnow/</a></span></p>
<h3>6、最后推荐一下自己的WordPress天气插件</h3>
<div id="attachment_375" class="wp-caption alignnone" style="width: 263px"><a href="http://js8.in/wp-content/uploads/2009/12/screenshot.jpg"><img class="size-full wp-image-375" title="WordPress来访者天气预报插件截图" src="http://js8.in/wp-content/uploads/2009/12/screenshot.jpg" alt="WordPress来访者天气预报插件截图" width="253" height="199" /></a><p class="wp-caption-text">WordPress来访者天气预报插件截图</p></div>
<p>WordPress来访者<strong>天气预报插件</strong>采用精美的天气图标，完全DIV+CSS页面布局，保证了页面的美观大气，数据库信息来自中国气象网，保证了数据的可靠性，并且熟悉CSS的童鞋还可以修改插件中的CSS，以达到自己喜欢的页面效果。css地址为wp-content\plugins\weather\css.css<br />
演示地址：<a href="http://js8.in" target="_blank">http://js8.in</a><br />
<span style="background-color: #ffffff; ">下载地址：<a href="http://js8.in/wordpress-weather" target="_blank">http://js8.in/wordpress-weather </a></span>
<div class="copyright">
<strong>声明：</strong>文章未声明为原创文章，本文链接 <a href="http://js8.in/385.html" title="六个精美的WordPress圣诞插件">http://js8.in/385.html</a>. 转载请注明转自<a href="http://js8.in" title="前端开发博客"> JS8.IN ™</a></span></span></div>
<h3 class="box-title">随机文章</h3>
<ul class="box_random">
<li><a href="http://js8.in/685.html" title="[转]利用跨域资源共享（CORS）实现ajax跨域调用" rel="bookmark inlinks">[转]利用跨域资源共享（CORS）实现ajax跨域调用</a></li>
<li><a href="http://js8.in/558.html" title="onbeforeunload与a标签在IE中的冲突bug" rel="bookmark inlinks">onbeforeunload与a标签在IE中的冲突bug</a></li>
<li><a href="http://js8.in/834.html" title="chrome扩展应用开发教程之天气预报应用开发" rel="bookmark inlinks">chrome扩展应用开发教程之天气预报应用开发</a></li>
<li><a href="http://js8.in/468.html" title="2fool.cn域名健在，爱墙升级" rel="bookmark inlinks">2fool.cn域名健在，爱墙升级</a></li>
<li><a href="http://js8.in/289.html" title="用批处理说中文！" rel="bookmark inlinks">用批处理说中文！</a></li>
<li><a href="http://js8.in/591.html" title="切换订阅地址到feedsky" rel="bookmark inlinks">切换订阅地址到feedsky</a></li>
<li><a href="http://js8.in/450.html" title="jQuery1.4正式版新功能及性能测试" rel="bookmark inlinks">jQuery1.4正式版新功能及性能测试</a></li>
<li><a href="http://js8.in/23.html" title="园艺学院网站内测！开始，欢迎访问" rel="bookmark inlinks">园艺学院网站内测！开始，欢迎访问</a></li>
</ul>
<hr />
<p><small>© 三水清 for <a href="http://js8.in">三水清</a>, 2009. |
<a href="http://js8.in/385.html#comments">6 comments</a> |在微博关注我：<a href="//weibo.com/sanshuiqing" target="_blank" title="关注断桥残雪的新浪微博">@清-三水清</a>
<br/>收藏到：
<a rel="nofollow" href="http://share.renren.com/share/buttonshare.do?link=%posturl%&title=%posttitle%" title="收藏本文到人人网" target="_blank">人人网</a> | <a rel="nofollow" href="http://www.douban.com/recommend/?url=%posturl%&title=%posttitle%" title="收藏本文到豆瓣" target="_blank">豆瓣</a> | <a rel="nofollow" href="http://www.kaixin001.com/repaste/share.php?rtitle=%posttitle%&rurl=%posturl%" title="收藏本文到开心网" target="_blank">开心网</a> | <a rel="nofollow" href="http://shuqian.qq.com/post?title=%posttitle%&%20uri=%posturl%" title="收藏本文到QQ书签" target="_blank">QQ书签</a> | <a rel="nofollow" href="http://v.t.sina.com.cn/share/share.php?url=%posturl%&title=%posttitle%" title="收藏本文到新浪微博" target="_blank">新浪微博</a> | <a rel="nofollow" href="http://v.t.qq.com/share/share.php?title=%posttitle%&url=%posturl%&site=http://www.kaixin100.info" title="收藏本文到腾讯微博" target="_blank">腾讯微博</a>
<br/>
Post tags: <a href="http://js8.in/tag/wordpress" rel="tag">wordpress</a>, <a href="http://js8.in/tag/%e5%9c%a3%e8%af%9e%e8%8a%82" rel="tag">圣诞节</a>, <a href="http://js8.in/tag/%e6%8f%92%e4%bb%b6" rel="tag">插件</a><br/>
</small></p><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">猜你喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress插件开发之Widget侧边栏挂件插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F404.html&from=http%3A%2F%2Fjs8.in%2F385.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/11009724.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress插件开发之Widget侧边栏挂件插件</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress Follow5插件发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F352.html&from=http%3A%2F%2Fjs8.in%2F385.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10982263.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress Follow5插件发布</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="七大让WordPress后台管理界面更漂亮的WP插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F465.html&from=http%3A%2F%2Fjs8.in%2F385.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/07/09/16776541.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">七大让WordPress后台管理界面更漂亮的WP插件</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="发布WordPress来访者天气预报插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F374.html&from=http%3A%2F%2Fjs8.in%2F385.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10977484.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">发布WordPress来访者天气预报插件</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://js8.in/385.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>发布WordPress来访者天气预报插件</title>
		<link>http://js8.in/374.html</link>
		<comments>http://js8.in/374.html#comments</comments>
		<pubDate>Sat, 12 Dec 2009 01:43:44 +0000</pubDate>
		<dc:creator>三水清</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[网络技术]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[天气预报]]></category>

		<guid isPermaLink="false">http://www.js8.in/?p=374</guid>
		<description><![CDATA[WordPress来访者天气预报插件采用精美的天气图标，完全DIV+CSS页面布局，保证了页面的美观大气，数据库信息来自中国气象网，保证了数据的可靠性，并且熟悉CSS的童鞋还可以修改插件中的CSS，以达到自己喜欢的页面效果<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">猜你喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="七大让WordPress后台管理界面更漂亮的WP插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F465.html&from=http%3A%2F%2Fjs8.in%2F374.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/07/09/16776541.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">七大让WordPress后台管理界面更漂亮的WP插件</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress Follow5插件发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F352.html&from=http%3A%2F%2Fjs8.in%2F374.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10982263.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress Follow5插件发布</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="三个使用WordPress自定义域做的小工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F436.html&from=http%3A%2F%2Fjs8.in%2F374.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10979536.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">三个使用WordPress自定义域做的小工具</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress插件开发之Widget侧边栏挂件插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F404.html&from=http%3A%2F%2Fjs8.in%2F374.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/11009724.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress插件开发之Widget侧边栏挂件插件</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>细心的童鞋会发现我的博客昨天添加了一个新的功能——<strong>天气预报</strong>，昨天我说要发布给大家的，晚上睡觉之前，想了很久关于WordPress<strong>天气插件</strong>的编写，基本上在晚上就已经理清了思路，早上很早就起床了，没有吃饭就来到公司，趁着大家还没有来的时候，我要在九点上班之前把WordPress来访者天气预报的插件做出来，加上之前开发的<a href="http://js8.in/352.html" target="_blank">WordPress Follow5 插件</a>开发经验，自己写<a title="WordPress天气插件下载" href="http://js8.in/wordpress-weather" target="_self"><strong>WordPress来访者天气插件</strong></a>已经是轻车熟路了~</p>
<p>这个插件的使用的是<strong>jsonp技术</strong>，首先通过QQ的ip接口（http://fw.qq.com/ipaddress）获取到来访者的城市<strong>地理信息</strong>，然后使用WordPress的wp_footer的hook动态建立一个JavaScript文件，文件地址为我博客的<a title="WordPress天气插件下载" href="http://js8.in/weather/wordpress-weather" target="_blank">http://js8.in/weather/js.php</a>，js.php返回的是一段JavaScript代码，代码使用innerHTML插入来访者天气预报的内容。</p>
<p>WordPress来访者天气预报插件采用<strong>精美的天气图标</strong>，完全DIV+CSS页面布局，保证了页面的美观大气，数据库信息来自中国气象网，保证了数据的可靠性，并且熟悉CSS的童鞋还可以修改插件中的CSS，以达到自己喜欢的页面效果。css地址为wp-content\plugins\weather\css.css</p>
<p><strong>插件</strong>如不能正常使用，请看以下注意事项：</p>
<blockquote><p>1、保证您的主题皮肤中的footer.php中存在<strong>do_action(&#8217;wp_footer&#8217;);</strong>函数</p>
<p>2、如出现其他情况，请来<a href="http://js8.in/374.html " target="_blank">插件页面</a>报错</p></blockquote>
<div id="attachment_375" class="wp-caption alignnone" style="width: 263px"><a href="http://js8.in/wp-content/uploads/2009/12/screenshot.jpg"><img class="size-full wp-image-375" title="WordPress来访者天气预报插件截图" src="http://js8.in/wp-content/uploads/2009/12/screenshot.jpg" alt="WordPress来访者天气预报插件截图" width="253" height="199" /></a><p class="wp-caption-text">WordPress来访者天气预报插件截图</p></div>
<p>使用方法：</p>
<blockquote><p>1、下载插件（<a href="http://js8.in/weather/vistor_weather.zip" target="_blank">点击下载</a>）并上传到wp-content\plugins目录中；<br />
2、登录网站后台安装此插件；<br />
3、然后进入“外观”，“小工具”，把“<strong>Weather Widget</strong>”小工具拖到右侧，填写插件显示名称（如：<strong>天气预报</strong>）即可。</p></blockquote>
<p style="overflow-x: hidden; overflow-y: hidden; padding: 0px; margin: 0px;"><strong><span style="overflow-x: hidden; overflow-y: hidden; color: #ff0000;"><strong>最后更新时间：2009-12-12 8：55</strong></span></strong></p>
<p style="overflow-x: hidden; overflow-y: hidden; padding: 0px; margin: 0px;"><strong>下载地址：<a style="overflow-x: hidden; overflow-y: hidden; text-decoration: underline; color: #3b8c12;" href="http://js8.in/weather/vistor_weather.zip">http://js8.in/weather/vistor_weather.zip</a></strong><br style="overflow-x: hidden; overflow-y: hidden;" /><strong></strong></p>
<p style="overflow-x: hidden; overflow-y: hidden; padding: 0px; margin: 0px;"><strong>当前最新版本为：0.1</strong></p>
<div class="copyright">
<strong>声明：</strong>文章未声明为原创文章，本文链接 <a href="http://js8.in/374.html" title="发布WordPress来访者天气预报插件">http://js8.in/374.html</a>. 转载请注明转自<a href="http://js8.in" title="前端开发博客"> JS8.IN ™</a></span></span></div>
<h3 class="box-title">随机文章</h3>
<ul class="box_random">
<li><a href="http://js8.in/381.html" title="使用if IE hack注释解决CSS以及JS的兼容问题" rel="bookmark inlinks">使用if IE hack注释解决CSS以及JS的兼容问题</a></li>
<li><a href="http://js8.in/249.html" title="懂爱" rel="bookmark inlinks">懂爱</a></li>
<li><a href="http://js8.in/467.html" title="Javascript设置光标位置到结尾并显示出来" rel="bookmark inlinks">Javascript设置光标位置到结尾并显示出来</a></li>
<li><a href="http://js8.in/53.html" title="08.11.19" rel="bookmark inlinks">08.11.19</a></li>
<li><a href="http://js8.in/283.html" title="jQuery+google weather API轻松实现天气地图（二）" rel="bookmark inlinks">jQuery+google weather API轻松实现天气地图（二）</a></li>
<li><a href="http://js8.in/951.html" title="【PPT分享】XSS注入和防范" rel="bookmark inlinks">【PPT分享】XSS注入和防范</a></li>
<li><a href="http://js8.in/527.html" title="断桥残雪爱墙IE发布祝福bug更新" rel="bookmark inlinks">断桥残雪爱墙IE发布祝福bug更新</a></li>
<li><a href="http://js8.in/665.html" title="委员们又闹笑话了" rel="bookmark inlinks">委员们又闹笑话了</a></li>
</ul>
<hr />
<p><small>© 三水清 for <a href="http://js8.in">三水清</a>, 2009. |
<a href="http://js8.in/374.html#comments">5 comments</a> |在微博关注我：<a href="//weibo.com/sanshuiqing" target="_blank" title="关注断桥残雪的新浪微博">@清-三水清</a>
<br/>收藏到：
<a rel="nofollow" href="http://share.renren.com/share/buttonshare.do?link=%posturl%&title=%posttitle%" title="收藏本文到人人网" target="_blank">人人网</a> | <a rel="nofollow" href="http://www.douban.com/recommend/?url=%posturl%&title=%posttitle%" title="收藏本文到豆瓣" target="_blank">豆瓣</a> | <a rel="nofollow" href="http://www.kaixin001.com/repaste/share.php?rtitle=%posttitle%&rurl=%posturl%" title="收藏本文到开心网" target="_blank">开心网</a> | <a rel="nofollow" href="http://shuqian.qq.com/post?title=%posttitle%&%20uri=%posturl%" title="收藏本文到QQ书签" target="_blank">QQ书签</a> | <a rel="nofollow" href="http://v.t.sina.com.cn/share/share.php?url=%posturl%&title=%posttitle%" title="收藏本文到新浪微博" target="_blank">新浪微博</a> | <a rel="nofollow" href="http://v.t.qq.com/share/share.php?title=%posttitle%&url=%posturl%&site=http://www.kaixin100.info" title="收藏本文到腾讯微博" target="_blank">腾讯微博</a>
<br/>
Post tags: <a href="http://js8.in/tag/plugin" rel="tag">plugin</a>, <a href="http://js8.in/tag/wordpress" rel="tag">wordpress</a>, <a href="http://js8.in/tag/%e5%a4%a9%e6%b0%94%e9%a2%84%e6%8a%a5" rel="tag">天气预报</a><br/>
</small></p><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">猜你喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="七大让WordPress后台管理界面更漂亮的WP插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F465.html&from=http%3A%2F%2Fjs8.in%2F374.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/07/09/16776541.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">七大让WordPress后台管理界面更漂亮的WP插件</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress Follow5插件发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F352.html&from=http%3A%2F%2Fjs8.in%2F374.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10982263.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress Follow5插件发布</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="三个使用WordPress自定义域做的小工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F436.html&from=http%3A%2F%2Fjs8.in%2F374.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10979536.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">三个使用WordPress自定义域做的小工具</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress插件开发之Widget侧边栏挂件插件" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F404.html&from=http%3A%2F%2Fjs8.in%2F374.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/11009724.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress插件开发之Widget侧边栏挂件插件</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://js8.in/374.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>chrome字体最小值12px问题及解决方法</title>
		<link>http://js8.in/341.html</link>
		<comments>http://js8.in/341.html#comments</comments>
		<pubDate>Fri, 20 Nov 2009 02:30:31 +0000</pubDate>
		<dc:creator>三水清</dc:creator>
				<category><![CDATA[网络技术]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[css hack]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.js8.in/341.html</guid>
		<description><![CDATA[昨天我修改自己的WordPress天气插件的时候，发现一个比较有趣的问题：chrome竟然最小的字体是12px，而小于12px的数值，百分比之类的都不起左右，都是显示12px。
对于这个问题，我上google搜索了半天也没有结果，本来因为是css出现了问题，测试了好多次都不行，于是最后来了个style=&#8221;font-size:10px&#8221;都没有显示成功，之后我写了一段代码在本地测试，还是不行，问了同事，同事都是表示不知道。
后来是怀疑自己的html声明写错了，可是更换了标准声明还是不行，至今还是表示疑惑，找到了客户端设置chrome的方法，而没有css hack的方法没有找到，希望高手给个css hack解决的方法。
WordPress天气预报插件地址：http://js8.in/mywork/weather
demo地址：http://js8.in/mywork/weather/demo.php?city=0532
 
解决方法
1.将chrome的界面语言改成英文,方法:扳手-选项-高级选项-更改字体和语言设置-语言-谷歌浏览器语言 将这里的改成英语(美国)之类
2.
Basically, the Chrome browser is based on WebKit. There are some webkit internal font setting options for font family, font size, etc.
Using text editor to open &#8220;Documents and Settings\User_Name\Local Settings\Application Data\Google\Chrome\User Data\Default\Preferences&#8221;
You will find the &#8220;webkit&#8221;: {  &#8220;webprefs&#8221;: { in the file. Those settings are for WebKit.
In my setting example:
 [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">猜你喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="Opera Chrome Safari浏览器的CSS Hack方法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F397.html&from=http%3A%2F%2Fjs8.in%2F341.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/06/11/11779216.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Opera Chrome Safari浏览器的CSS Hack方法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="使用if IE hack注释解决CSS以及JS的兼容问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F381.html&from=http%3A%2F%2Fjs8.in%2F341.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10979211.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">使用if IE hack注释解决CSS以及JS的兼容问题</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="css解决chrome 12px字号限制" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F625.html&from=http%3A%2F%2Fjs8.in%2F341.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10979712.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css解决chrome 12px字号限制</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="主流浏览器的CSS Hack方法整理" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F382.html&from=http%3A%2F%2Fjs8.in%2F341.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/7942769.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">主流浏览器的CSS Hack方法整理</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>昨天我修改自己的<a href="http://js8.in/mywork/weather/">WordPress天气插件</a>的时候，发现一个比较有趣的问题：<strong>chrome</strong>竟然最小的字体是12px，而小于12px的数值，百分比之类的都不起左右，都是显示<strong>12px</strong>。<br />
对于这个问题，我上google搜索了半天也没有结果，本来因为是css出现了问题，测试了好多次都不行，于是最后来了个style=&#8221;font-size:10px&#8221;都没有显示成功，之后我写了一段代码在本地测试，还是不行，问了同事，同事都是表示不知道。<br />
后来是怀疑自己的html声明写错了，可是更换了标准声明还是不行，至今还是表示疑惑，找到了客户端设置chrome的方法，而没有css hack的方法没有找到，希望高手给个<strong>css hack</strong>解决的方法。<br />
WordPress天气预报插件地址：http://js8.in/mywork/weather<br />
demo地址：http://js8.in/mywork/weather/demo.php?city=0532<br />
<a href="http://js8.in/mywork/weather/" target="_blank"><img class="alignnone size-full wp-image-339" title="火狐下正常显示11px，布局正确" src="http://js8.in/wp-content/uploads/2009/11/Snap21.jpg" alt="火狐下正常显示11px，布局正确" width="198" height="253" /></a> <a href="http://js8.in/mywork/weather/" target="_blank"><img class="alignnone size-full wp-image-340" title="chrome下顶部日期显示的是12px" src="http://js8.in/wp-content/uploads/2009/11/Snap31.jpg" alt="chrome下顶部日期显示的是12px" width="201" height="253" /></a><br />
<h3>解决方法</h3>
<p><span id="more-341"></span>1.将chrome的界面语言改成英文,方法:扳手-选项-高级选项-更改字体和语言设置-语言-谷歌浏览器语言 将这里的改成英语(美国)之类<br />
2.<br />
<blockquote>Basically, the Chrome browser is based on WebKit. There are some webkit internal font setting options for font family, font size, etc.<br />
Using text editor to open &#8220;Documents and Settings\User_Name\Local Settings\Application Data\Google\Chrome\User Data\Default\Preferences&#8221;<br />
You will find the &#8220;webkit&#8221;: {  &#8220;webprefs&#8221;: { in the file. Those settings are for WebKit.<br />
In my setting example:<br />
   &#8220;webkit&#8221;: {<br />
      &#8220;webprefs&#8221;: {<br />
         &#8220;default_fixed_font_size&#8221;: 11,<br />
         &#8220;default_font_size&#8221;: 12,<br />
         &#8220;fixed_font_family&#8221;: &#8220;Bitstream Vera Sans Mono&#8221;,<br />
         &#8220;minimum_font_size&#8221;: 12,<br />
         &#8220;minimum_logical_font_siz&#8221;: 12,<br />
         &#8220;sansserif_font_family&#8221;: &#8220;Times New Roman&#8221;,<br />
         &#8220;serif_font_family&#8221;: &#8220;Arial&#8221;,<br />
         &#8220;standard_font_is_serif&#8221;: false,<br />
         &#8220;text_areas_are_resizable&#8221;: true<br />
      }<br />
   }<br />
The minimum_font_size and minimum_logical_font_size prevent Chrome to use very small font size for display.<br />
Remember to close Chrome first before you edit the file, or the file you saved will be overwritten by Chome after exiting.</p></blockquote>
<div class="copyright">
<strong>声明：</strong>文章未声明为原创文章，本文链接 <a href="http://js8.in/341.html" title="chrome字体最小值12px问题及解决方法">http://js8.in/341.html</a>. 转载请注明转自<a href="http://js8.in" title="前端开发博客"> JS8.IN ™</a></span></span></div>
<h3 class="box-title">随机文章</h3>
<ul class="box_random">
<li><a href="http://js8.in/407.html" title="使用ZeroClipboard解决跨浏览器复制到剪贴板的问题" rel="bookmark inlinks">使用ZeroClipboard解决跨浏览器复制到剪贴板的问题</a></li>
<li><a href="http://js8.in/502.html" title="jQuery插件--wBox发布" rel="bookmark inlinks">jQuery插件&#8211;wBox发布</a></li>
<li><a href="http://js8.in/674.html" title="使用xdebug调试PHP 找出PHP程序的瓶颈" rel="bookmark inlinks">使用xdebug调试PHP 找出PHP程序的瓶颈</a></li>
<li><a href="http://js8.in/551.html" title="一款模仿Mac的windows7主题包" rel="bookmark inlinks">一款模仿Mac的windows7主题包</a></li>
<li><a href="http://js8.in/944.html" title="IE6中a标签触发图片和ajax请求被abort" rel="bookmark inlinks">IE6中a标签触发图片和ajax请求被abort</a></li>
<li><a href="http://js8.in/527.html" title="断桥残雪爱墙IE发布祝福bug更新" rel="bookmark inlinks">断桥残雪爱墙IE发布祝福bug更新</a></li>
<li><a href="http://js8.in/270.html" title="病毒清除啦~可是似乎xp中访问博客还是很慢！" rel="bookmark inlinks">病毒清除啦~可是似乎xp中访问博客还是很慢！</a></li>
<li><a href="http://js8.in/468.html" title="2fool.cn域名健在，爱墙升级" rel="bookmark inlinks">2fool.cn域名健在，爱墙升级</a></li>
</ul>
<p style="margin:0;padding:0;height:1px;overflow:hidden;">
    <script type="text/javascript"><!--
        var wumiiSitePrefix = "http://js8.in";
        var wumiiEnableCustomPos = false;
        var wumiiParams = "&#038;num=4&#038;mode=3&#038;displayInFeed=1&#038;version=1.0.5.5&#038;pf=WordPress2.8.6";
    //--></script></p>
<hr />
<p><small>© 三水清 for <a href="http://js8.in">三水清</a>, 2009. |
<a href="http://js8.in/341.html#comments">18 comments</a> |在微博关注我：<a href="//weibo.com/sanshuiqing" target="_blank" title="关注断桥残雪的新浪微博">@清-三水清</a>
<br/>收藏到：
<a rel="nofollow" href="http://share.renren.com/share/buttonshare.do?link=%posturl%&title=%posttitle%" title="收藏本文到人人网" target="_blank">人人网</a> | <a rel="nofollow" href="http://www.douban.com/recommend/?url=%posturl%&title=%posttitle%" title="收藏本文到豆瓣" target="_blank">豆瓣</a> | <a rel="nofollow" href="http://www.kaixin001.com/repaste/share.php?rtitle=%posttitle%&rurl=%posturl%" title="收藏本文到开心网" target="_blank">开心网</a> | <a rel="nofollow" href="http://shuqian.qq.com/post?title=%posttitle%&%20uri=%posturl%" title="收藏本文到QQ书签" target="_blank">QQ书签</a> | <a rel="nofollow" href="http://v.t.sina.com.cn/share/share.php?url=%posturl%&title=%posttitle%" title="收藏本文到新浪微博" target="_blank">新浪微博</a> | <a rel="nofollow" href="http://v.t.qq.com/share/share.php?title=%posttitle%&url=%posturl%&site=http://www.kaixin100.info" title="收藏本文到腾讯微博" target="_blank">腾讯微博</a>
<br/>
Post tags: <a href="http://js8.in/tag/chrome" rel="tag">chrome</a>, <a href="http://js8.in/tag/css-hack" rel="tag">css hack</a>, <a href="http://js8.in/tag/wordpress" rel="tag">wordpress</a><br/>
</small></p><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">猜你喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="Opera Chrome Safari浏览器的CSS Hack方法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F397.html&from=http%3A%2F%2Fjs8.in%2F341.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/06/11/11779216.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Opera Chrome Safari浏览器的CSS Hack方法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="使用if IE hack注释解决CSS以及JS的兼容问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F381.html&from=http%3A%2F%2Fjs8.in%2F341.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10979211.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">使用if IE hack注释解决CSS以及JS的兼容问题</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="css解决chrome 12px字号限制" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F625.html&from=http%3A%2F%2Fjs8.in%2F341.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/10979712.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css解决chrome 12px字号限制</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="主流浏览器的CSS Hack方法整理" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fjs8.in%2F382.html&from=http%3A%2F%2Fjs8.in%2F341.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/17/7942769.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">主流浏览器的CSS Hack方法整理</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://js8.in/341.html/feed</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
	</channel>
</rss>

