<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: 在WordPress中自动获取文章中的图片</title>
	<atom:link href="http://www.happinesz.cn/archives/935/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.happinesz.cn/archives/935/</link>
	<description>在这里,存IT的理性,掺夹文学的浪漫...</description>
	<lastBuildDate>Thu, 09 Sep 2010 12:05:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: 任鸟飞</title>
		<link>http://www.happinesz.cn/archives/935/comment-page-17/#comment-21780</link>
		<dc:creator>任鸟飞</dc:creator>
		<pubDate>Wed, 07 Jul 2010 02:11:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.happinesz.cn/?p=935#comment-21780</guid>
		<description>不喜欢这种方法，感觉还是自定义字段比较好</description>
		<content:encoded><![CDATA[<p>不喜欢这种方法，感觉还是自定义字段比较好</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 卫星</title>
		<link>http://www.happinesz.cn/archives/935/comment-page-17/#comment-21669</link>
		<dc:creator>卫星</dc:creator>
		<pubDate>Tue, 06 Jul 2010 11:10:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.happinesz.cn/?p=935#comment-21669</guid>
		<description>非常有用，但是怎样能控制显示图片的数量呢？我不想只显示一张啊</description>
		<content:encoded><![CDATA[<p>非常有用，但是怎样能控制显示图片的数量呢？我不想只显示一张啊</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wordpress提取文章中的第一个图片 &#171; 酷剑博客-专注于wordpress主题仿制,界面改造优化,blog技巧使用的优秀原创博客！</title>
		<link>http://www.happinesz.cn/archives/935/comment-page-17/#comment-16458</link>
		<dc:creator>wordpress提取文章中的第一个图片 &#171; 酷剑博客-专注于wordpress主题仿制,界面改造优化,blog技巧使用的优秀原创博客！</dc:creator>
		<pubDate>Sat, 05 Jun 2010 08:31:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.happinesz.cn/?p=935#comment-16458</guid>
		<description>[...] UPDATE: 感谢来自herb同学的说法，用if…else语句 [...]</description>
		<content:encoded><![CDATA[<p>[...] UPDATE: 感谢来自herb同学的说法，用if…else语句 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ray</title>
		<link>http://www.happinesz.cn/archives/935/comment-page-17/#comment-15742</link>
		<dc:creator>ray</dc:creator>
		<pubDate>Tue, 13 Apr 2010 11:10:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.happinesz.cn/?p=935#comment-15742</guid>
		<description>sofish    你好：
谢谢你的代码，解决了我一个问题。
但是这段代码只是在chrome里一切正常，却在IE6和IE8里的左下角出现错误提示。

希望得到你或者各位高手的回复，谢谢！

IE里打开，内容如下
“网页错误详细信息

用户代理: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3)
时间戳: Tue, 13 Apr 2010 11:08:03 UTC

（---这段会有近百个重复---）
消息: &#039;auto&#039; 未定义
行: 1
字符: 1
代码: 0
URI: http://127.0.0.1/
（---这段会有近百个重复---）”</description>
		<content:encoded><![CDATA[<p>sofish    你好：<br />
谢谢你的代码，解决了我一个问题。<br />
但是这段代码只是在chrome里一切正常，却在IE6和IE8里的左下角出现错误提示。</p>
<p>希望得到你或者各位高手的回复，谢谢！</p>
<p>IE里打开，内容如下<br />
“网页错误详细信息</p>
<p>用户代理: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3)<br />
时间戳: Tue, 13 Apr 2010 11:08:03 UTC</p>
<p>（&#8212;这段会有近百个重复&#8212;）<br />
消息: &#8216;auto&#8217; 未定义<br />
行: 1<br />
字符: 1<br />
代码: 0<br />
URI: <a href="http://127.0.0.1/" rel="nofollow">http://127.0.0.1/</a><br />
（&#8212;这段会有近百个重复&#8212;）”</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mcooo</title>
		<link>http://www.happinesz.cn/archives/935/comment-page-16/#comment-15664</link>
		<dc:creator>mcooo</dc:creator>
		<pubDate>Wed, 31 Mar 2010 16:22:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.happinesz.cn/?p=935#comment-15664</guid>
		<description>转走了！备份以后会用的！</description>
		<content:encoded><![CDATA[<p>转走了！备份以后会用的！</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 酷图集</title>
		<link>http://www.happinesz.cn/archives/935/comment-page-16/#comment-15568</link>
		<dc:creator>酷图集</dc:creator>
		<pubDate>Sat, 20 Mar 2010 07:32:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.happinesz.cn/?p=935#comment-15568</guid>
		<description>围观先，搞懂再弄~~</description>
		<content:encoded><![CDATA[<p>围观先，搞懂再弄~~</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 10个 WordPress 主题设计高级功能进阶实现 - 咯咯</title>
		<link>http://www.happinesz.cn/archives/935/comment-page-16/#comment-15311</link>
		<dc:creator>10个 WordPress 主题设计高级功能进阶实现 - 咯咯</dc:creator>
		<pubDate>Tue, 23 Feb 2010 02:01:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.happinesz.cn/?p=935#comment-15311</guid>
		<description>[...] 教程：在Wordpress中自动获取文章中的图片 [...]</description>
		<content:encoded><![CDATA[<p>[...] 教程：在Wordpress中自动获取文章中的图片 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 在Wordpress中自动获取文章中的图片 &#171; 逍遥阁</title>
		<link>http://www.happinesz.cn/archives/935/comment-page-16/#comment-15193</link>
		<dc:creator>在Wordpress中自动获取文章中的图片 &#171; 逍遥阁</dc:creator>
		<pubDate>Thu, 28 Jan 2010 01:39:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.happinesz.cn/?p=935#comment-15193</guid>
		<description>[...] UPDATE: 感谢来自herb同学的说法，用if…else语句 [...]</description>
		<content:encoded><![CDATA[<p>[...] UPDATE: 感谢来自herb同学的说法，用if…else语句 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 不用插件实现日志缩略图功能 &#8211; 左手烟</title>
		<link>http://www.happinesz.cn/archives/935/comment-page-16/#comment-15009</link>
		<dc:creator>不用插件实现日志缩略图功能 &#8211; 左手烟</dc:creator>
		<pubDate>Mon, 11 Jan 2010 17:48:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.happinesz.cn/?p=935#comment-15009</guid>
		<description>[...] 在1月10号的时候本站介绍过日志缩略图插件Get The Image，可以很方便的在首页或其它页面输出文章缩略图，返回首页即可看到实际效果。但是今天在幸福的收藏夹那里看到了一段代码，可以实现这种效果，特做个记号，以备急需时使用。&lt;?php $soContent = $post-&gt;post_content; $soImages = &#039;~&lt;img [^&gt;]* /&gt;~&#039;; preg_match_all( $soImages, $soContent, $thePics ); $allPics = count($thePics[0]); switch ( $allPics &gt; 0 ) { case $allPics = 1: echo $thePics[0][0]; // 显示文章中的第一张图片 break; // 当图片数量有1个时，不再执行 default: echo &quot;图片地址&quot;; // 这里加入没图片时显示的默认图片 }; ?&gt;将上面的代码放到index.php文件中合适位置，再配上CSS定义样式即可。本站并未测试此代码的有效性，有空时再说。引申阅读：wordpress首页分类图片调用 为你的每一个分类目录指定一个图片，并按照文章所属的分类在首页以缩略图的形式展示出来。关键词风向标： get the image , WordPress , 代码 , 技巧 , 缩略图 .daitui.init();转载本篇文章必须遵循 知识共享署名 2.5 中国大陆许可协议 ！ 原文作者:左手烟&#160;&#160; 原文链接:不用插件实现日志缩略图功能 &#160;&#160; 如果你喜欢本站文章，请用鼠标猛点这里进行订阅 [...]</description>
		<content:encoded><![CDATA[<p>[...] 在1月10号的时候本站介绍过日志缩略图插件Get The Image，可以很方便的在首页或其它页面输出文章缩略图，返回首页即可看到实际效果。但是今天在幸福的收藏夹那里看到了一段代码，可以实现这种效果，特做个记号，以备急需时使用。&lt;?php $soContent = $post-&gt;post_content; $soImages = &#39;~&lt;img [^&gt;]* /&gt;~&#39;; preg_match_all( $soImages, $soContent, $thePics ); $allPics = count($thePics[0]); switch ( $allPics &gt; 0 ) { case $allPics = 1: echo $thePics[0][0]; // 显示文章中的第一张图片 break; // 当图片数量有1个时，不再执行 default: echo &quot;图片地址&quot;; // 这里加入没图片时显示的默认图片 }; ?&gt;将上面的代码放到index.php文件中合适位置，再配上CSS定义样式即可。本站并未测试此代码的有效性，有空时再说。引申阅读：wordpress首页分类图片调用 为你的每一个分类目录指定一个图片，并按照文章所属的分类在首页以缩略图的形式展示出来。关键词风向标： get the image , WordPress , 代码 , 技巧 , 缩略图 .daitui.init();转载本篇文章必须遵循 知识共享署名 2.5 中国大陆许可协议 ！ 原文作者:左手烟&nbsp;&nbsp; 原文链接:不用插件实现日志缩略图功能 &nbsp;&nbsp; 如果你喜欢本站文章，请用鼠标猛点这里进行订阅 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AntiKorean</title>
		<link>http://www.happinesz.cn/archives/935/comment-page-15/#comment-14785</link>
		<dc:creator>AntiKorean</dc:creator>
		<pubDate>Tue, 08 Dec 2009 08:44:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.happinesz.cn/?p=935#comment-14785</guid>
		<description>一天访问这个页面几十次 :D</description>
		<content:encoded><![CDATA[<p>一天访问这个页面几十次 <img src='http://www.happinesz.cn/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
