<?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>Tomgo的生活博客 &#187; 代码</title>
	<atom:link href="http://www.54tomgo.com/archives/tag/%e4%bb%a3%e7%a0%81/feed" rel="self" type="application/rss+xml" />
	<link>http://www.54tomgo.com</link>
	<description>生活&#124;电影&#124;新闻&#124;IT话题</description>
	<lastBuildDate>Fri, 30 Jul 2010 01:05:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		
<!-- Start Of Script Generated By WP-PostViews Plus 1.1.18 -->
<script type='text/javascript' src='http://www.54tomgo.com/wp-includes/js/jquery/jquery.js?ver=1.3.2'></script>
<script type="text/javascript">
/* <![CDATA[ */
jQuery.ajax({type:'GET',url:'http://www.54tomgo.com/wp-content/plugins/wp-postviews-plus/postviews_plus.php',data:'todowppvp=&type=tag&id=75_1',cache:false,dataType:'script'});/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus 1.1.18 -->
	<item>
		<title>DIV+CSS定义滚动条样式，实现内嵌效果</title>
		<link>http://www.54tomgo.com/archives/430.html</link>
		<comments>http://www.54tomgo.com/archives/430.html#comments</comments>
		<pubDate>Sun, 30 Aug 2009 03:34:58 +0000</pubDate>
		<dc:creator>tomgo</dc:creator>
				<category><![CDATA[心得技巧]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[滚动条]]></category>
		<category><![CDATA[滚动条CSS代码]]></category>

		<guid isPermaLink="false">http://www.54tomgo.com/?p=430</guid>
		<description><![CDATA[


CSS滚动条


今天忽然想起我的博客签名要更新了，但是我也想保留历史签名，于是参考了淘宝的一些装修的店铺，修改了一下CSS，做了个漂亮的DIV+CSS的滚动条，实现了内嵌的效果。不用iframe的。
CSS代码如下
#about {
float: left;
display: inline;
margin-top: 30px;
width: 500px;
font-size: 14px;
}
&#160;
&#60;p style=&#34;text-align: center;&#34;&#62;#about p {
color: #FFF;
font-size: 14px;
line-height: 1.4em;
SCROLLBAR-FACE-COLOR: #666666; Z-INDEX: 1; SCROLLBAR-HIGHLIGHT-COLOR: #CCCCCC; MARGIN-LEFT: 2px; OVERFLOW: auto; WIDTH: 550px; SCROLLBAR-SHADOW-COLOR: #666666; SCROLLBAR-3DLIGHT-COLOR: #666666; SCROLLBAR-ARROW-COLOR: #f3e6a0; SCROLLBAR-DARKSHADOW-COLOR: #444444; HEIGHT: 80px;
}
在网页中使用：
&#60;!-- ^^^^^^^^^^^^^^ 请修改^^^^^^^^^^^^^^ --&#62;
&#60;div id=&#34;about&#34;&#62;
&#60;p&#62;签名： &#60;br /&#62;
(2009-8-29)这个月很忙，老婆肚子大了，公司的工作量大了很多。幸亏现在住进新房子了，晚上在家里加班，可以轻松一点。一边看我的42寸LG液晶电视，一边跟客户聊天，也算有片刻的放松的。
&#60;br /&#62;
---------------------------------------------------------------------------------------------------------
&#60;br /&#62;
(2009-8-4)今年过得特别有意义，5月份结婚，6月份老婆说有了，7月份买了房子。好像一下子过了常人的几年时光。特别想记录这段日子发生的事情，于是我的tomgo博客又重开了。 &#60;/p&#62;
&#60;/div&#62;
&#60;!-- ^^^^^^^^^^^^^^ 请修改 ^^^^^^^^^^^^^^ --&#62;
效果请看我的博客的头部滚动条的签名.
]]></description>
			<content:encoded><![CDATA[<div class="mceTemp mceIEcenter" style="text-align: center;">
<dl id="attachment_433" class="wp-caption aligncenter" style="width: 460px; text-align: center;">
<dt class="wp-caption-dt"><img class="size-full wp-image-433" title="CSS滚动条" src="http://www.54tomgo.com/wp-content/uploads/2009/08/gundongtiao.jpg" alt="CSS滚动条" width="450" height="177" /></dt>
<dd class="wp-caption-dd">CSS滚动条</dd>
</dl>
</div>
<p>今天忽然想起我的博客签名要更新了，但是我也想保留历史签名，于是参考了淘宝的一些装修的店铺，修改了一下CSS，做了个漂亮的DIV+CSS的滚动条，实现了内嵌的效果。不用iframe的。<span id="more-430"></span></p>
<p>CSS代码如下</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">#about {</li>
<li>float: left;</li>
<li>display: inline;</li>
<li>margin-top: 30px;</li>
<li>width: 500px;</li>
<li>font-size: 14px;</li>
<li>}</li>
<li>&nbsp;</li>
<li>&lt;p style=&quot;text-align: center;&quot;&gt;#about p {</li>
<li>color: #FFF;</li>
<li>font-size: 14px;</li>
<li>line-height: 1.4em;</li>
<li>SCROLLBAR-FACE-COLOR: #666666; Z-INDEX: 1; SCROLLBAR-HIGHLIGHT-COLOR: #CCCCCC; MARGIN-LEFT: 2px; OVERFLOW: auto; WIDTH: 550px; SCROLLBAR-SHADOW-COLOR: #666666; SCROLLBAR-3DLIGHT-COLOR: #666666; SCROLLBAR-ARROW-COLOR: #f3e6a0; SCROLLBAR-DARKSHADOW-COLOR: #444444; HEIGHT: 80px;</li>
<li>}</li></ol></div>
<p>在网页中使用：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">&lt;!-- ^^^^^^^^^^^^^^ 请修改^^^^^^^^^^^^^^ --&gt;</li>
<li>&lt;div id=&quot;about&quot;&gt;</li>
<li>&lt;p&gt;签名： &lt;br /&gt;</li>
<li>(2009-8-29)这个月很忙，老婆肚子大了，公司的工作量大了很多。幸亏现在住进新房子了，晚上在家里加班，可以轻松一点。一边看我的42寸LG液晶电视，一边跟客户聊天，也算有片刻的放松的。</li>
<li>&lt;br /&gt;</li>
<li>---------------------------------------------------------------------------------------------------------</li>
<li>&lt;br /&gt;</li>
<li>(2009-8-4)今年过得特别有意义，5月份结婚，6月份老婆说有了，7月份买了房子。好像一下子过了常人的几年时光。特别想记录这段日子发生的事情，于是我的tomgo博客又重开了。 &lt;/p&gt;</li>
<li>&lt;/div&gt;</li>
<li>&lt;!-- ^^^^^^^^^^^^^^ 请修改 ^^^^^^^^^^^^^^ --&gt;</li></ol></div>
<p>效果请看我的博客的头部滚动条的签名.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.54tomgo.com/archives/430.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Div+css代码实现图片的并列连接的效果</title>
		<link>http://www.54tomgo.com/archives/424.html</link>
		<comments>http://www.54tomgo.com/archives/424.html#comments</comments>
		<pubDate>Sat, 29 Aug 2009 10:02:15 +0000</pubDate>
		<dc:creator>tomgo</dc:creator>
				<category><![CDATA[心得技巧]]></category>
		<category><![CDATA[DIV]]></category>
		<category><![CDATA[DIV+CSS]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[图片并列]]></category>

		<guid isPermaLink="false">http://www.54tomgo.com/?p=424</guid>
		<description><![CDATA[


Div + Css的代码


今天打开FireFox，发现我们公司的网站一个广告栏飞到右侧去了。我想是使用了表格的缘故。网站是基于Div+css做的，但是自己对DIV建站水平不足，很多地方还保留了TD TR的表格。下决心修改了一下，现在没有不会飞到右侧了。这个代码的作用：在photoshop割图后，要用div接拼起来，实现几张图片的连接效果。对代码进行记录：
#adimglist&#160; 
img{
float:left; /*定义浮动到左侧，这样就可以实现几个连接的图片的并列了*/
margin: 0;/*定义图片的边框为零*/
}
显示效果
&#60;style&#62;
#adimglist&#160; 
img{
float:left; 
margin: 0;
}
&#60;/style&#62;
&#60;div id=&#34;adimglist&#34;&#62;&#60;a href=&#34;http://www.yanwotang.com/catalog_160.html&#34; target=&#34;_blank&#34;&#62;&#60;img src=&#34;http://www.yanwotang.com/syssite/home/shop/1/template/Cn00016/images/tupian_01.jpg&#34; alt=&#34;正官庄高丽参&#34; width=&#34;155&#34; height=&#34;150&#34; border=&#34;0&#34;&#62;&#60;/a&#62;
&#60;a href=&#34;http://www.yanwotang.com/product_140.html&#34; target=&#34;_blank&#34;&#62;&#60;img src=&#34;http://www.yanwotang.com/syssite/home/shop/1/template/Cn00016/images/tupian_02.jpg&#34; alt=&#34;顶级白燕条皇&#34; width=&#34;125&#34; height=&#34;150&#34; border=&#34;0&#34;&#62;&#60;/a&#62;
&#60;a href=&#34;http://www.yanwotang.com/product_114.html&#34; target=&#34;_blank&#34;&#62;&#60;img src=&#34;http://www.yanwotang.com/syssite/home/shop/1/template/Cn00016/images/tupian_03.jpg&#34; alt=&#34;三角白燕盏&#34; width=&#34;130&#34; height=&#34;150&#34; border=&#34;0&#34;&#62;&#60;/a&#62;
&#60;/div&#62;
]]></description>
			<content:encoded><![CDATA[<div class="mceTemp mceIEcenter" style="text-align: center;">
<dl id="attachment_423" class="wp-caption aligncenter" style="width: 460px; text-align: center;">
<dt class="wp-caption-dt"><img class="size-full wp-image-423" title="Div + Css的代码" src="http://www.54tomgo.com/wp-content/uploads/2009/08/binglie.jpg" alt="Div + Css的代码" width="450" height="109" /></dt>
<dd class="wp-caption-dd">Div + Css的代码</dd>
</dl>
</div>
<p>今天打开FireFox，发现我们公司的网站一个广告栏飞到右侧去了。我想是使用了表格的缘故。网站是基于Div+css做的，但是自己对DIV建站水平不足，很多地方还保留了TD TR的表格。下决心修改了一下，现在没有不会飞到右侧了。这个代码的作用：在photoshop割图后，要用div接拼起来，实现几张图片的连接效果。对代码进行记录：<span id="more-424"></span></p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">#adimglist&nbsp; </li>
<li>img{</li>
<li>float:left; /*定义浮动到左侧，这样就可以实现几个连接的图片的并列了*/</li>
<li>margin: 0;/*定义图片的边框为零*/</li>
<li>}</li></ol></div>
<p>显示效果</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">&lt;style&gt;</li>
<li>#adimglist&nbsp; </li>
<li>img{</li>
<li>float:left; </li>
<li>margin: 0;</li>
<li>}</li>
<li>&lt;/style&gt;</li>
<li>&lt;div id=&quot;adimglist&quot;&gt;&lt;a href=&quot;http://www.yanwotang.com/catalog_160.html&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://www.yanwotang.com/syssite/home/shop/1/template/Cn00016/images/tupian_01.jpg&quot; alt=&quot;正官庄高丽参&quot; width=&quot;155&quot; height=&quot;150&quot; border=&quot;0&quot;&gt;&lt;/a&gt;</li>
<li>&lt;a href=&quot;http://www.yanwotang.com/product_140.html&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://www.yanwotang.com/syssite/home/shop/1/template/Cn00016/images/tupian_02.jpg&quot; alt=&quot;顶级白燕条皇&quot; width=&quot;125&quot; height=&quot;150&quot; border=&quot;0&quot;&gt;&lt;/a&gt;</li>
<li>&lt;a href=&quot;http://www.yanwotang.com/product_114.html&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://www.yanwotang.com/syssite/home/shop/1/template/Cn00016/images/tupian_03.jpg&quot; alt=&quot;三角白燕盏&quot; width=&quot;130&quot; height=&quot;150&quot; border=&quot;0&quot;&gt;&lt;/a&gt;</li>
<li>&lt;/div&gt;</li></ol></div>
]]></content:encoded>
			<wfw:commentRss>http://www.54tomgo.com/archives/424.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>我的wordpress rss订阅代码</title>
		<link>http://www.54tomgo.com/archives/305.html</link>
		<comments>http://www.54tomgo.com/archives/305.html#comments</comments>
		<pubDate>Wed, 19 Aug 2009 09:05:34 +0000</pubDate>
		<dc:creator>tomgo</dc:creator>
				<category><![CDATA[心得技巧]]></category>
		<category><![CDATA[rss代码]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress插件]]></category>
		<category><![CDATA[代码]]></category>

		<guid isPermaLink="false">http://www.54tomgo.com/?p=305</guid>
		<description><![CDATA[


rss订阅代码


      动手修改了RSS订阅的模版，加入了抓虾、google、鲜果。自己做了几个好看的订阅图标。效果请看我的右侧边栏。
      共享我修改的RSS订阅代码，可以备忘：
 
&#60;div class=&#34;box&#34;&#62;
&#60;h2&#62;RSS 订阅&#60;/h2&#62;
&#60;div class=&#34;subscribe&#34;&#62;
&#60;div class=&#34;rssfeed&#34;&#62;欢迎通过RSS订阅我的博客:&#60;/div&#62;
&#60;div class=&#34;rssfeedlinks&#34;&#62;&#60;a href=&#34;http://www.54tomgo.com/wp-admin/&#38;lt;?php bloginfo('rss2_url'); ?&#38;gt;&#34;&#62;&#60;img src=&#34;http://www.54tomgo.com/wp-content/themes/vibrant/images/postsrss.gif&#34; alt=&#34;订阅到我的博文&#34; width=&#34;91&#34; height=&#34;17&#34; /&#62;&#60;/a&#62;&#60;a href=&#34;http://www.xianguo.com/subscribe.php?url=http://www.54tomgo.com/feed&#34;&#62;&#60;img src=&#34;http://www.54tomgo.com/wp-content/themes/vibrant/images/xianguo.gif&#34; alt=&#34;订阅到鲜果&#34; width=&#34;91&#34; height=&#34;17&#34; /&#62;&#60;/a&#62; &#60;a href=&#34;http://www.google.com/reader/view/feed/http://www.54tomgo.com/feed&#34;&#62;&#60;img src=&#34;http://www.54tomgo.com/wp-content/themes/vibrant/images/google.gif&#34; alt=&#34;订阅到google&#34; width=&#34;91&#34; height=&#34;17&#34; /&#62; &#60;/a&#62;&#60;a href=&#34;http://www.zhuaxia.com/add_channel.php?url=http://www.54tomgo.com/feed&#34;&#62;&#60;img src=&#34;http://www.54tomgo.com/wp-content/themes/vibrant/images/zhuaxia.gif&#34; alt=&#34;订阅到抓虾&#34; width=&#34;91&#34; height=&#34;17&#34; /&#62; &#60;/a&#62;&#60;/div&#62;
&#60;div class=&#34;rssfeed&#34;&#62;请输入您的订阅Email:&#60;/div&#62;
&#60;!--p include (TEMPLATEPATH . '/feedburner.php');--&#62;&#60;/div&#62;
&#60;/div&#62;
]]></description>
			<content:encoded><![CDATA[<div class="mceTemp mceIEcenter" style="text-align: center;">
<dl id="attachment_306" class="wp-caption aligncenter" style="width: 460px; text-align: center;">
<dt class="wp-caption-dt"><img class="size-full wp-image-306" title="rss订阅代码" src="http://www.54tomgo.com/wp-content/uploads/2009/08/rss.jpg" alt="rss订阅代码" width="450" height="209" /></dt>
<dd class="wp-caption-dd">rss订阅代码</dd>
</dl>
</div>
<p>      动手修改了RSS订阅的模版，加入了抓虾、google、鲜果。自己做了几个好看的订阅图标。效果请看我的右侧边栏。<br />
      共享我修改的RSS订阅代码，可以备忘：<span id="more-305"></span></p>
<p> </p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">&lt;div class=&quot;box&quot;&gt;</li>
<li>&lt;h2&gt;RSS 订阅&lt;/h2&gt;</li>
<li>&lt;div class=&quot;subscribe&quot;&gt;</li>
<li>&lt;div class=&quot;rssfeed&quot;&gt;欢迎通过RSS订阅我的博客:&lt;/div&gt;</li>
<li>&lt;div class=&quot;rssfeedlinks&quot;&gt;&lt;a href=&quot;http://www.54tomgo.com/wp-admin/&amp;lt;?php bloginfo('rss2_url'); ?&amp;gt;&quot;&gt;&lt;img src=&quot;http://www.54tomgo.com/wp-content/themes/vibrant/images/postsrss.gif&quot; alt=&quot;订阅到我的博文&quot; width=&quot;91&quot; height=&quot;17&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.xianguo.com/subscribe.php?url=http://www.54tomgo.com/feed&quot;&gt;&lt;img src=&quot;http://www.54tomgo.com/wp-content/themes/vibrant/images/xianguo.gif&quot; alt=&quot;订阅到鲜果&quot; width=&quot;91&quot; height=&quot;17&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://www.google.com/reader/view/feed/http://www.54tomgo.com/feed&quot;&gt;&lt;img src=&quot;http://www.54tomgo.com/wp-content/themes/vibrant/images/google.gif&quot; alt=&quot;订阅到google&quot; width=&quot;91&quot; height=&quot;17&quot; /&gt; &lt;/a&gt;&lt;a href=&quot;http://www.zhuaxia.com/add_channel.php?url=http://www.54tomgo.com/feed&quot;&gt;&lt;img src=&quot;http://www.54tomgo.com/wp-content/themes/vibrant/images/zhuaxia.gif&quot; alt=&quot;订阅到抓虾&quot; width=&quot;91&quot; height=&quot;17&quot; /&gt; &lt;/a&gt;&lt;/div&gt;</li>
<li>&lt;div class=&quot;rssfeed&quot;&gt;请输入您的订阅Email:&lt;/div&gt;</li>
<li>&lt;!--p include (TEMPLATEPATH . '/feedburner.php');--&gt;&lt;/div&gt;</li>
<li>&lt;/div&gt;</li></ol></div>
]]></content:encoded>
			<wfw:commentRss>http://www.54tomgo.com/archives/305.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wordpress显示分类文章数量和月份文章数量代码</title>
		<link>http://www.54tomgo.com/archives/295.html</link>
		<comments>http://www.54tomgo.com/archives/295.html#comments</comments>
		<pubDate>Wed, 19 Aug 2009 01:06:42 +0000</pubDate>
		<dc:creator>tomgo</dc:creator>
				<category><![CDATA[心得技巧]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress插件]]></category>
		<category><![CDATA[代码]]></category>

		<guid isPermaLink="false">http://www.54tomgo.com/?p=295</guid>
		<description><![CDATA[


显示分类文章数量和月份文章数量代码


wordpress的代码很多，不知道为什么wordpress不把大家常用的，直接显示在页面上。可能是要锻炼大家的DIY精神？
这个是显示首页的分类的文章数量的代码，打开sidebar.php，查找
&#60;?php wp_list_categories('orderby=name&#38;title_li='); ?&#62;
替换为：
&#60;?php wp_list_categories('show_count=1&#38;orderby=name&#38;title_li='); ?
这个是显示首页的月份分类的文章数量的代码，还是查找sidebar.php文件里面的，
&#60;?php wp_get_archives('type=monthly&#38;limit=12'); ?&#62;
一样是添加
show_count=1&#38;
替换为：
&#60;?php wp_get_archives('show_post_count=1&#38;type=monthly&#38;limit=12'); ?&#62;
FTP上传后，OK~~
]]></description>
			<content:encoded><![CDATA[<div class="mceTemp mceIEcenter" style="text-align: center;">
<dl id="attachment_294" class="wp-caption aligncenter" style="width: 460px; text-align: center;">
<dt class="wp-caption-dt"><img class="size-full wp-image-294" title="显示分类文章数量和月份文章数量代码" src="http://www.54tomgo.com/wp-content/uploads/2009/08/shuliang.jpg" alt="wordpress显示分类文章数量和月份文章数量代码" width="450" height="245" /></dt>
<dd class="wp-caption-dd">显示分类文章数量和月份文章数量代码</dd>
</dl>
</div>
<p>wordpress的代码很多，不知道为什么wordpress不把大家常用的，直接显示在页面上。可能是要锻炼大家的DIY精神？<br />
这个是显示首页的分类的文章数量的代码，打开sidebar.php，查找<span id="more-295"></span></p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">&lt;?php wp_list_categories('orderby=name&amp;title_li='); ?&gt;</li></ol></div>
<p>替换为：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">&lt;?php wp_list_categories('show_count=1&amp;orderby=name&amp;title_li='); ?</li></ol></div>
<p>这个是显示首页的月份分类的文章数量的代码，还是查找sidebar.php文件里面的，</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">&lt;?php wp_get_archives('type=monthly&amp;limit=12'); ?&gt;</li></ol></div>
<p>一样是添加
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">show_count=1&amp;</li></ol></div>
<p>替换为：
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">&lt;?php wp_get_archives('show_post_count=1&amp;type=monthly&amp;limit=12'); ?&gt;</li></ol></div>
<p>FTP上传后，OK~~</p>
]]></content:encoded>
			<wfw:commentRss>http://www.54tomgo.com/archives/295.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>wordpress的统计信息代码,显示文章数、评论数、标签数等</title>
		<link>http://www.54tomgo.com/archives/264.html</link>
		<comments>http://www.54tomgo.com/archives/264.html#comments</comments>
		<pubDate>Tue, 18 Aug 2009 03:46:24 +0000</pubDate>
		<dc:creator>tomgo</dc:creator>
				<category><![CDATA[IT话题]]></category>
		<category><![CDATA[心得技巧]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress插件]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[统计代码]]></category>

		<guid isPermaLink="false">http://www.54tomgo.com/?p=264</guid>
		<description><![CDATA[


wordpress的统计信息代码


玩Wordpress少点DIY精神都不行，原来的wordpress主题是非常简陋的。幸亏wordpress的扩展性开放性够强，插件也非常多，所以很受欢迎。刚发现原来wordpress首页连统计信息都没有。搜索了很多插件，功能太过强大，没有必要。我只要统计几个信息就够了。其他的统计，我都用第3方统计网站来完成的。比如我现在是是了51.la的统计。原来用过wp23-statistics这个插件，但是现在不支持wordpress2.8了。搜索到原来自己添加代码也可以。这里共享一下我使用的统计代码，在主题的边栏添加：
&#60;li&#62;&#60;h2&#62;&#38;raquo;　统计&#60;/h2&#62;
&#60;ul&#62;
文章数量：&#60;?php 
$count_posts = wp_count_posts();
echo $published_posts = $count_posts-&#62;publish;
?&#62;&#160; 　分类数量：&#60;?php 
echo $count_categories = wp_count_terms('category');
?&#62;
&#60;br /&#62;&#60;br /&#62;
标签数量：&#60;?php echo $count_tags = wp_count_terms('post_tag'); ?&#62;&#160; 　评论数量：&#60;?php
$count_comments = get_comment_count();
echo $count_comments['approved'];
?&#62;&#60;/ul&#62;
&#60;/li&#62;
随带推荐一下Coolcode，谢谢共享这么好的代码插件，下载地址coolcode
]]></description>
			<content:encoded><![CDATA[<div class="mceTemp mceIEcenter" style="text-align: center;">
<dl id="attachment_263" class="wp-caption aligncenter" style="width: 460px; text-align: center;">
<dt class="wp-caption-dt"><img class="size-full wp-image-263" title="wordpress的统计信息代码" src="http://www.54tomgo.com/wp-content/uploads/2009/08/tongjixinxi.jpg" alt="wordpress的统计信息代码" width="450" height="168" /></dt>
<dd class="wp-caption-dd">wordpress的统计信息代码</dd>
</dl>
</div>
<p style="text-align: center;">玩Wordpress少点DIY精神都不行，原来的wordpress主题是非常简陋的。幸亏wordpress的扩展性开放性够强，插件也非常多，所以很受欢迎。刚发现原来wordpress首页连统计信息都没有。搜索了很多插件，功能太过强大，没有必要。我只要统计几个信息就够了。其他的统计，我都用第3方统计网站来完成的。<span id="more-264"></span>比如我现在是是了51.la的统计。原来用过wp23-statistics这个插件，但是现在不支持wordpress2.8了。搜索到原来自己添加代码也可以。这里共享一下我使用的统计代码，在主题的边栏添加：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">&lt;li&gt;&lt;h2&gt;&amp;raquo;　统计&lt;/h2&gt;</li>
<li>&lt;ul&gt;</li>
<li>文章数量：&lt;?php </li>
<li>$count_posts = wp_count_posts();</li>
<li>echo $published_posts = $count_posts-&gt;publish;</li>
<li>?&gt;&nbsp; 　分类数量：&lt;?php </li>
<li>echo $count_categories = wp_count_terms('category');</li>
<li>?&gt;</li>
<li>&lt;br /&gt;&lt;br /&gt;</li>
<li>标签数量：&lt;?php echo $count_tags = wp_count_terms('post_tag'); ?&gt;&nbsp; 　评论数量：&lt;?php</li>
<li>$count_comments = get_comment_count();</li>
<li>echo $count_comments['approved'];</li>
<li>?&gt;&lt;/ul&gt;</li>
<li>&lt;/li&gt;</li></ol></div>
<p>随带推荐一下Coolcode，谢谢共享这么好的代码插件，下载地址<a href="http://download.coolcode.cn/coolcode.zip">coolcode</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.54tomgo.com/archives/264.html/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>
