<?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://bulog.org/tag/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://bulog.org</link>
	<description>希望给你自由</description>
	<lastBuildDate>Sun, 25 Mar 2012 11:09:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>温和一点</title>
		<link>http://bulog.org/logs/essay/wen-he.html</link>
		<comments>http://bulog.org/logs/essay/wen-he.html#comments</comments>
		<pubDate>Tue, 08 Mar 2011 07:00:27 +0000</pubDate>
		<dc:creator>老四</dc:creator>
				<category><![CDATA[随笔]]></category>
		<category><![CDATA[博客]]></category>
		<category><![CDATA[网络]]></category>

		<guid isPermaLink="false">http://bulog.org/?p=2271</guid>
		<description><![CDATA[前几天大黄打电话来说PR更新了，晚上回去一查发现 bulog 这域名已经PR4了，算是谷歌对这博客一年多来还苟延残喘的活着的鼓励。虽然这段时间的后半截博客越来越难产，最近这一两月更是一文不拨，但它总算还活着。这不是一个健康的生命状态，但活着就有希望，就有改变的可能；而死亡，可能是涅槃，更可能是轮回。 我想上面一段话容易让善于联想的人产生联想（其实善于联想的人对每句话都会产生联想，就像阴谋论者会以为所有事件背后都有操纵者），但那实非我的本意，更不能代表我对某些观点的态度，我只是想单纯的说一件事情。这件事就是我做了一个又一个网站，一个又一个博客，没有越来越好来来来来，只有没完没了的从新鲜到厌倦。所以从这个博客开始，我决心做一个温和的改良派，即使以前的文章惨不忍睹，也不一杆子打死，删网站关域名重新来过。尽管这只是一件小事，但冲动同样只能创造悲剧。 相关日志2009/11/14 -- 博客自动生成description与keywords(完整版) (1)2009/11/14 -- Wp kit cn中的几种变量 (5)2010/04/23 -- 滑动关闭侧边栏(基于jQuery1.4) (20)2010/04/22 -- wordpress 默认小工具修改表 (17)2010/04/17 -- Widget Logic 参数 (9)2010/03/23 -- 无插件实现 wordpress 彩色标签云效果 (13)]]></description>
			<content:encoded><![CDATA[<p>前几天大黄打电话来说PR更新了，晚上回去一查发现 bulog 这域名已经PR4了，算是谷歌对这博客一年多来还苟延残喘的活着的鼓励。虽然这段时间的后半截博客越来越难产，最近这一两月更是一文不拨，但它总算还活着。这不是一个健康的生命状态，但活着就有希望，就有改变的可能；而死亡，可能是涅槃，更可能是轮回。<span id="more-2271"></span></p>
<p>我想上面一段话容易让善于联想的人产生联想（其实善于联想的人对每句话都会产生联想，就像阴谋论者会以为所有事件背后都有操纵者），但那实非我的本意，更不能代表我对某些观点的态度，我只是想单纯的说一件事情。这件事就是我做了一个又一个网站，一个又一个博客，没有越来越好来来来来，只有没完没了的从新鲜到厌倦。所以从这个博客开始，我决心做一个温和的改良派，即使以前的文章惨不忍睹，也不一杆子打死，删网站关域名重新来过。尽管这只是一件小事，但冲动同样只能创造悲剧。</p>
<h3  class="related_post_title">相关日志</h3><ul class="related_post"><li>2009/11/14 -- <a href="http://bulog.org/share/wp-description-keywords.html" title="博客自动生成description与keywords(完整版)">博客自动生成description与keywords(完整版)</a> (1)</li><li>2009/11/14 -- <a href="http://bulog.org/share/wp-kit-cn-bian-lian-han-shu.html" title="Wp kit cn中的几种变量">Wp kit cn中的几种变量</a> (5)</li><li>2010/04/23 -- <a href="http://bulog.org/share/wordpress/close-sidebar.html" title="滑动关闭侧边栏(基于jQuery1.4)">滑动关闭侧边栏(基于jQuery1.4)</a> (20)</li><li>2010/04/22 -- <a href="http://bulog.org/share/wordpress/default-widgets.html" title="wordpress 默认小工具修改表">wordpress 默认小工具修改表</a> (17)</li><li>2010/04/17 -- <a href="http://bulog.org/share/wordpress/widget-logic.html" title="Widget Logic 参数">Widget Logic 参数</a> (9)</li><li>2010/03/23 -- <a href="http://bulog.org/share/wordpress/wordpress-colore-tag.html" title="无插件实现 wordpress 彩色标签云效果">无插件实现 wordpress 彩色标签云效果</a> (13)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://bulog.org/logs/essay/wen-he.html/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>滑动关闭侧边栏(基于jQuery1.4)</title>
		<link>http://bulog.org/share/wordpress/close-sidebar.html</link>
		<comments>http://bulog.org/share/wordpress/close-sidebar.html#comments</comments>
		<pubDate>Fri, 23 Apr 2010 03:56:47 +0000</pubDate>
		<dc:creator>老四</dc:creator>
				<category><![CDATA[WP]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[博客]]></category>

		<guid isPermaLink="false">http://bulog.org/?p=1894</guid>
		<description><![CDATA[本文介绍的滑动效果，演示见本站文章页导航栏（关闭边栏）。之前在林木木的博客看到《关闭/显示侧边栏》一文，忍不住试了一下，但是对实际效果不太满意，于是一直没用。昨天翻看 jQuery 参考时，看到 1.4 版之后新出的几个函数，又想起“干掉边栏”这事，放上一试，感觉效果不坏，于是就有了这篇文章。 要实现此效果，首先需要加载 1.4 或更新版本的 jQuery 库： &#60;script src=&#34;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&#34; type=&#34;text/javascript&#34;&#62;&#60;!--mce:0--&#62;&#60;/script&#62; Html(加一个判断语句，只在文章页显示) &#60;?php if &#40;is_single&#40;&#41;&#41; &#123; ?&#62; &#60;li id=&#34;close-sidebar&#34;&#62;&#60;a&#62;关闭边栏&#60;/a&#62;&#60;/li&#62; &#60;?php &#125; ?&#62; CSS(显示小手) #close-sidebar&#123;cursor:pointer&#125; JS(delay为新增函数) $&#40;'#close-sidebar a'&#41;.toggle&#40;function&#40;&#41;&#123; $&#40;this&#41;.text&#40;&#34;显示边栏&#34;&#41;; $&#40;'#sidebar'&#41;.slideUp&#40;400&#41;;//用400毫秒的时间收起边栏 $&#40;'#main'&#41;.delay&#40;500&#41;.animate&#40;&#123;width: &#34;930px&#34;&#125;, 600&#41;;//花500毫秒等待边栏收起后，用600毫秒的时间加宽主栏 &#125;,function&#40;&#41;&#123; $&#40;this&#41;.text&#40;&#34;关闭边栏&#34;&#41;; $&#40;'#main'&#41;.animate&#40;&#123;width: &#34;649px&#34;&#125;, 600&#41;; $&#40;'#sidebar'&#41;.delay&#40;700&#41;.slideDown&#40;400&#41;; &#8230; <a href="http://bulog.org/share/wordpress/close-sidebar.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>本文介绍的滑动效果，演示见本站文章页导航栏（关闭边栏）。之前在林木木的博客看到《<a href="http://immmmm.com/close-show-sidebar-simple-code.html" target="_blank">关闭/显示侧边栏</a>》一文，忍不住试了一下，但是对实际效果不太满意，于是一直没用。昨天翻看 jQuery 参考时，看到 1.4 版之后新出的几个函数，又想起“干掉边栏”这事，放上一试，感觉效果不坏，于是就有了这篇文章。<span id="more-1894"></span></p>
<p>要实现此效果，首先需要加载 1.4 或更新版本的 jQuery 库：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;&lt;!--</span>mce<span style="color: #339933;">:</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">--&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Html(加一个判断语句，只在文章页显示)</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_single<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;">?&gt;</span>
&lt;li id=&quot;close-sidebar&quot;&gt;&lt;a&gt;关闭边栏&lt;/a&gt;&lt;/li&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>CSS(显示小手)</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#close-sidebar</span><span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span><span style="color: #993333;">pointer</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>JS(delay为新增函数)</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#close-sidebar a'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>toggle<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>text<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;显示边栏&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#sidebar'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>slideUp<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">400</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//用400毫秒的时间收起边栏</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#main'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>delay<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">500</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>animate<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>width<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;930px&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//花500毫秒等待边栏收起后，用600毫秒的时间加宽主栏</span>
	<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>text<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;关闭边栏&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#main'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>animate<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>width<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;649px&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#sidebar'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>delay<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">700</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>slideDown<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">400</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>补充：如果不想用jquery 1.4实现，可以使用以下代码：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#close-sidebar a'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>toggle<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> 
	$<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>text<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;显示边栏&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#sidebar'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>slideUp<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">400</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#main'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>animate<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>width<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;930px&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>text<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;关闭边栏&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
	$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#main'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>animate<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>width<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;649px&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">600</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#sidebar'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>slideDown<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">400</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3  class="related_post_title">相关日志</h3><ul class="related_post"><li>2010/04/24 -- <a href="http://bulog.org/share/wordpress/go-top.html" title="可以这样回到顶部">可以这样回到顶部</a> (13)</li><li>2010/04/22 -- <a href="http://bulog.org/share/wordpress/default-widgets.html" title="wordpress 默认小工具修改表">wordpress 默认小工具修改表</a> (17)</li><li>2010/03/23 -- <a href="http://bulog.org/share/wordpress/wordpress-colore-tag.html" title="无插件实现 wordpress 彩色标签云效果">无插件实现 wordpress 彩色标签云效果</a> (13)</li><li>2010/03/13 -- <a href="http://bulog.org/share/wordpress/wordpress-smilies-code.html" title="17行代码为 wordpress 添加评论表情列表">17行代码为 wordpress 添加评论表情列表</a> (20)</li><li>2010/03/09 -- <a href="http://bulog.org/share/wordpress/simple-hezi.html" title="Simple-hezi（wp主题）">Simple-hezi（wp主题）</a> (18)</li><li>2010/02/26 -- <a href="http://bulog.org/share/wordpress/wordpress-category.html" title="去掉wp分类目录前的category(非插件)">去掉wp分类目录前的category(非插件)</a> (15)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://bulog.org/share/wordpress/close-sidebar.html/feed</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>wordpress 默认小工具修改表</title>
		<link>http://bulog.org/share/wordpress/default-widgets.html</link>
		<comments>http://bulog.org/share/wordpress/default-widgets.html#comments</comments>
		<pubDate>Thu, 22 Apr 2010 12:49:07 +0000</pubDate>
		<dc:creator>老四</dc:creator>
				<category><![CDATA[WP]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[博客]]></category>

		<guid isPermaLink="false">http://bulog.org/?p=1888</guid>
		<description><![CDATA[WordPress 默认的边栏小工具代码写在default-widgets.php(wp-includes/default-widgets.php)。此文件中每个类对应一个小工具，如修改 RSS 样式（来自任何 RSS 或 Atom feed 的条目），只要找到 WP_Widget_RSS 这一类修改即可。以下是功能即与名称对照表： Widget名称 Widget类名 Widget介绍 页面 WP_Widget_Pages 您博客的 WordPress 页面 日历 WP_Widget_Calendar 您博客的文章日程表 文章索引模板 WP_Widget_Archives 您博客文章的月度存档 链接 WP_Widget_Links 您的链接表 功能 WP_Widget_Meta 登入/登出，管理，Feed 和 WordPress 链接 搜索 WP_Widget_Search 您博客的搜索框 文本 WP_Widget_Text 任意文本或HTML 分类目录 &#8230; <a href="http://bulog.org/share/wordpress/default-widgets.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>WordPress 默认的边栏小工具代码写在default-widgets.php(<em>wp-includes/default-widgets.php</em>)。此文件中每个类对应一个小工具，如修改 RSS 样式<em>（来自任何 RSS 或 Atom feed 的条目）</em>，只要找到 WP_Widget_RSS 这一类修改即可。以下是功能即与名称对照表：<span id="more-1888"></span></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="100">
<div><strong>Widget名称</strong></div>
</td>
<td width="200">
<div><strong>Widget类名</strong></div>
</td>
<td width="280">
<div><strong>Widget介绍</strong></div>
</td>
</tr>
<tr>
<td>页面</td>
<td>WP_Widget_Pages</td>
<td>您博客的 <a title="wordpress 分类" href="http://bulog.org/share/wordpress">WordPress </a>页面</td>
</tr>
<tr>
<td>日历</td>
<td>WP_Widget_Calendar</td>
<td>您博客的文章日程表</td>
</tr>
<tr>
<td>文章索引模板</td>
<td>WP_Widget_Archives</td>
<td>您博客文章的月度存档</td>
</tr>
<tr>
<td>链接</td>
<td>WP_Widget_Links</td>
<td>您的链接表</td>
</tr>
<tr>
<td>功能</td>
<td>WP_Widget_Meta</td>
<td>登入/登出，管理，Feed 和 WordPress 链接</td>
</tr>
<tr>
<td>搜索</td>
<td>WP_Widget_Search</td>
<td>您博客的搜索框</td>
</tr>
<tr>
<td>文本</td>
<td>WP_Widget_Text</td>
<td>任意文本或HTML</td>
</tr>
<tr>
<td>分类目录</td>
<td>WP_Widget_Categories</td>
<td>列表或是下拉菜单的分类目录</td>
</tr>
<tr>
<td>最近文章</td>
<td>WP_Widget_Recent_Posts</td>
<td>您博客的最近文章</td>
</tr>
<tr>
<td>最新评论</td>
<td>WP_Widget_Recent_Comments</td>
<td>最在侧边栏显示最新评论的列表</td>
</tr>
<tr>
<td>RSS</td>
<td>WP_Widget_RSS</td>
<td>来自任何 RSS 或 Atom feed 的条目</td>
</tr>
<tr>
<td>标签云</td>
<td>WP_Widget_Tag_Cloud</td>
<td>您最常使用的标签云</td>
</tr>
</tbody>
</table>
<h3  class="related_post_title">相关日志</h3><ul class="related_post"><li>2010/04/23 -- <a href="http://bulog.org/share/wordpress/close-sidebar.html" title="滑动关闭侧边栏(基于jQuery1.4)">滑动关闭侧边栏(基于jQuery1.4)</a> (20)</li><li>2010/03/23 -- <a href="http://bulog.org/share/wordpress/wordpress-colore-tag.html" title="无插件实现 wordpress 彩色标签云效果">无插件实现 wordpress 彩色标签云效果</a> (13)</li><li>2010/03/13 -- <a href="http://bulog.org/share/wordpress/wordpress-smilies-code.html" title="17行代码为 wordpress 添加评论表情列表">17行代码为 wordpress 添加评论表情列表</a> (20)</li><li>2010/03/09 -- <a href="http://bulog.org/share/wordpress/simple-hezi.html" title="Simple-hezi（wp主题）">Simple-hezi（wp主题）</a> (18)</li><li>2010/02/26 -- <a href="http://bulog.org/share/wordpress/wordpress-category.html" title="去掉wp分类目录前的category(非插件)">去掉wp分类目录前的category(非插件)</a> (15)</li><li>2011/03/08 -- <a href="http://bulog.org/logs/essay/wen-he.html" title="温和一点">温和一点</a> (13)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://bulog.org/share/wordpress/default-widgets.html/feed</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Widget Logic 参数</title>
		<link>http://bulog.org/share/wordpress/widget-logic.html</link>
		<comments>http://bulog.org/share/wordpress/widget-logic.html#comments</comments>
		<pubDate>Sat, 17 Apr 2010 15:32:22 +0000</pubDate>
		<dc:creator>老四</dc:creator>
				<category><![CDATA[WP]]></category>
		<category><![CDATA[博客]]></category>
		<category><![CDATA[插件]]></category>
		<category><![CDATA[站长]]></category>

		<guid isPermaLink="false">http://bulog.org/?p=1863</guid>
		<description><![CDATA[Widget Logic，顾名思义，这是一款管理后台小工具插件，用来控制边栏小工具在各个页面的显示或隐藏，本文介绍它的使用方法与相关参数，关于 Widget Logic 的安装使用以及维护参照此页：http://wordpress.org/extend/plugins/widget-logic/ Widget Logic 的常用参数 is_home() 主页 is_single() 文章页 is_page() 页面 is_category() 文章分类页 is_tag() 文章标签页 is_archive() 归档页 is_404() 404页 is_search() 搜索结果页 is_feed() 订阅页 Widget Logic 的使用方法 “&#124;&#124;”表示“或”，“&#38;&#38;”表示“和”，“!”表示“非”，示例如下： is_home() 在首页显示 !is_home() 只有首页不显示 is_category(1) 在id为1的分类中显示 is_category(logs) 在名称为logs的分类中显示 is_home() &#124;&#124;is_archive() 在首页或存档页显示 &#8230; <a href="http://bulog.org/share/wordpress/widget-logic.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Widget Logic，顾名思义，这是一款管理后台小工具插件，用来控制边栏小工具在各个页面的显示或隐藏，本文介绍它的使用方法与相关参数，关于 Widget Logic 的安装使用以及维护参照此页：http://wordpress.org/extend/plugins/widget-logic/<span id="more-1863"></span></p>
<h4>Widget Logic 的常用参数</h4>
<table border="1" width="400">
<tbody>
<tr>
<td>is_home()</td>
<td>主页</td>
</tr>
<tr>
<td>is_single()</td>
<td>文章页</td>
</tr>
<tr>
<td>is_page()</td>
<td>页面</td>
</tr>
<tr>
<td>is_category()</td>
<td>文章分类页</td>
</tr>
<tr>
<td>is_tag()</td>
<td>文章标签页</td>
</tr>
<tr>
<td>is_archive()</td>
<td>归档页</td>
</tr>
<tr>
<td>is_404()</td>
<td>404页</td>
</tr>
<tr>
<td>is_search()</td>
<td>搜索结果页</td>
</tr>
<tr>
<td>is_feed()</td>
<td>订阅页</td>
</tr>
</tbody>
</table>
<h4>Widget Logic 的使用方法</h4>
<p>“||”表示“或”，“&amp;&amp;”表示“和”，“!”表示“非”，示例如下：</p>
<table border="1" width="400">
<tbody>
<tr>
<td>is_home()</td>
<td>在首页显示</td>
</tr>
<tr>
<td>!is_home()</td>
<td>只有首页不显示</td>
</tr>
<tr>
<td>is_category(1)</td>
<td>在id为1的分类中显示</td>
</tr>
<tr>
<td>is_category(logs)</td>
<td>在名称为logs的分类中显示</td>
</tr>
<tr>
<td>is_home() ||is_archive()</td>
<td>在首页或存档页显示</td>
</tr>
</tbody>
</table>
<h3  class="related_post_title">相关日志</h3><ul class="related_post"><li>2010/01/31 -- <a href="http://bulog.org/share/wordpress/what-is-blog.html" title="如何搭建一个独立博客？">如何搭建一个独立博客？</a> (30)</li><li>2011/03/08 -- <a href="http://bulog.org/logs/essay/wen-he.html" title="温和一点">温和一点</a> (13)</li><li>2010/04/23 -- <a href="http://bulog.org/share/wordpress/close-sidebar.html" title="滑动关闭侧边栏(基于jQuery1.4)">滑动关闭侧边栏(基于jQuery1.4)</a> (20)</li><li>2010/04/22 -- <a href="http://bulog.org/share/wordpress/default-widgets.html" title="wordpress 默认小工具修改表">wordpress 默认小工具修改表</a> (17)</li><li>2010/03/23 -- <a href="http://bulog.org/share/wordpress/wordpress-colore-tag.html" title="无插件实现 wordpress 彩色标签云效果">无插件实现 wordpress 彩色标签云效果</a> (13)</li><li>2010/03/21 -- <a href="http://bulog.org/share/wordpress/wordpress-artisteer.html" title="Wordpress 主题生成软件">Wordpress 主题生成软件</a> (18)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://bulog.org/share/wordpress/widget-logic.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>无插件实现 wordpress 彩色标签云效果</title>
		<link>http://bulog.org/share/wordpress/wordpress-colore-tag.html</link>
		<comments>http://bulog.org/share/wordpress/wordpress-colore-tag.html#comments</comments>
		<pubDate>Tue, 23 Mar 2010 15:09:11 +0000</pubDate>
		<dc:creator>老四</dc:creator>
				<category><![CDATA[WP]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[博客]]></category>

		<guid isPermaLink="false">http://bulog.org/?p=1639</guid>
		<description><![CDATA[边栏的标签云（Tag Cloud）是 WordPress 2.3 版以后的内置功能，在后台小工具中直接拖动添加即可。不过标签字体默认情况尺寸不同，但色彩一致，看起来相当杂乱。虽然有 Simple Tags 等插件可以为标签上色，但几行代码就可以实现的功能还是不插了。 使用方法： 将以下代码放入主题包 functions.php 文件中（如果没有这个文件，新建保存即可）： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 &#60;?php function colorCloud&#40;$text&#41; &#123; $text = preg_replace_callback&#40;'&#124;&#60;a (.+?)&#62;&#124;i', 'colorCloudCallback', $text&#41;; return $text; &#125; function &#8230; <a href="http://bulog.org/share/wordpress/wordpress-colore-tag.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>边栏的标签云（Tag Cloud）是 WordPress 2.3 版以后的内置功能，在后台小工具中直接拖动添加即可。不过标签字体默认情况尺寸不同，但色彩一致，看起来相当杂乱。虽然有 Simple Tags 等插件可以为标签上色，但几行代码就可以实现的功能还是不插了。<span id="more-1639"></span></p>
<p><strong>使用方法：</strong></p>
<p>将以下代码放入主题包 <strong>functions.php</strong> 文件中<em>（如果没有这个文件，新建保存即可）</em>：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td 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;">function</span> colorCloud<span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace_callback</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'|&lt;a (.+?)&gt;|i'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'colorCloudCallback'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$text</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> 
<span style="color: #000000; font-weight: bold;">function</span> colorCloudCallback<span style="color: #009900;">&#40;</span><span style="color: #000088;">$matches</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$matches</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$color</span> <span style="color: #339933;">=</span> <span style="color: #990000;">dechex</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">rand</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">16777215</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$pattern</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'/style=(\'|\&quot;)(.*)(\'|\&quot;)/i'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pattern</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;style=<span style="color: #000099; font-weight: bold;">\&quot;</span>color:#<span style="color: #006699; font-weight: bold;">{$color}</span>;<span style="color: #006699; font-weight: bold;">$2</span>;<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">&quot;&lt;a <span style="color: #006699; font-weight: bold;">$text</span>&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> 
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_tag_cloud'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'colorCloud'</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: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p><strong>第8行代码&#8221;$color=dechex(rand(0,16777215));&#8221;</strong>：作用是定义标签随机颜色的十进制数值范围，0 等于 #000000，16777215 等于 #ffffff。你可以使用进制换算工具换算后修改这行代码，改变颜色范围。</p>
<p>修改完成后，使用下面这段代码在博客中调用或者直接在小工具中添加标签模块即可：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_tag_cloud<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'smallest=8&amp;largest=24&amp;number=50'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p><strong>函数说明</strong>：</p>
<ul>
<li>
“smallest”：最小的字体尺寸（使用频率最少的标签）</li>
<li>
“largest”：最大的字体尺寸（频率最多的）</li>
<li>
“number”：则表示标签显示数量。</li>
</ul>
<p>对于大多数不熟悉 php 的用户，这一小改动的最大难点在于如何向 functions.php 中插入代码。因此我把代码加了头尾，使用时请直接将本文第一段代码粘贴到 functions.php 的<strong>末尾处</strong>。</p>
<p><a href="http://bulog.org/archives" target="_blank"><img class="alignnone" title="预览" src="http://bulog.org/demo.gif" alt="预览" width="60" height="20" /></a></p>
<p><em>本文源代码来自<a href="http://www.chinaz.com/Webbiz/Exp/09229253R009.html" target="_blank">站长网</a>。</em></p>
<h3  class="related_post_title">相关日志</h3><ul class="related_post"><li>2010/04/23 -- <a href="http://bulog.org/share/wordpress/close-sidebar.html" title="滑动关闭侧边栏(基于jQuery1.4)">滑动关闭侧边栏(基于jQuery1.4)</a> (20)</li><li>2010/04/22 -- <a href="http://bulog.org/share/wordpress/default-widgets.html" title="wordpress 默认小工具修改表">wordpress 默认小工具修改表</a> (17)</li><li>2010/03/13 -- <a href="http://bulog.org/share/wordpress/wordpress-smilies-code.html" title="17行代码为 wordpress 添加评论表情列表">17行代码为 wordpress 添加评论表情列表</a> (20)</li><li>2010/03/09 -- <a href="http://bulog.org/share/wordpress/simple-hezi.html" title="Simple-hezi（wp主题）">Simple-hezi（wp主题）</a> (18)</li><li>2010/02/26 -- <a href="http://bulog.org/share/wordpress/wordpress-category.html" title="去掉wp分类目录前的category(非插件)">去掉wp分类目录前的category(非插件)</a> (15)</li><li>2011/03/08 -- <a href="http://bulog.org/logs/essay/wen-he.html" title="温和一点">温和一点</a> (13)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://bulog.org/share/wordpress/wordpress-colore-tag.html/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>WordPress 主题生成软件</title>
		<link>http://bulog.org/share/wordpress/wordpress-artisteer.html</link>
		<comments>http://bulog.org/share/wordpress/wordpress-artisteer.html#comments</comments>
		<pubDate>Sun, 21 Mar 2010 08:07:40 +0000</pubDate>
		<dc:creator>老四</dc:creator>
				<category><![CDATA[WP]]></category>
		<category><![CDATA[博客]]></category>
		<category><![CDATA[工具]]></category>
		<category><![CDATA[软件]]></category>

		<guid isPermaLink="false">http://bulog.org/?p=1599</guid>
		<description><![CDATA[虽说 WordPress 的主题数以万计，但众口难调，找不到心怡主题的大有人在。于是众多 wper 发问：没有 php、css 基础，我可以制作自己的主题吗？答案当然是肯定的，Artisteer 就是基于这一理念开发的主题制作软件。把代码交给机器写，你只要动动鼠标即可。 看看 Artisteer 自己怎么说： Design awesome blogs and cool web templates in minutes Export to Blogger, Joomla, WordPress and other CMS products No need to learn Photoshop, CSS, HTML or other technologies Fun &#8230; <a href="http://bulog.org/share/wordpress/wordpress-artisteer.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>虽说 <a href="http://bulog.org/share/wordpress" target="_blank">WordPress</a> 的<a href="http://bulog.org/themes" target="_blank">主题</a>数以万计，但众口难调，找不到心怡主题的大有人在。于是众多 wper 发问：<strong>没有 php、css 基础，我可以制作自己的主题吗</strong>？答案当然是肯定的，Artisteer 就是基于这一理念开发的主题制作软件。把代码交给机器写，你只要动动鼠标即可。<span id="more-1599"></span></p>
<p>看看 <a href="http://bulog.org/share/wordpress/wordpress-artisteer.html">Artisteer</a> 自己怎么说：</p>
<ul>
<li>Design awesome blogs and cool web templates<strong> in minutes</strong></li>
<li>Export to Blogger, Joomla, <strong>WordPress</strong> and other CMS products</li>
<li><strong>No need to learn</strong> Photoshop, CSS, HTML or other technologies</li>
<li>Fun and <strong>easy</strong> to use!（<a href="http://translate.google.cn/translate_t?rlz=1C1_____enCN361CN362&amp;sourceid=chrome&amp;q=Design%20awesome%20blogs%20and%20cool%20web%20templates%20in%20minutes&amp;um=1&amp;ie=UTF-8&amp;sa=N&amp;hl=zh-CN&amp;tab=wT#auto|zh-CN|Design%20awesome%20blogs%20and%20cool%20web%20templates%20in%20minutes%0AExport%20to%20Blogger%2C%20Joomla%2C%20Wordpress%20and%20other%20CMS%20products%0ANo%20need%20to%20learn%20Photoshop%2C%20CSS%2C%20HTML%20or%20other%20technologies%0AFun%20and%20easy%20to%20use!" target="_blank"><em><strong>翻译</strong></em></a>）</li>
</ul>
<p>目前 Artisteer 的最新版本是 2.3（Artisteer 2 及以上版本正常运行需要有 <strong>Microsoft .NET Framework</strong> (<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&amp;displaylang=zh-cn" target="_blank"><em>下载</em></a>) 的支持）。</p>
<ol>
<li>Artisteer 2.3 <strong>支持的语言</strong>：English, German, Dutch, French, Spanish,Portuguese, Italian, Swedish, Japanese,Arabic, <strong>Chinese</strong>, Polish and Russian。</li>
<li>Artisteer 2.3 <strong>支持的程序</strong>：html,WordPress,Joomla!,Blogger,Drupal。</li>
</ol>
<p>Artisteer 家庭版与标准版的售价分别为 $49.95/$129.95，如果不愿意购买，可以使用试用版。这一版本没有任何功能限制，但它会在生成的主题（主要是图片）中加上“试用”水印。但如果你会一点 ps，这不算是大问题。</p>
<p style="text-align: center;"><a href="http://download.cnet.com/Artisteer/3000-10247_4-10886734.html?part=dl-Artisteer" target="_blank"><img class="aligncenter" title="下载" src="http://bulog.org/down.gif" alt="下载" width="60" height="20" /></a></p>
<h3  class="related_post_title">相关日志</h3><ul class="related_post"><li>2009/12/12 -- <a href="http://bulog.org/share/wordpress/more-link.html" title="More-link">More-link</a> (2)</li><li>2011/07/10 -- <a href="http://bulog.org/share/tool/google-plus-gfw.html" title="免翻墙访问 Google+">免翻墙访问 Google+</a> (38)</li><li>2011/03/08 -- <a href="http://bulog.org/logs/essay/wen-he.html" title="温和一点">温和一点</a> (13)</li><li>2010/04/23 -- <a href="http://bulog.org/share/wordpress/close-sidebar.html" title="滑动关闭侧边栏(基于jQuery1.4)">滑动关闭侧边栏(基于jQuery1.4)</a> (20)</li><li>2010/04/22 -- <a href="http://bulog.org/share/wordpress/default-widgets.html" title="wordpress 默认小工具修改表">wordpress 默认小工具修改表</a> (17)</li><li>2010/04/17 -- <a href="http://bulog.org/share/wordpress/widget-logic.html" title="Widget Logic 参数">Widget Logic 参数</a> (9)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://bulog.org/share/wordpress/wordpress-artisteer.html/feed</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>17行代码为 wordpress 添加评论表情列表</title>
		<link>http://bulog.org/share/wordpress/wordpress-smilies-code.html</link>
		<comments>http://bulog.org/share/wordpress/wordpress-smilies-code.html#comments</comments>
		<pubDate>Sat, 13 Mar 2010 11:09:04 +0000</pubDate>
		<dc:creator>老四</dc:creator>
				<category><![CDATA[WP]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[博客]]></category>

		<guid isPermaLink="false">http://bulog.org/?p=1470</guid>
		<description><![CDATA[为 WordPress 添加评论表情列表可以用插件解决，但把它集成到模板中更方便日后维护。这段代码不是我写的，我只是把它从一个叫做 wp-smilies 的插件中扒了出来，不加注释它只有17行代码，没有必要让这个文件独立存在加载。 使用方法：把代码放到模板 comments.php 文件中的合适位置，效果见本站。 具体代码如下： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 &#60;!--smilies--&#62; &#60;?php function wp_smilies&#40;&#41; &#123; global $wpsmiliestrans; if &#40; !get_option&#40;'use_smilies'&#41; or &#40;empty&#40;$wpsmiliestrans&#41;&#41;&#41; &#8230; <a href="http://bulog.org/share/wordpress/wordpress-smilies-code.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>为 <a href="http://bulog.org/share/wordpress">WordPress</a> 添加评论表情列表可以用插件解决，但把它集成到模板中更方便日后维护。这段代码不是我写的，我只是把它从一个叫做 wp-smilies 的插件中扒了出来，不加注释它只有17行代码，没有必要让这个文件独立存在加载。<br />
<span id="more-1470"></span>使用方法：把代码放到模板 comments.php 文件中的合适位置，效果见本站。<br />
具体代码如下：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;!--smilies--&gt;        
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">function</span> wp_smilies<span style="color: #009900;">&#40;</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;">$wpsmiliestrans</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'use_smilies'</span><span style="color: #009900;">&#41;</span> or <span style="color: #009900;">&#40;</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wpsmiliestrans</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$smilies</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_unique</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wpsmiliestrans</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$link</span><span style="color: #339933;">=</span><span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$smilies</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$key</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$smile</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wpurl'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/wp-includes/images/smilies/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$smile</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$value</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$key</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$img</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;img src=<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #006699; font-weight: bold;">{$file}</span><span style="color: #000099; font-weight: bold;">\&quot;</span> alt=<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #006699; font-weight: bold;">{$smile}</span><span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$imglink</span> <span style="color: #339933;">=</span> <span style="color: #990000;">htmlspecialchars</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$img</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$link</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>#commentform<span style="color: #000099; font-weight: bold;">\&quot;</span> title=<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #006699; font-weight: bold;">{$smile}</span><span style="color: #000099; font-weight: bold;">\&quot;</span> onclick=<span style="color: #000099; font-weight: bold;">\&quot;</span>document.getElementById('comment').value += '<span style="color: #006699; font-weight: bold;">{$value}</span>'<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #006699; font-weight: bold;">{$img}</span>&lt;/a&gt;&amp;nbsp;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;div class=&quot;wp_smilies&quot;&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$link</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/div&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_smilies<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>
&lt;!--smilies--&gt;</pre></td></tr></table></div>

<p>感谢 wp-smilies 的作者 <a target="_blank" href="http://www.thinkagain.cn/">ThinkAgain</a>，如果你感觉此文不妥，请来信告知。</p>
<h3  class="related_post_title">相关日志</h3><ul class="related_post"><li>2010/04/23 -- <a href="http://bulog.org/share/wordpress/close-sidebar.html" title="滑动关闭侧边栏(基于jQuery1.4)">滑动关闭侧边栏(基于jQuery1.4)</a> (20)</li><li>2010/04/22 -- <a href="http://bulog.org/share/wordpress/default-widgets.html" title="wordpress 默认小工具修改表">wordpress 默认小工具修改表</a> (17)</li><li>2010/03/23 -- <a href="http://bulog.org/share/wordpress/wordpress-colore-tag.html" title="无插件实现 wordpress 彩色标签云效果">无插件实现 wordpress 彩色标签云效果</a> (13)</li><li>2010/03/09 -- <a href="http://bulog.org/share/wordpress/simple-hezi.html" title="Simple-hezi（wp主题）">Simple-hezi（wp主题）</a> (18)</li><li>2010/02/26 -- <a href="http://bulog.org/share/wordpress/wordpress-category.html" title="去掉wp分类目录前的category(非插件)">去掉wp分类目录前的category(非插件)</a> (15)</li><li>2011/03/08 -- <a href="http://bulog.org/logs/essay/wen-he.html" title="温和一点">温和一点</a> (13)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://bulog.org/share/wordpress/wordpress-smilies-code.html/feed</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>dotbox (wordpress主题)</title>
		<link>http://bulog.org/share/wordpress/dotbox.html</link>
		<comments>http://bulog.org/share/wordpress/dotbox.html#comments</comments>
		<pubDate>Fri, 12 Mar 2010 03:00:19 +0000</pubDate>
		<dc:creator>老四</dc:creator>
				<category><![CDATA[WP]]></category>
		<category><![CDATA[主题]]></category>
		<category><![CDATA[博客]]></category>

		<guid isPermaLink="false">http://bulog.org/?p=1443</guid>
		<description><![CDATA[主题：dotbox（老四的盒子） 演示：本站 版本：1.0（别想着升级，只有 1.0） 关键字：wordpress theme,灰白,简洁,两栏,ajax 评论,广告位,后台管理 wopus分流 与之前的 ibox 主题相比，dotbox 并非仅限于色彩与布局的改变。dotbox 中可以更方便的通过后台添加控制博客边栏广告（需要根据说明文档开启）。 dotbox 基于 iNove，灵感来自清杯浅酌。 修改 大脚 : 不知道为什么我在IE下会出现错误信息。 这是由于在首页加载的 base.js 中的一段代码在首页没有对象造成的，现在已经把这段代码转移到了 comment.js 中，有此问题的童鞋请重新下载主题包替换 base.js, comment.js 这两个文件。 相关日志2010/03/09 -- Simple-hezi（wp主题） (18)2010/01/31 -- Ibox 1.0 (57)2011/03/08 -- 温和一点 (13)2010/04/23 -- 滑动关闭侧边栏(基于jQuery1.4) (20)2010/04/22 &#8230; <a href="http://bulog.org/share/wordpress/dotbox.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>主题：</strong><a href="http://bulog.org/share/wordpress/dotbox.html">dotbox</a>（老四的盒子）<br />
<strong>演示：</strong>本站<br />
<strong>版本：</strong>1.0（别想着升级，只有 1.0）<br />
<strong>关键字：</strong><a href="http://bulog.org/share/wordpress" target="_blank">wordpress</a> <a href="http://bulog.org/themes" target="_blank">theme</a>,灰白,简洁,两栏,ajax 评论,广告位,后台管理</p>
<p><span id="more-1443"></span><a href="http://bulog.org" target="_blank"><img class="alignnone" title="预览" src="http://bulog.org/demo.gif" alt="预览" width="60" height="20" /></a><a href="http://dotknow.googlecode.com/files/dotbox.zip" target="_blank"><img class="alignnone" title="下载" src="http://bulog.org/down.gif" alt="下载" width="60" height="20" /></a></p>
<p><a href="http://dotknow.googlecode.com/files/dotbox.zip" target="_blank"></a><a href="http://themes.wopus.org/wpthemes/cn-wordpress-themes/3192.html" target="_blank">wopus分流</a></p>
<p>与之前的 <a href="http://bulog.org/share/wordpress/ibox-1-0.html" target="_blank">ibox</a> 主题相比，<a href="http://bulog.org/share/wordpress/dotbox.html">dotbox</a> 并非仅限于色彩与布局的改变。dotbox 中可以更方便的通过后台添加控制博客边栏广告（需要根据说明文档开启）。</p>
<p>dotbox 基于 <a href="http://wordpress.org/extend/themes/inove" target="_blank">iNove</a>，灵感来自<a href="http://xuzhuoer.com" target="_blank">清杯浅酌</a>。</p>
<h4>修改</h4>
<blockquote cite="#commentbody-1619"><p><strong><a href="#comment-1619">大脚</a> :</strong></p>
<p>不知道为什么我在IE下会出现错误信息。</p></blockquote>
<p>这是由于在首页加载的 base.js 中的一段代码在首页没有对象造成的，现在已经把这段代码转移到了 comment.js 中，有此问题的童鞋请重新下载主题包替换 base.js, comment.js 这两个文件。</p>
<hr /><img class="alignnone" title="dotbox" src="http://i565.photobucket.com/albums/ss94/heziblog/dotbox.jpg" alt="dotbox" width="550" height="413" /></p>
<h3  class="related_post_title">相关日志</h3><ul class="related_post"><li>2010/03/09 -- <a href="http://bulog.org/share/wordpress/simple-hezi.html" title="Simple-hezi（wp主题）">Simple-hezi（wp主题）</a> (18)</li><li>2010/01/31 -- <a href="http://bulog.org/share/wordpress/ibox-1-0.html" title="Ibox 1.0">Ibox 1.0</a> (57)</li><li>2011/03/08 -- <a href="http://bulog.org/logs/essay/wen-he.html" title="温和一点">温和一点</a> (13)</li><li>2010/04/23 -- <a href="http://bulog.org/share/wordpress/close-sidebar.html" title="滑动关闭侧边栏(基于jQuery1.4)">滑动关闭侧边栏(基于jQuery1.4)</a> (20)</li><li>2010/04/22 -- <a href="http://bulog.org/share/wordpress/default-widgets.html" title="wordpress 默认小工具修改表">wordpress 默认小工具修改表</a> (17)</li><li>2010/04/17 -- <a href="http://bulog.org/share/wordpress/widget-logic.html" title="Widget Logic 参数">Widget Logic 参数</a> (9)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://bulog.org/share/wordpress/dotbox.html/feed</wfw:commentRss>
		<slash:comments>72</slash:comments>
		</item>
		<item>
		<title>Simple-hezi（wp主题）</title>
		<link>http://bulog.org/share/wordpress/simple-hezi.html</link>
		<comments>http://bulog.org/share/wordpress/simple-hezi.html#comments</comments>
		<pubDate>Tue, 09 Mar 2010 11:15:44 +0000</pubDate>
		<dc:creator>老四</dc:creator>
				<category><![CDATA[WP]]></category>
		<category><![CDATA[主题]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[博客]]></category>

		<guid isPermaLink="false">http://bulog.org/?p=1399</guid>
		<description><![CDATA[主题：Simple-hezi，基于 wordpress 自带主题 Classic 演绎而成，宽度自适应。 演示：http://hulog.cn/ 版本：1.0(大概不会有2.0了) 关键字：白灰，两栏，简洁，wordpress theme Simple-hezi，顾名思义，简洁的盒子。主题包只有 30k，特别适合博客放置在国外并且喜欢简洁的用户。 如果哪位朋友使用了请留言通知我，我会把你的站作为演示，目前作演示站的那个空间快要到期了。 相关日志2010/04/23 -- 滑动关闭侧边栏(基于jQuery1.4) (20)2010/04/22 -- wordpress 默认小工具修改表 (17)2010/03/23 -- 无插件实现 wordpress 彩色标签云效果 (13)2010/03/13 -- 17行代码为 wordpress 添加评论表情列表 (20)2010/03/12 -- dotbox (wordpress主题) (72)2010/02/26 -- 去掉wp分类目录前的category(非插件) (15)]]></description>
			<content:encoded><![CDATA[<p><strong>主题：</strong><a href="http://bulog.org/share/wordpress/simple-hezi.html">Simple-hezi</a>，基于 wordpress 自带主题 Classic 演绎而成，宽度自适应。<br />
<strong>演示：</strong><a href="http://hulog.cn/" target="_blank">http://hulog.cn/</a><br />
<strong>版本：</strong>1.0(大概不会有2.0了)<br />
<strong>关键字：</strong>白灰，两栏，简洁，<a href="http://bulog.org/share/wordpress">wordpress</a> theme<br />
<span id="more-1399"></span> <a href="http://hulog.cn/" target="_blank"><img class="alignnone" title="预览" src="http://bulog.org/demo.gif" alt="预览" width="60" height="20" /></a><a href="http://dotknow.googlecode.com/files/Simple-hezi.zip" target="_blank"><img class="alignnone" title="下载" src="http://bulog.org/down.gif" alt="下载" width="60" height="20" /></a></p>
<p>Simple-hezi，顾名思义，简洁的盒子。主题包只有 30k，特别适合博客放置在国外并且喜欢简洁的用户。</p>
<p>如果哪位朋友使用了请留言通知我，我会把你的站作为演示，目前作演示站的那个空间快要到期了。</p>
<h3  class="related_post_title">相关日志</h3><ul class="related_post"><li>2010/04/23 -- <a href="http://bulog.org/share/wordpress/close-sidebar.html" title="滑动关闭侧边栏(基于jQuery1.4)">滑动关闭侧边栏(基于jQuery1.4)</a> (20)</li><li>2010/04/22 -- <a href="http://bulog.org/share/wordpress/default-widgets.html" title="wordpress 默认小工具修改表">wordpress 默认小工具修改表</a> (17)</li><li>2010/03/23 -- <a href="http://bulog.org/share/wordpress/wordpress-colore-tag.html" title="无插件实现 wordpress 彩色标签云效果">无插件实现 wordpress 彩色标签云效果</a> (13)</li><li>2010/03/13 -- <a href="http://bulog.org/share/wordpress/wordpress-smilies-code.html" title="17行代码为 wordpress 添加评论表情列表">17行代码为 wordpress 添加评论表情列表</a> (20)</li><li>2010/03/12 -- <a href="http://bulog.org/share/wordpress/dotbox.html" title="dotbox (wordpress主题)">dotbox (wordpress主题)</a> (72)</li><li>2010/02/26 -- <a href="http://bulog.org/share/wordpress/wordpress-category.html" title="去掉wp分类目录前的category(非插件)">去掉wp分类目录前的category(非插件)</a> (15)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://bulog.org/share/wordpress/simple-hezi.html/feed</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>去掉wp分类目录前的category(非插件)</title>
		<link>http://bulog.org/share/wordpress/wordpress-category.html</link>
		<comments>http://bulog.org/share/wordpress/wordpress-category.html#comments</comments>
		<pubDate>Fri, 26 Feb 2010 10:33:03 +0000</pubDate>
		<dc:creator>老四</dc:creator>
				<category><![CDATA[WP]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[博客]]></category>

		<guid isPermaLink="false">http://bulog.org/?p=1172</guid>
		<description><![CDATA[WordPress 的文章分类网址默认显示在 category 父目录下，例如分类名为 wp ，分类链接样式则为 http://blog.com/category/wp。如果后台设置的文章静态链接结构为“/%category%/%postname%.html”，例： http://blog.com/wp/x.html，那么之前的分类链接显得不合逻辑，所有我们希望将它去掉。 对于 wordpress 中的各类问题，几乎都能找到插件解决，这个问题也不例外。但是很大一部分 wper 患有严重的代码控，但凡修改代码可以达到的效果绝不用插件代替，即便后者更为简单。所以在这里介绍一个非插件的方法： 在目录 wp-includes/category-template.php 文件中搜索： $catlink = $wp_rewrite-&#38;gt;get_category_permastruct&#40;&#41;; 在下面添加： $catlink = str_replace&#40;'/category', &#34;&#34;, $catlink&#41;; 保存即可。 今日看点：河南青年看守所内死亡 警方称喝开水后突然发病（网易很知趣，直接关闭评论） 相关日志2010/04/23 -- 滑动关闭侧边栏(基于jQuery1.4) (20)2010/04/22 -- wordpress 默认小工具修改表 (17)2010/03/23 -- 无插件实现 wordpress 彩色标签云效果 (13)2010/03/13 &#8230; <a href="http://bulog.org/share/wordpress/wordpress-category.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>WordPress 的文章分类网址默认显示在 category 父目录下，例如分类名为 wp ，分类链接样式则为 http://blog.com/category/wp。如果后台设置的文章静态链接结构为“/%category%/%postname%.html”，例： http://blog.com/wp/x.html，那么之前的分类链接显得不合逻辑，所有我们希望将它去掉。</p>
<p><span id="more-1172"></span>对于 wordpress 中的各类问题，几乎都能找到插件解决，这个问题也不例外。但是很大一部分 wper 患有严重的代码控，但凡修改代码可以达到的效果绝不用插件代替，即便后者更为简单。所以在这里介绍一个非插件的方法：<br />
在目录 <a href="http://bulog.org/share/wordpress/wordpress-category.html">wp-includes/category-template.php</a> 文件中搜索：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$catlink</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wp_rewrite</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>get_category_permastruct<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>在下面添加：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$catlink</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/category'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$catlink</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><code>保存即可。</code></p>
<p>今日看点：<a href="http://news.163.com/10/0226/04/60E1A4H60001124J.html" target="_blank">河南青年看守所内死亡 警方称喝开水后突然发病</a>（网易很知趣，直接关闭评论）</p>
<h3  class="related_post_title">相关日志</h3><ul class="related_post"><li>2010/04/23 -- <a href="http://bulog.org/share/wordpress/close-sidebar.html" title="滑动关闭侧边栏(基于jQuery1.4)">滑动关闭侧边栏(基于jQuery1.4)</a> (20)</li><li>2010/04/22 -- <a href="http://bulog.org/share/wordpress/default-widgets.html" title="wordpress 默认小工具修改表">wordpress 默认小工具修改表</a> (17)</li><li>2010/03/23 -- <a href="http://bulog.org/share/wordpress/wordpress-colore-tag.html" title="无插件实现 wordpress 彩色标签云效果">无插件实现 wordpress 彩色标签云效果</a> (13)</li><li>2010/03/13 -- <a href="http://bulog.org/share/wordpress/wordpress-smilies-code.html" title="17行代码为 wordpress 添加评论表情列表">17行代码为 wordpress 添加评论表情列表</a> (20)</li><li>2010/03/09 -- <a href="http://bulog.org/share/wordpress/simple-hezi.html" title="Simple-hezi（wp主题）">Simple-hezi（wp主题）</a> (18)</li><li>2011/03/08 -- <a href="http://bulog.org/logs/essay/wen-he.html" title="温和一点">温和一点</a> (13)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://bulog.org/share/wordpress/wordpress-category.html/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>

