<?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>博优谷 &#187; 代码</title> <atom:link href="http://www.canfree.com/tag/%e4%bb%a3%e7%a0%81/feed" rel="self" type="application/rss+xml" /><link>http://www.canfree.com</link> <description>博优谷是知名的IT评论博客，探讨网站优化，网上赚钱，免费资源，站长工具，站长新闻等资讯</description> <lastBuildDate>Sun, 05 Feb 2012 15:46:40 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.2.1</generator> <item><title>wordpress非插件实现中英文字符串截断</title><link>http://www.canfree.com/wordpress-plug-in-implementation-of-non-english-strings-truncated.htm</link> <comments>http://www.canfree.com/wordpress-plug-in-implementation-of-non-english-strings-truncated.htm#comments</comments> <pubDate>Wed, 20 Apr 2011 05:44:22 +0000</pubDate> <dc:creator>博优谷</dc:creator> <category><![CDATA[主题优化]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[代码]]></category> <guid
isPermaLink="false">http://www.canfree.com/?p=1276</guid> <description><![CDATA[有利于SEO的排版样式应该是标题+摘要，摘要可以在写文章时自己添加，也可以通过插件实现，但是插件对中文支持度不够友好。本人推荐用wordpress自带的函数实现，轻量级且中英文支持良好。关于非插件文章截断，在以前的文章中也有介绍，今天重新整理并升级一下。 一，用mb_strimwidth() 函数 如果你的主机支持utf-8的话，这个函数是最佳的，调用代码为 &#60;span&#62;&#60;?php echo mb_strimwidth&#40;strip_tags&#40;apply_filters&#40;'the_content', $post-&#62;post_content&#41;&#41;, 0, 150,&#34;...&#34;&#41;; ?&#62;&#60;/span&#62; 说明一下：0，表示从文章开头开始截图;150,截取到第150个字符；...，摘要末尾的样式。你还可以给span指定样式。 二，用mb_substr() 函数 当你发现第一种方法无效时，可以用这一种 function z_substr&#40;$sourcestr='',$i=0,$cutlength=150,$endstr='...'&#41; &#123; $str_length=strlen&#40;$sourcestr&#41;;//字符串的字节数 while &#40;&#40;$n&#60;$cutlength&#41; and &#40;$i&#60;=$str_length&#41;&#41; &#123; $temp_str=substr&#40;$sourcestr,$i,1&#41;; $ascnum=Ord&#40;$temp_str&#41;;//ascii码 if &#40;$ascnum&#62;=224&#41; &#123; $returnstr=$returnstr.substr&#40;$sourcestr,$i,3&#41;; $i=$i+3; $n++; &#125;elseif &#40;$ascnum&#62;=192&#41; &#123; $returnstr=$returnstr.substr&#40;$sourcestr,$i,2&#41;; $i=$i+2; $n++; &#125;else &#123; $returnstr=$returnstr.substr&#40;$sourcestr,$i,1&#41;; $i=$i+1; $n=$n+0.5; &#125; &#125; if&#40;$i&#60;$str_length&#41;$returnstr.=$endstr; return $returnstr; &#125; 将上面的代码放到functions.php 里，然后用下面的代码调用 &#60;?php echo z_substr&#40;$sourcestr, $i, [...]]]></description> <content:encoded><![CDATA[<p>有利于<a
href="http://www.canfree.com/tag/seo"target="_blank"rel="nofollow"title="查看与[SEO]有关的文章" >SEO</a>的排版样式应该是标题+摘要，摘要可以在写文章时自己添加，也可以通过插件实现，但是插件对中文支持度不够友好。本人推荐用<a
href="http://www.wordpress.org"target="_blank"title="访问[wordpress]" >wordpress</a>自带的函数实现，轻量级且中英文支持良好。关于非插件文章截断，在以前的文章中也有介绍，今天重新整理并升级一下。<br
/> 一，用mb_strimwidth() 函数<br
/> 如果你的主机支持utf-8的话，这个函数是最佳的，调用代码为</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">&lt;span&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #990000;">mb_strimwidth</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">strip_tags</span><span style="color: #009900;">&#40;</span>apply_filters<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_content'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_content</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">150</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;...&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/span&gt;</pre></div></div><p>说明一下：0，表示从文章开头开始截图;150,截取到第150个字符；...，摘要末尾的样式。你还可以给span指定样式。<br
/> 二，用mb_substr() 函数<br
/> 当你发现第一种方法无效时，可以用这一种</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> z_substr<span style="color: #009900;">&#40;</span><span style="color: #000088;">$sourcestr</span><span style="color: #339933;">=</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #000088;">$cutlength</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">150</span><span style="color: #339933;">,</span><span style="color: #000088;">$endstr</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'...'</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$str_length</span><span style="color: #339933;">=</span><span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sourcestr</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//字符串的字节数</span>
	<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$n</span><span style="color: #339933;">&lt;</span><span style="color: #000088;">$cutlength</span><span style="color: #009900;">&#41;</span> and <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&lt;=</span><span style="color: #000088;">$str_length</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$temp_str</span><span style="color: #339933;">=</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sourcestr</span><span style="color: #339933;">,</span><span style="color: #000088;">$i</span><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: #000088;">$ascnum</span><span style="color: #339933;">=</span><span style="color: #990000;">Ord</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$temp_str</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//ascii码</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$ascnum</span><span style="color: #339933;">&gt;=</span><span style="color: #cc66cc;">224</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$returnstr</span><span style="color: #339933;">=</span><span style="color: #000088;">$returnstr</span><span style="color: #339933;">.</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sourcestr</span><span style="color: #339933;">,</span><span style="color: #000088;">$i</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #000088;">$i</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$n</span><span style="color: #339933;">++;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$ascnum</span><span style="color: #339933;">&gt;=</span><span style="color: #cc66cc;">192</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$returnstr</span><span style="color: #339933;">=</span><span style="color: #000088;">$returnstr</span><span style="color: #339933;">.</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sourcestr</span><span style="color: #339933;">,</span><span style="color: #000088;">$i</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #000088;">$i</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$n</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: #000088;">$returnstr</span><span style="color: #339933;">=</span><span style="color: #000088;">$returnstr</span><span style="color: #339933;">.</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sourcestr</span><span style="color: #339933;">,</span><span style="color: #000088;">$i</span><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: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #000088;">$i</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$n</span><span style="color: #339933;">=</span><span style="color: #000088;">$n</span><span style="color: #339933;">+</span><span style="color:#800080;">0.5</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&lt;</span><span style="color: #000088;">$str_length</span><span style="color: #009900;">&#41;</span><span style="color: #000088;">$returnstr</span><span style="color: #339933;">.=</span><span style="color: #000088;">$endstr</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$returnstr</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>将上面的代码放到functions.php 里，然后用下面的代码调用</p><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: #b1b100;">echo</span> z_substr<span style="color: #009900;">&#40;</span><span style="color: #000088;">$sourcestr</span><span style="color: #339933;">,</span> <span style="color: #000088;">$i</span><span style="color: #339933;">,</span> <span style="color: #000088;">$cutlength</span><span style="color: #339933;">,</span> <span style="color: #000088;">$endstr</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div><p>最后将调用代码放到主题</p><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_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div><p>的下面即可。</p> ]]></content:encoded> <wfw:commentRss>http://www.canfree.com/wordpress-plug-in-implementation-of-non-english-strings-truncated.htm/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>给wordpress最新文章标题添加new图标</title><link>http://www.canfree.com/wordpress-title-of-the-article-to-add-a-new-icon-for-the-latest.htm</link> <comments>http://www.canfree.com/wordpress-title-of-the-article-to-add-a-new-icon-for-the-latest.htm#comments</comments> <pubDate>Sun, 17 Apr 2011 14:31:40 +0000</pubDate> <dc:creator>博优谷</dc:creator> <category><![CDATA[主题优化]]></category> <category><![CDATA[gif]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[代码]]></category> <guid
isPermaLink="false">http://www.canfree.com/?p=1268</guid> <description><![CDATA[给wordpress最新文章标题添加一个醒目的图标，有助于访问者区分新旧文章，一般在CMS等大型新闻列表网站常见。当wordpress3.1.1出来后，WP已经成为一个可塑性极高的CMS系统。 博优谷首页高度优化，以纯列表样式展示文章，有利于SEO。若再增加一个靓丽的小图标，定能起到画龙点睛之笔。效果如图所示： 拷贝下面的代码： &#60;?php $t1=$post-&#62;post_date; $t2=date&#40;&#34;Y-m-d H:i:s&#34;&#41;; $diff=&#40;strtotime&#40;$t2&#41;-strtotime&#40;$t1&#41;&#41;/3600; if&#40;$diff&#60;24&#41;&#123;echo '&#60;img src=&#34;'.get_bloginfo&#40;'template_directory'&#41;.'/images/new.gif&#34; /&#62;';&#125; ?&#62; 到相关主题文件 &#60;?php the_title&#40;&#41;; ?&#62; 的下面即可。 你也可以尝试下文字形式的NEW样式代码 &#60;em&#62;&#60;?php $t1=$post-&#62;post_date; $t2=date&#40;&#34;Y-m-d H:i:s&#34;&#41;; $diff=&#40;strtotime&#40;$t2&#41;-strtotime&#40;$t1&#41;&#41;/3600; if&#40;$diff&#60;24&#41;&#123;echo &#34; New!&#34;;&#125; ?&#62;&#60;/em&#62; 给em指定一个CSS样式 .post em&#123;font-size:14px; color:#FF0242;} 关于置顶的关键代码： &#60;?php if &#40;is_sticky&#40;&#41;&#41; &#123;echo &#34;[置顶]&#34;;&#125; ?&#62;]]></description> <content:encoded><![CDATA[<p>给<a
href="http://www.wordpress.org"target="_blank"title="访问[wordpress]" >wordpress</a>最新文章标题添加一个醒目的图标，有助于访问者区分新旧文章，一般在CMS等大型新闻列表网站常见。当wordpress3.1.1出来后，WP已经成为一个可塑性极高的CMS系统。</p><p>博优谷首页高度<a
href="http://www.canfree.com/tag/%e4%bc%98%e5%8c%96"target="_blank"title="查看与[博客优化]有关的文章" >优化</a>，以纯列表样式展示文章，有利于<a
href="http://www.canfree.com/tag/seo"target="_blank"rel="nofollow"title="查看与[SEO]有关的文章" >SEO</a>。若再增加一个靓丽的小图标，定能起到画龙点睛之笔。效果如图所示：</p><p><img
src="http://www.canfree.com/wp-content/uploads/2011/04/QQ截图20110417223246.jpg" alt="QQ截图20110417223246 给wordpress最新文章标题添加new图标" title="wordpress title new gif" width="353" height="81" class="aligncenter size-full wp-image-1270" /></p><p>拷贝下面的代码：</p><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: #000088;">$t1</span><span style="color: #339933;">=</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_date</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$t2</span><span style="color: #339933;">=</span><span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Y-m-d H:i:s&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$diff</span><span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$t2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$t1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">3600</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$diff</span><span style="color: #339933;">&lt;</span><span style="color: #cc66cc;">24</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;img src=&quot;'</span><span style="color: #339933;">.</span>get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/images/new.gif&quot; /&gt;'</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div><p>到相关主题文件</p><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_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div><p>的下面即可。<br
/> 你也可以尝试下文字形式的NEW样式代码</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">&lt;em&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$t1</span><span style="color: #339933;">=</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_date</span><span style="color: #339933;">;</span> <span style="color: #000088;">$t2</span><span style="color: #339933;">=</span><span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Y-m-d H:i:s&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$diff</span><span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$t2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$t1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">3600</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$diff</span><span style="color: #339933;">&lt;</span><span style="color: #cc66cc;">24</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot; New!&quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/em&gt;</pre></div></div><p>给em指定一个CSS样式</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">.</span>post em<span style="color: #009900;">&#123;</span>font<span style="color: #339933;">-</span>size<span style="color: #339933;">:</span>14px<span style="color: #339933;">;</span> color<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">#FF0242;}</span></pre></div></div><p>关于置顶的关键代码：</p><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: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_sticky<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: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;[置顶]&quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div> ]]></content:encoded> <wfw:commentRss>http://www.canfree.com/wordpress-title-of-the-article-to-add-a-new-icon-for-the-latest.htm/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>不用插件让wordpress评论显示Avatar头像</title><link>http://www.canfree.com/realize-wordpress-plugin-comments-avatar.htm</link> <comments>http://www.canfree.com/realize-wordpress-plugin-comments-avatar.htm#comments</comments> <pubDate>Tue, 22 Mar 2011 06:28:17 +0000</pubDate> <dc:creator>博优谷</dc:creator> <category><![CDATA[网站优化]]></category> <category><![CDATA[avatar]]></category> <category><![CDATA[主题优化]]></category> <category><![CDATA[代码]]></category> <category><![CDATA[头像]]></category> <category><![CDATA[样式]]></category> <category><![CDATA[评论]]></category> <guid
isPermaLink="false">http://www.canfree.com/?p=1228</guid> <description><![CDATA[本人现正使用的这款主题，看似简单，但却有利于SEO。主题只保留了最主要的功能，默认情况下在评论区就不显示读者的Avatar头像，我认为这样是对读者的不尊重，于是决定动刀实现这一功能。 博优谷多数关于wordpress的文章都是以代码的形式实现，我建议尽量少用插件。 1，打开主题文件夹中的comments.php，找到 &#60;div class=&#34;&#60;?php echo $oddcomment; ?&#62; bubble&#34; id=&#34;comment-&#60;?php comment_ID&#40;&#41; ?&#62;&#34;&#62;与&#60;?php comment_author_link&#40;&#41; ?&#62; 2，将下面的代码添加到两语句之间 &#60;?php if &#40;function_exists&#40;'get_avatar'&#41;&#41; &#123; ?&#62; &#60;div class=&#34;avatar&#34;&#62; &#60;?php echo get_avatar&#40; $comment, 18 &#41;; ?&#62; &#60;/div&#62; &#60;?php &#125; ?&#62; 3,在style.css中定义avatar的样式，例如 .avatar img&#123;margin:5px 9px;float:left&#125; 表示头像距离上下5px，左右9px，位于文字的左侧。 注意，上面的18代表Avatar的头像大小，你可以自由调整。]]></description> <content:encoded><![CDATA[<p>本人现正使用的这款主题，看似简单，但却有利于<a
href="http://www.canfree.com/tag/seo"target="_blank"rel="nofollow"title="查看与[SEO]有关的文章" >SEO</a>。主题只保留了最主要的功能，默认情况下在评论区就不显示读者的Avatar头像，我认为这样是对读者的不尊重，于是决定动刀实现这一功能。<br
/> 博优谷多数关于<a
href="http://www.wordpress.org"target="_blank"title="访问[wordpress]" >wordpress</a>的文章都是以代码的形式实现，我建议尽量少用插件。<br
/> 1，打开主题文件夹中的comments.php，找到</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$oddcomment</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> bubble&quot; id=&quot;comment-<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;与<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_author_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div><p>2，将下面的代码添加到两语句之间</p><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: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'get_avatar'</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;">?&gt;</span>
&lt;div class=&quot;avatar&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_avatar<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$comment</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">18</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div><p>3,在style.css中定义avatar的样式，例如</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">.</span>avatar img<span style="color: #009900;">&#123;</span>margin<span style="color: #339933;">:</span>5px 9px<span style="color: #339933;">;</span>float<span style="color: #339933;">:</span>left<span style="color: #009900;">&#125;</span></pre></div></div><p>表示头像距离上下5px，左右9px，位于文字的左侧。</p><p>注意，上面的18代表Avatar的头像大小，你可以自由调整。</p> ]]></content:encoded> <wfw:commentRss>http://www.canfree.com/realize-wordpress-plugin-comments-avatar.htm/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>教你如何解决重复的元说明</title><link>http://www.canfree.com/teach-you-how-to-solve-the-duplicate-meta-descriptions.htm</link> <comments>http://www.canfree.com/teach-you-how-to-solve-the-duplicate-meta-descriptions.htm#comments</comments> <pubDate>Sun, 20 Mar 2011 09:14:09 +0000</pubDate> <dc:creator>博优谷</dc:creator> <category><![CDATA[主题优化]]></category> <category><![CDATA[SEO]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[代码]]></category> <category><![CDATA[优化]]></category> <category><![CDATA[元说明]]></category> <guid
isPermaLink="false">http://www.canfree.com/?p=1215</guid> <description><![CDATA[在用GOOGLE的网站管理员工具分析站点时发现存在重复的元说明，关于这个问题，一个比较方便的解决方法就是指定规范网页，规范网页是一组内容高度相似的网页的首选版本。 如何指定规范网页？ 要指定指向网页 http://www.example.com/product.php?item=swedish-fish 的规范链接，请按以下形式创建 &#60;link&#62; 元素： &#160; &#60;link rel=&#34;canonical&#34; href=&#34;http://www.example.com/product.php?item=swedish-fish&#34;/&#62;将上述链接复制到该网页所有非规范版本的 &#60;head&#62; 部分，如 http://www.example.com/product.php?item=swedish-fish&#38;sort=price。 &#160; 如果您在 http://www.example.com/product.php?item=swedish-fish 和 https://www.example.com/product.php?item=swedish-fish 上都发布了内容，则可以指定该网页的规范版本。创建 &#60;link&#62; 元素： &#160; &#60;link rel=&#34;canonical&#34; href=&#34;http://www.example.com/product.php?item=swedish-fish&#34;/&#62;将上述链接添加到 https://www.example.comproduct.php?item=swedish-fish 的 &#60;head&#62; 部分。 对于wordpress用户来说，可以用下面的方法来消除重复元说明方法，header.php 中加以下代码： 将代码添加到&#60;head&#62;部分: &#60;?php if &#40; is_singular&#40;&#41; &#41; echo '&#60;link rel=&#34;canonical&#34; href=&#34;' . get_permalink&#40;&#41; . '&#34; /&#62;';?&#62;]]></description> <content:encoded><![CDATA[<p>在用GOOGLE的网站管理员工具分析站点时发现存在<strong>重复的元说明</strong>，关于这个问题，一个比较方便的解决方法就是指定规范网页，规范网页是一组内容高度相似的网页的首选版本。<br
/> 如何指定规范网页？</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">要指定指向网页 http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//www.example.com/product.php?item=swedish-fish 的规范链接，请按以下形式创建 &lt;link&gt; 元素：</span>
&nbsp;
<span style="color: #339933;">&lt;</span>link rel<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;canonical&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://www.example.com/product.php?item=swedish-fish&quot;</span><span style="color: #339933;">/&gt;</span>将上述链接复制到该网页所有非规范版本的 <span style="color: #339933;">&lt;</span>head<span style="color: #339933;">&gt;</span> 部分，如 http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//www.example.com/product.php?item=swedish-fish&amp;sort=price。</span>
&nbsp;
如果您在 http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//www.example.com/product.php?item=swedish-fish 和 https://www.example.com/product.php?item=swedish-fish 上都发布了内容，则可以指定该网页的规范版本。创建 &lt;link&gt; 元素： </span>
&nbsp;
<span style="color: #339933;">&lt;</span>link rel<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;canonical&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://www.example.com/product.php?item=swedish-fish&quot;</span><span style="color: #339933;">/&gt;</span>将上述链接添加到 https<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//www.example.comproduct.php?item=swedish-fish 的 &lt;head&gt; 部分。</span></pre></div></div><p>对于<a
href="http://www.wordpress.org"target="_blank"title="访问[wordpress]" >wordpress</a>用户来说，可以用下面的方法来消除重复元说明方法，header.php 中加以下代码：</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">将代码添加到&lt;head&gt;部分:
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_singular<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;link rel=&quot;canonical&quot; href=&quot;'</span> <span style="color: #339933;">.</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot; /&gt;'</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div> ]]></content:encoded> <wfw:commentRss>http://www.canfree.com/teach-you-how-to-solve-the-duplicate-meta-descriptions.htm/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>自定义wordpress Tags输出样式</title><link>http://www.canfree.com/custom-output-style-wordpress-tags.htm</link> <comments>http://www.canfree.com/custom-output-style-wordpress-tags.htm#comments</comments> <pubDate>Wed, 02 Mar 2011 08:13:17 +0000</pubDate> <dc:creator>博优谷</dc:creator> <category><![CDATA[网站优化]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[代码]]></category> <category><![CDATA[标签]]></category> <category><![CDATA[样式]]></category> <guid
isPermaLink="false">http://www.canfree.com/custom-output-style-wordpress-tags.htm</guid> <description><![CDATA[只需要简单修改几个参数，我们就可以自由控制tags的样式了。从SEO角度来看，标签字体太大并不能讨好机器人，得看他的热门度。所以我建议字体最小10，最大12，默认40个，以count、asc排序为最佳。 打开\wp-includes\category-template.php 文件，搜索 function wp_tag_cloud&#40; $args 你会看到 $defaults = array&#40; 'smallest' =&#60;span class=&#34;kwrd&#34;&#62;&#38;gt;&#60;/span&#62; 8, 'largest' =&#60;span class=&#34;kwrd&#34;&#62;&#38;gt;&#60;/span&#62; 22, 'unit' =&#60;span class=&#34;kwrd&#34;&#62;&#38;gt;&#60;/span&#62; 'pt', 'number' =&#60;span class=&#34;kwrd&#34;&#62;&#38;gt;&#60;/span&#62; 45, 'format' =&#60;span class=&#34;kwrd&#34;&#62;&#38;gt;&#60;/span&#62; 'flat', 'separator' =&#60;span class=&#34;kwrd&#34;&#62;&#38;gt;&#60;/span&#62; &#38;quot;\n&#38;quot;, 'orderby' =&#60;span class=&#34;kwrd&#34;&#62;&#38;gt;&#60;/span&#62; 'name', 'order' =&#60;span class=&#34;kwrd&#34;&#62;&#38;gt;&#60;/span&#62; 'ASC', 'exclude' =&#60;span class=&#34;kwrd&#34;&#62;&#38;gt;&#60;/span&#62; '', 'include' =&#60;span class=&#34;kwrd&#34;&#62;&#38;gt;&#60;/span&#62; '', 'link' =&#60;span class=&#34;kwrd&#34;&#62;&#38;gt;&#60;/span&#62; 'view', 'taxonomy' [...]]]></description> <content:encoded><![CDATA[<p>只需要简单修改几个参数，我们就可以自由控制tags的样式了。从<a
href="http://www.canfree.com/tag/seo"target="_blank"rel="nofollow"title="查看与[SEO]有关的文章" >SEO</a>角度来看，标签字体太大并不能讨好机器人，得看他的热门度。所以我建议字体最小10，最大12，默认40个，以count、asc排序为最佳。</p><p>打开\wp-includes\category-template.php 文件，搜索</p><p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> wp_tag_cloud<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$args</span></pre></div></div></p><p>你会看到</p><p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #000088;">$defaults</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'smallest'</span> <span style="color: #339933;">=&lt;</span>span <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;kwrd&quot;</span><span style="color: #339933;">&gt;&amp;</span>gt<span style="color: #339933;">;&lt;/</span>span<span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">8</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'largest'</span> <span style="color: #339933;">=&lt;</span>span <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;kwrd&quot;</span><span style="color: #339933;">&gt;&amp;</span>gt<span style="color: #339933;">;&lt;/</span>span<span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">22</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'unit'</span> <span style="color: #339933;">=&lt;</span>span <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;kwrd&quot;</span><span style="color: #339933;">&gt;&amp;</span>gt<span style="color: #339933;">;&lt;/</span>span<span style="color: #339933;">&gt;</span> <span style="color: #0000ff;">'pt'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'number'</span> <span style="color: #339933;">=&lt;</span>span <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;kwrd&quot;</span><span style="color: #339933;">&gt;&amp;</span>gt<span style="color: #339933;">;&lt;/</span>span<span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">45</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'format'</span> <span style="color: #339933;">=&lt;</span>span <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;kwrd&quot;</span><span style="color: #339933;">&gt;&amp;</span>gt<span style="color: #339933;">;&lt;/</span>span<span style="color: #339933;">&gt;</span> <span style="color: #0000ff;">'flat'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'separator'</span> <span style="color: #339933;">=&lt;</span>span <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;kwrd&quot;</span><span style="color: #339933;">&gt;&amp;</span>gt<span style="color: #339933;">;&lt;/</span>span<span style="color: #339933;">&gt;</span> <span style="color: #339933;">&amp;</span>quot<span style="color: #339933;">;</span>\n<span style="color: #339933;">&amp;</span>quot<span style="color: #339933;">;,</span> <span style="color: #0000ff;">'orderby'</span> <span style="color: #339933;">=&lt;</span>span <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;kwrd&quot;</span><span style="color: #339933;">&gt;&amp;</span>gt<span style="color: #339933;">;&lt;/</span>span<span style="color: #339933;">&gt;</span> <span style="color: #0000ff;">'name'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'order'</span> <span style="color: #339933;">=&lt;</span>span <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;kwrd&quot;</span><span style="color: #339933;">&gt;&amp;</span>gt<span style="color: #339933;">;&lt;/</span>span<span style="color: #339933;">&gt;</span> <span style="color: #0000ff;">'ASC'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'exclude'</span> <span style="color: #339933;">=&lt;</span>span <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;kwrd&quot;</span><span style="color: #339933;">&gt;&amp;</span>gt<span style="color: #339933;">;&lt;/</span>span<span style="color: #339933;">&gt;</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'include'</span> <span style="color: #339933;">=&lt;</span>span <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;kwrd&quot;</span><span style="color: #339933;">&gt;&amp;</span>gt<span style="color: #339933;">;&lt;/</span>span<span style="color: #339933;">&gt;</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'link'</span> <span style="color: #339933;">=&lt;</span>span <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;kwrd&quot;</span><span style="color: #339933;">&gt;&amp;</span>gt<span style="color: #339933;">;&lt;/</span>span<span style="color: #339933;">&gt;</span> <span style="color: #0000ff;">'view'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'taxonomy'</span> <span style="color: #339933;">=&lt;</span>span <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;kwrd&quot;</span><span style="color: #339933;">&gt;&amp;</span>gt<span style="color: #339933;">;&lt;/</span>span<span style="color: #339933;">&gt;</span> <span style="color: #0000ff;">'post_tag'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'echo'</span> <span style="color: #339933;">=&lt;</span>span <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;kwrd&quot;</span><span style="color: #339933;">&gt;&amp;</span>gt<span style="color: #339933;">;&lt;/</span>span<span style="color: #339933;">&gt;</span> <span style="color: #009900; font-weight: bold;">true</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div></p><p>默认字体最小是8pt,最大是22pt,默认显示45个标签；</p><p>orderdy也可以&quot;count”,排序，表示标签的使用次数；</p><p>order也可以&quot;DESC”按照降序排序；</p><style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>]]></content:encoded> <wfw:commentRss>http://www.canfree.com/custom-output-style-wordpress-tags.htm/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>wordpress侧边栏两列显示通用代码</title><link>http://www.canfree.com/wordpress-sidebar-two-columns-show-common-code.htm</link> <comments>http://www.canfree.com/wordpress-sidebar-two-columns-show-common-code.htm#comments</comments> <pubDate>Wed, 02 Mar 2011 07:26:52 +0000</pubDate> <dc:creator>博优谷</dc:creator> <category><![CDATA[网站优化]]></category> <category><![CDATA[两列]]></category> <category><![CDATA[代码]]></category> <guid
isPermaLink="false">http://www.canfree.com/wordpress-sidebar-two-columns-show-common-code.htm</guid> <description><![CDATA[很多朋友都希望wordpress的侧边栏内容，比如分类目录、存档页、页面、链接等能够成两列显示，这不是难事，一段CSS代码就能搞定。 默认情况下，WP已经给相关的功能块定义了css名称，但没有定义样式。 友情链接：widget_links 分类目录：widget_categories 独立页面：widget_pages 等等，通过查看主题源代码我可以了解到这些固定的class名，下面只要添加相应的样式即可。 /* 分类显示两列*/ .widget_categories ul{ display:block; overflow:hidden; } .widget_categories ul li{ width:79px; float:left; } /* 分类显示两列*/ .widget_pages ul{ display:block; overflow:hidden; } .widget_pages ul li{ width:79px; float:left; } /* 分类显示两列*/ /* 链接显示两列*/ .widget_links ul{ display:block; overflow:hidden; } .widget_links ul li{ width:79px; float:left; } /* 链接显示两列*/ .csharpcode, .csharpcode pre { font-size: small; [...]]]></description> <content:encoded><![CDATA[<p>很多朋友都希望<a
href="http://www.wordpress.org"target="_blank"title="访问[wordpress]" >wordpress</a>的侧边栏内容，比如分类目录、存档页、页面、链接等能够成两列显示，这不是难事，一段CSS代码就能搞定。</p><p>默认情况下，WP已经给相关的功能块定义了css名称，但没有定义样式。</p><p>友情链接：widget_links</p><p>分类目录：widget_categories</p><p>独立页面：widget_pages</p><p>等等，通过查看主题源代码我可以了解到这些固定的class名，下面只要添加相应的样式即可。</p><pre class="csharpcode">/* 分类显示两列*/
.widget_categories ul{
display:block;
overflow:hidden;
}
.widget_categories ul li{
width:79px;
float:left;
}
/* 分类显示两列*/
.widget_pages ul{
display:block;
overflow:hidden;
}
.widget_pages ul li{
width:79px;
float:left;
}
/* 分类显示两列*/
/* 链接显示两列*/
.widget_links ul{
display:block;
overflow:hidden;
}
.widget_links ul li{
width:79px;
float:left;
}
/* 链接显示两列*/</pre><style type="text/css"><p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>]]></content:encoded> <wfw:commentRss>http://www.canfree.com/wordpress-sidebar-two-columns-show-common-code.htm/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>一段代码实现wordpress分类目录两列显示</title><link>http://www.canfree.com/section-of-code-shows-two-columns-wordpress-categories.htm</link> <comments>http://www.canfree.com/section-of-code-shows-two-columns-wordpress-categories.htm#comments</comments> <pubDate>Sat, 26 Feb 2011 20:55:02 +0000</pubDate> <dc:creator>博优谷</dc:creator> <category><![CDATA[主题优化]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[两列]]></category> <category><![CDATA[代码]]></category> <category><![CDATA[分类目录]]></category> <guid
isPermaLink="false">http://www.canfree.com/?p=1207</guid> <description><![CDATA[强大的wordpress即使更新到了3.1，默认的目录还是显示一列，有时会与主题格格不入，其实只要在style.css中加入一段代码，即可轻松实现了。你也可以丰富一下代码的样式，比如在文字前加个小图标等等。 /* 分类显示两列*/ .widget_categories ul{ display:block; overflow:auto; } .widget_categories ul li{ width:79px; height:20px; float:left; }]]></description> <content:encoded><![CDATA[<p>强大的<a
href="http://www.wordpress.org"target="_blank"title="访问[wordpress]" >wordpress</a>即使更新到了3.1，默认的目录还是显示一列，有时会与主题格格不入，其实只要在style.css中加入一段代码，即可轻松实现了。你也可以丰富一下代码的样式，比如在文字前加个小图标等等。</p><pre>/* 分类显示两列*/
.widget_categories ul{
    display:block;
    overflow:auto;
}
.widget_categories ul li{
    width:79px;
    height:20px;
    float:left;
}</pre>]]></content:encoded> <wfw:commentRss>http://www.canfree.com/section-of-code-shows-two-columns-wordpress-categories.htm/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>强制点击广告后才能下载的代码</title><link>http://www.canfree.com/click-ad-to-download-a-mandatory-code-for.htm</link> <comments>http://www.canfree.com/click-ad-to-download-a-mandatory-code-for.htm#comments</comments> <pubDate>Thu, 21 Jan 2010 18:45:46 +0000</pubDate> <dc:creator>博优谷</dc:creator> <category><![CDATA[主题优化]]></category> <category><![CDATA[精品源码]]></category> <category><![CDATA[代码]]></category> <category><![CDATA[广告优化]]></category> <category><![CDATA[隐藏广告]]></category> <guid
isPermaLink="false">http://www.canfree.com/click-ad-to-download-a-mandatory-code-for.htm</guid> <description><![CDATA[经常会在一些下载站遇到这样的情况，当点击某个广告文字或图片后，下载链接才会在页面上出现。依靠这种手段来提高CPT广告收入确实不错，不过不能用来做GOOGLE，不然100%被K，做做国内的广告联盟还凑乎。 下面公布下站长秘而不宣的强制点广告代码 &#160; 一、强制点击文字后才能下载，当然也可以把文字改成图片： &#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#34;&#62; &#60;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&#62; &#60;head&#62; &#60;title&#62;强制点击广告代码(一)&#60;/title&#62; &#60;meta http-equiv=&#34;content-type&#34; content=&#34;text/html;charset=gb2312&#34;&#62; &#60;!--把下面代码加到&#60;head&#62;与&#60;/head&#62;之间--&#62; &#60;script language=&#34;javascript&#34;&#62; var num = 2; var mypage = 'http://www.gzxnzj.cn'; var pissoff = '请先点击上面的链接！'; allow = Array(); allow[num] = 2; function gotoit(link){ if (link != num){ allow[link] = 2; } else { for (i=1;i&#60;=num;i++){ if [...]]]></description> <content:encoded><![CDATA[<p>经常会在一些下载站遇到这样的情况，当点击某个广告文字或图片后，下载链接才会在页面上出现。依靠这种手段来提高CPT广告收入确实不错，不过不能用来做GOOGLE，不然100%被K，做做国内的广告联盟还凑乎。</p><p>下面公布下站长秘而不宣的强制点广告代码</p><p> <span
id="more-1186"></span><p>&#160;</p><p>一、强制点击文字后才能下载，当然也可以把文字改成图片：</p><div><pre><span style="color: #0000ff">&lt;</span>!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;<span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #800000">html</span> <span style="color: #ff0000">xmlns</span>=<span style="color: #0000ff">&quot;http://www.w3.org/1999/xhtml&quot;</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #800000">head</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #800000">title</span><span style="color: #0000ff">&gt;</span>强制点击广告代码(一)<span style="color: #0000ff">&lt;/</span><span style="color: #800000">title</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #800000">meta</span> <span style="color: #ff0000">http</span>-<span style="color: #ff0000">equiv</span>=<span style="color: #0000ff">&quot;content-type&quot;</span> <span style="color: #ff0000">content</span>=<span style="color: #0000ff">&quot;text/html;charset=gb2312&quot;</span><span style="color: #0000ff">&gt;</span>
<span style="color: #008000">&lt;!--把下面代码加到&lt;head&gt;与&lt;/head&gt;之间--&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #800000">script</span> <span style="color: #ff0000">language</span>=<span style="color: #0000ff">&quot;javascript&quot;</span><span style="color: #0000ff">&gt;</span>
var num = 2;
var mypage = 'http://www.gzxnzj.cn';
var pissoff = '请先点击上面的链接！';
allow = Array();
allow[num] = 2;
function gotoit(link){
if (link != num){
allow[link] = 2;
} else {
for (i=1;i<span style="color: #0000ff">&lt;</span>=num;i++){
if (allow[i] != 2){
i = num + 1;
lemmeIn = 0;
} else {
lemmeIn = 1;
}
}
if (lemmeIn == 1){
window.location = mypage;
} else {
alert(pissoff);
}
}
}
//---<span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;/</span><span style="color: #800000">script</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;/</span><span style="color: #800000">head</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #800000">body</span><span style="color: #0000ff">&gt;</span>
<span style="color: #008000">&lt;!--把下面代码加到&lt;body&gt;与&lt;/body&gt;之间--&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #800000">a</span> <span style="color: #ff0000">href</span>=<span style="color: #0000ff"><a href="http://www.canfree.com">http://www.canfree.com</a></span> <span style="color: #ff0000">target</span>=<span style="color: #0000ff">&quot;_blank&quot;</span> <span style="color: #ff0000">onClick</span>=<span style="color: #0000ff">&quot;gotoit(1)&quot;</span><span style="color: #0000ff">&gt;</span>广告链接<span style="color: #0000ff">&lt;/</span><span style="color: #800000">a</span><span style="color: #0000ff">&gt;</span><span style="color: #0000ff">&lt;</span><span style="color: #800000">br</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #800000">a</span> <span style="color: #ff0000">href</span>=<span style="color: #0000ff">&quot;javascript:gotoit(num)&quot;</span><span style="color: #0000ff">&gt;</span>请先点击上面的链接再点击这里下载<span style="color: #0000ff">&lt;/</span><span style="color: #800000">a</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;/</span><span style="color: #800000">body</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;/</span><span style="color: #800000">html</span><span style="color: #0000ff">&gt;</span></pre></div><p></p><p>二、强制点击图片后才能下载，当然也可以把图片改成文字：</p><div><pre>&lt;!DOCTYPE html PUBLIC &quot;<span style="color: #8b0000">-//W3C//DTD XHTML 1.0 Transitional//EN</span>&quot; &quot;<span style="color: #8b0000">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</span>&quot;&gt;
&lt;html xmlns=&quot;<span style="color: #8b0000">http://www.w3.org/1999/xhtml</span>&quot;&gt;
&lt;head&gt;
&lt;title&gt;强制点击广告代码(二)&lt;/title&gt;
&lt;meta http-equiv=&quot;<span style="color: #8b0000">content-type</span>&quot; content=&quot;<span style="color: #8b0000">text/html;charset=gb2312</span>&quot;&gt;
&lt;!--把下面代码加到&lt;head&gt;与&lt;/head&gt;之间--&gt;
&lt;script language=&quot;<span style="color: #8b0000">javascript</span>&quot;&gt;
&lt;!--
<span style="color: #0000ff">function</span> MM_showHideLayers() {<span style="color: #008000">//v2.0</span>
<span style="color: #0000ff">var</span> i, visStr, args, theObj;
args = MM_showHideLayers.arguments;
<span style="color: #0000ff">for</span> (i=0; i&lt;(args.length-2); i+=3) {<span style="color: #008000">//with arg triples (objNS,objIE,visStr)</span>
visStr = args[i+2];
<span style="color: #0000ff">if</span> (navigator.appName == 'Netscape' &amp;&amp; document.layers != <span style="color: #0000ff">null</span>) {
theObj = eval(args[i]);
<span style="color: #0000ff">if</span> (theObj) theObj.visibility = visStr;
} <span style="color: #0000ff">else</span> <span style="color: #0000ff">if</span> (document.all != <span style="color: #0000ff">null</span>) {<span style="color: #008000">//IE</span>
<span style="color: #0000ff">if</span> (visStr == 'show') visStr = 'visible';<span style="color: #008000">//convert vals</span>
<span style="color: #0000ff">if</span> (visStr == 'hide') visStr = 'hidden';
theObj = eval(args[i+1]);
<span style="color: #0000ff">if</span> (theObj) theObj.style.visibility = visStr;
} }
}
<span style="color: #0000ff">function</span> MM_preloadImages() {<span style="color: #008000">//v2.0</span>
<span style="color: #0000ff">if</span> (document.images) {
<span style="color: #0000ff">var</span> imgFiles = MM_preloadImages.arguments;
<span style="color: #0000ff">if</span> (document.preloadArray==<span style="color: #0000ff">null</span>) document.preloadArray = <span style="color: #0000ff">new</span> Array();
<span style="color: #0000ff">var</span> i = document.preloadArray.length;
<span style="color: #0000ff">with</span> (document) <span style="color: #0000ff">for</span> (<span style="color: #0000ff">var</span> j=0; j&lt;imgFiles.length; j++) <span style="color: #0000ff">if</span> (imgFiles[j].charAt(0)!=&quot;<span style="color: #8b0000">#</span>&quot;){
preloadArray[i] = <span style="color: #0000ff">new</span> Image;
preloadArray[i++].src = imgFiles[j];
} }
}
<span style="color: #008000">//--&gt;</span>
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;!--把下面代码加到&lt;body&gt;与&lt;/body&gt;之间--&gt;
&lt;div id=&quot;<span style="color: #8b0000">Layer1</span>&quot; style=&quot;<span style="color: #8b0000">position:absolute;top:75px;left:10px;width:306px;height:63px;z-index:1;visibility:hidden;</span>&quot;&gt;&lt;a href=&quot;<span style="color: #8b0000">http://www.canfree.com</span>&quot;&gt;下载&lt;/a&gt;&lt;/div&gt;
&lt;div id=&quot;<span style="color: #8b0000">Layer2</span>&quot; style=&quot;<span style="color: #8b0000">position:absolute;top:10px;left:10px;width:147px;height:82px;z-index:2;visibility: visible;</span>&quot;&gt;&lt;a href=<span style="color: #8b0000"><a href="http://www.canfree.com">http://www.canfree.com</a></span> target=&quot;<span style="color: #8b0000">_blank</span>&quot;&gt;&lt;img src=&quot;<a title="http://seo.canfree.com/Images/logo.gif" href="http://seo.canfree.com/Images/logo.gif">http://seo.canfree.com/Images/logo.gif</a>&quot; border=&quot;<span style="color: #8b0000">0</span>&quot; onMouseDown=&quot;<span style="color: #8b0000">MM_showHideLayers('document.layers[\'Layer1\']','document.all[\'Layer1\']','show')</span>&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></div><p></p><p>复制代码另存网页看效果。</p> ]]></content:encoded> <wfw:commentRss>http://www.canfree.com/click-ad-to-download-a-mandatory-code-for.htm/feed</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>用图片列表方式展示BLOG</title><link>http://www.canfree.com/tabular-form-with-a-picture-showing-blog.htm</link> <comments>http://www.canfree.com/tabular-form-with-a-picture-showing-blog.htm#comments</comments> <pubDate>Fri, 15 Jan 2010 16:24:42 +0000</pubDate> <dc:creator>博优谷</dc:creator> <category><![CDATA[主题优化]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[代码]]></category> <category><![CDATA[技巧]]></category> <guid
isPermaLink="false">http://www.canfree.com/tabular-form-with-a-picture-showing-blog.htm</guid> <description><![CDATA[效果可以先看牛仔主义的www.jeansism.com/pic。或者去月光博客的首页看看。 思路: 调用9个文章post&#160;&#160; 采用css将其分割成三栏展示图下附文章标题作为链接。 &#60;?php $list_posts = get_posts('showposts=9&#38;orderby=rand'); //随机获得9个post $i=1; 标记一 foreach( $list_posts as $post ) : //建立了一个循环 ?&#62; //在这个循环里插入下面的内容 endforeach; ?&#62; &#60;?php $screen = get_post_meta($post-&#62;ID, 'screen', $single = true); ?&#62; //调用自定义字符来显示图片 //下面就是具体的显示文字和图片的方法， 为了清楚一点，这里把css写在style里了 实际中可以写入css文件的 &#60;div style=&#34;float:left;width:220px; padding-right:30px;text-align:center&#34; &#62; &#60;div style=&#34;height:220px;overflow:hidden;float:left; width:220px&#34; &#62; &#60;a href=&#34;&#60;?php the_permalink(); ?&#62;&#34; title=&#34;&#60;?php the_title(); ?&#62;&#34; rel=&#34;bookmark&#34;&#62; &#60;img src=&#34;&#60;?php echo ($screen); [...]]]></description> <content:encoded><![CDATA[<p>效果可以先看牛仔主义的<a
href="http://www.jeansism.com/pic">www.jeansism.com/pic</a>。或者去月光博客的首页看看。</p><p>思路: 调用9个文章post&#160;&#160; 采用css将其分割成三栏展示图下附文章标题作为链接。</p><div><pre><span style="color: #0000ff">&lt;?</span>php
$list_posts = get_posts('<span style="color: #8b0000">showposts=9&amp;orderby=rand</span>');   <span style="color: #008000">//随机获得9个post</span>
$i=1; 标记一
<a style="color: #0000ff" href="http://www.php.net/foreach">foreach</a>( $list_posts <a style="color: #0000ff" href="http://www.php.net/as">as</a> $post ) :  <span style="color: #008000">//建立了一个循环</span>
<span style="color: #0000ff">?&gt;</span>
//在这个循环里插入下面的内容
endforeach; <span style="color: #0000ff">?&gt;</span>
<span style="color: #0000ff">&lt;?</span>php $screen = get_post_meta($post-&gt;ID, '<span style="color: #8b0000">screen</span>', $single = <a style="color: #0000ff" href="http://www.php.net/true">true</a>); <span style="color: #0000ff">?&gt;</span>
//调用自定义字符来显示图片
//下面就是具体的显示文字和图片的方法，  为了清楚一点，这里把css写在style里了 实际中可以写入css文件的
<span style="color: #0000ff">&lt;</span><span style="color: #800000">div</span> <span style="color: #ff0000">style</span>=<span style="color: #0000ff">&quot;float:left;width:220px; padding-right:30px;text-align:center&quot;</span> <span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #800000">div</span> <span style="color: #ff0000">style</span>=<span style="color: #0000ff">&quot;height:220px;overflow:hidden;float:left; width:220px&quot;</span> <span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #800000">a</span> <span style="color: #ff0000">href</span>=<span style="color: #0000ff">&quot;&lt;?php the_permalink(); ?&gt;&quot;</span> <span style="color: #ff0000">title</span>=<span style="color: #0000ff">&quot;&lt;?php the_title(); ?&gt;&quot;</span> <span style="color: #ff0000">rel</span>=<span style="color: #0000ff">&quot;bookmark&quot;</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #800000">img</span> <span style="color: #ff0000">src</span>=<span style="color: #0000ff">&quot;&lt;?php echo ($screen); ?&gt;&quot;</span>  <span style="color: #ff0000">width</span>=<span style="color: #0000ff">&quot;220 &quot;</span><span style="color: #ff0000">alt</span>=<span style="color: #0000ff">&quot;&quot;</span>  <span style="color: #0000ff">/&gt;</span>  <span style="color: #0000ff">&lt;/</span><span style="color: #800000">a</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;/</span><span style="color: #800000">a</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;/</span><span style="color: #800000">div</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #800000">h4</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #800000">a</span> <span style="color: #ff0000">href</span>=<span style="color: #0000ff">&quot;&lt;?php the_permalink() ?&gt;&quot;</span> <span style="color: #ff0000">rel</span>=<span style="color: #0000ff">&quot;bookmark&quot;</span>       <span style="color: #ff0000">title</span>=<span style="color: #0000ff">&quot;Permanent Link to &lt;?php the_title(); ?&gt;&quot;</span><span style="color: #0000ff">&gt;</span><span style="color: #0000ff">&lt;?</span>php     the_title     (); <span style="color: #0000ff">?&gt;</span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">a</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;/</span><span style="color: #800000">h4</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;/</span><span style="color: #800000">div</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;?</span>php
<a style="color: #0000ff" href="http://www.php.net/if">if</a>(fmod($i,3)==0)   <span style="color: #008000">//做判断 3个div以后 结束  重新开始一个3个一组的div</span>
{
<a style="color: #0000ff" href="http://www.php.net/echo">echo</a>(&quot;<span style="color: #8b0000">&lt;/div&gt; &lt;div style='height:220px;padding-bottom:55px'&gt;</span>&quot;);
}
$i=$i+1;</pre></div><p>这样基本就完了&#160; 可以保存为模板&#160; 以页面形式发布。</p><p>我们再把思路引申一下，单独做一个这样的页面，然后WP后台将这个页面设为首页，立马焕然一新的感觉。</p> ]]></content:encoded> <wfw:commentRss>http://www.canfree.com/tabular-form-with-a-picture-showing-blog.htm/feed</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>不用插件实现日志缩略图功能</title><link>http://www.canfree.com/thumbnail-plug-ins-do-not-achieve-the-function-of-the-log.htm</link> <comments>http://www.canfree.com/thumbnail-plug-ins-do-not-achieve-the-function-of-the-log.htm#comments</comments> <pubDate>Mon, 11 Jan 2010 17:48:30 +0000</pubDate> <dc:creator>博优谷</dc:creator> <category><![CDATA[主题优化]]></category> <category><![CDATA[get the image]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[代码]]></category> <category><![CDATA[技巧]]></category> <category><![CDATA[缩略图]]></category> <guid
isPermaLink="false">http://www.canfree.com/thumbnail-plug-ins-do-not-achieve-the-function-of-the-log.htm</guid> <description><![CDATA[在1月10号的时候本站介绍过日志缩略图插件Get The Image，可以很方便的在首页或其它页面输出文章缩略图，返回首页即可看到实际效果。 但是今天在幸福的收藏夹那里看到了一段代码，可以实现这种效果，特做个记号，以备急需时使用。 &#60;?php $soContent = $post-&#62;post_content; $soImages = '~&#60;img [^\&#62;]*\ /&#62;~'; preg_match_all( $soImages, $soContent, $thePics ); $allPics = count($thePics[0]); switch ( $allPics &#62; 0 ) { case $allPics = 1: echo $thePics[0][0]; // 显示文章中的第一张图片 break; // 当图片数量有1个时，不再执行 default: echo &#34;图片地址&#34;; // 这里加入没图片时显示的默认图片 }; ?&#62; 将上面的代码放到index.php文件中合适位置，再配上CSS定义样式即可。本站并未测试此代码的有效性，有空时再说。 引申阅读：wordpress首页分类图片调用 为你的每一个分类目录指定一个图片，并按照文章所属的分类在首页以缩略图的形式展示出来。]]></description> <content:encoded><![CDATA[<p>在1月10号的时候本站介绍过<a
href="http://www.canfree.com/log-thumbnail-plug-in-get-the-image-detailed-description-of.htm">日志缩略图插件Get The Image</a>，可以很方便的在首页或其它页面输出文章缩略图，返回首页即可看到实际效果。</p><p>但是今天在<a
href="http://www.happinesz.cn/archives/935/">幸福的收藏夹</a>那里看到了一段代码，可以实现这种效果，特做个记号，以备急需时使用。</p><div><pre>&lt;?php
$soContent = $post-&gt;post_content;
$soImages = '~&lt;img [^\&gt;]*\ /&gt;~';
preg_match_all( $soImages, $soContent, $thePics );
$allPics = count($thePics[0]);
<span style="color: #0000ff">switch</span> ( $allPics &gt; 0 ) {
<span style="color: #0000ff">case</span> $allPics = 1:
echo $thePics[0][0]; <span style="color: #008000">// 显示文章中的第一张图片</span>
<span style="color: #0000ff">break</span>; <span style="color: #008000">// 当图片数量有1个时，不再执行</span>
<span style="color: #0000ff">default</span>:
echo &quot;<span style="color: #8b0000">图片地址</span>&quot;; <span style="color: #008000">// 这里加入没图片时显示的默认图片</span>
};
?&gt;</pre></div><p>将上面的代码放到index.php文件中合适位置，再配上CSS定义样式即可。本站并未测试此代码的有效性，有空时再说。</p><p>引申阅读：<a
href="http://www.canfree.com/wordpress-home-categories-photo-call.htm">wordpress首页分类图片调用</a> 为你的每一个分类目录指定一个图片，并按照文章所属的分类在首页以缩略图的形式展示出来。</p> ]]></content:encoded> <wfw:commentRss>http://www.canfree.com/thumbnail-plug-ins-do-not-achieve-the-function-of-the-log.htm/feed</wfw:commentRss> <slash:comments>5</slash:comments> </item> </channel> </rss>
