<?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; plugins</title>
	<atom:link href="http://mifunny.info/tag/plugins/feed" rel="self" type="application/rss+xml" />
	<link>http://mifunny.info</link>
	<description>走走停停看看，恍然大悟。</description>
	<lastBuildDate>Sun, 18 Jul 2010 08:55:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>WordPress插件: 长尾巴(Long Tail)</title>
		<link>http://mifunny.info/long-tail-120.html</link>
		<comments>http://mifunny.info/long-tail-120.html#comments</comments>
		<pubDate>Thu, 02 Oct 2008 06:03:58 +0000</pubDate>
		<dc:creator>LD</dc:creator>
				<category><![CDATA[plugins]]></category>
		<category><![CDATA[tail]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[尾巴]]></category>

		<guid isPermaLink="false">http://mifunny.info/long-tail-120.html</guid>
		<description><![CDATA[使用WordPress玩博客时总会碰到这样的情况: 遇到好的Web服务，需要修改&#60;head&#62;标签（比如: OpenID、FeedM8）, 或是在&#60;/body&#62;标签前加入一些js代码（比如: Google Analytics）。 这些操作都需修改主题文件，如果你只是需要试用一下，岂不是很麻烦？ 闲来无事，写了个插件 ── 长尾巴(Long Tail)，可以在&#60;head&#62;和&#60;body&#62;尾部添加自定义的信息。 下载地址： long_tail.0.3.zip _ _ long_tail.0.2.zip _ 解压到worpress插件目录后，在后台启用， 于Options(设置) -> Long Tail(长尾巴) 填入你的信息， 使用Update Options按钮更新设置即可。 提示：本插件需要WP主题符合一些规范 =&#62; 主题文件 header.php 中的标签&#60;/head&#62;前必须要有 &#60;?php wp_head(); ?&#62; 函数; 主题文件 footer.php 中的标签&#60;/body&#62;前必须要有 &#60;?php wp_footer(); ?&#62; 函数; 插件将会在上面两处输出; _ 另一个需注意0.3版可以直接在后台插入php代码, 必须包含在 &#60;?php ?&#62; 中， 比如： &#60;?php echo &#8220;Long Tail.&#8221;; ?&#62;]]></description>
			<content:encoded><![CDATA[<p style="text-indent: 2em" >使用WordPress玩博客时总会碰到这样的情况: 遇到好的Web服务，需要修改<span style="color:#1E90FF;">&lt;head&gt;</span>标签（比如: OpenID、FeedM8）, 或是在<span style="color:#1E90FF;">&lt;/body&gt;</span>标签前加入一些js代码（比如: <a href="http://mifunny.info/google-analytics-19.html" target="_bank" title="Google统计服务"  alt="Google Analytics 统计">Google Analytics</a>）。 这些操作都需修改主题文件，如果你只是需要试用一下，岂不是很麻烦？ 闲来无事，写了个插件 ── 长尾巴(Long Tail)，可以在<span style="color:#1E90FF;">&lt;head&gt;</span>和<span style="color:#1E90FF;">&lt;body&gt;</span>尾部添加自定义的信息。</p>
<p>下载地址： <a href="http://nothing-at-all.googlecode.com/files/tail.0.3.zip" target="_bank" title="wordpress插件: 长尾巴(Long Tail) 0.3" alt="wordpress 插件 长尾巴 Long Tail 0.3" >long_tail.0.3.zip </a> _  _  <a href="http://nothing-at-all.googlecode.com/files/long_tail.zip" target="_bank" title="wordpress插件: 长尾巴(Long Tail)" alt="wordpress 插件 长尾巴 Long Tail" >long_tail.0.2.zip</a> _</p>
<p style="text-indent: 2em" >解压到worpress插件目录后，在后台启用， 于Options(设置) -> Long Tail(长尾巴) 填入你的信息， 使用Update Options按钮更新设置即可。 </p>
<p><span id="more-120"></span><span style="color:red;">提示：</span>本插件需要WP主题符合一些规范 =&gt;
<ol style="list-style-type: decimal">
<li>主题文件 header.php 中的标签<span style="color:#1E90FF;">&lt;/head&gt;</span>前必须要有 &lt;?php <span style="color:#A020F0;">wp_head();</span> ?&gt; 函数;</li>
<li>主题文件 footer.php 中的标签<span style="color:#1E90FF;">&lt;/body&gt;</span>前必须要有 &lt;?php <span style="color:#A020F0;">wp_footer();</span> ?&gt; 函数;</li>
</ol>
<p>插件将会在上面两处输出;  _ 另一个需<span style="color:red;">注意</span>0.3版可以直接在后台插入php代码, 必须包含在 <span style="color:#1E90FF;">&lt;?php</span>  <span style="color:#1E90FF;">?&gt;</span> 中， 比如： <span style="color:#1E90FF;">&lt;?php</span> <span style="color:#11AB11;">echo</span> <span style="color:#FFA500;">&#8220;Long Tail.&#8221;;</span>  <span style="color:#1E90FF;">?&gt;</span></p>
]]></content:encoded>
			<wfw:commentRss>http://mifunny.info/long-tail-120.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>[原创]wordpress插件：唐诗宋词</title>
		<link>http://mifunny.info/wp-plugin-chinese-poem-84.html</link>
		<comments>http://mifunny.info/wp-plugin-chinese-poem-84.html#comments</comments>
		<pubDate>Fri, 22 Aug 2008 15:25:38 +0000</pubDate>
		<dc:creator>LD</dc:creator>
				<category><![CDATA[plugins]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[唐诗]]></category>
		<category><![CDATA[宋词]]></category>

		<guid isPermaLink="false">http://mifunny.info/?p=84</guid>
		<description><![CDATA[就如你所看到的，这个唐诗宋词(chinese poem)插件默认随机显示唐诗300首、宋诗或宋词中的一首。当然了，上面的《出塞》只是图片,真实示例可以查看我的留言板。 === Plugin Name ===唐诗宋词(chinese poem) Contributors: LD KingDonate link: nullTags(有多少写多少，哈哈): tang300,唐诗300首, songproses宋词, song100,宋诗100首, caigentan,菜根谭, dao,道德经, joke,笑话, lunyu,论语, maoshici,毛泽东诗词, maoyulu,毛泽东语录, proverb,谚语, zengguang,增广贤文, poem Requires at least: 2.6Tested up to: 2.6.1Stable tag: 0.2PHP Requires: 5.2.xLicense: GPL v3 == Description ==这个插件允许在Wordpress中随机显示唐诗宋词, 你可以在widget的配置界面选择需要的模块。This plugin show poetry random in WordPress. Downloadchinese-poem.0.3.zipchinese-poem.0.2.zipchinese-poem.0.1.zip 暂时放在Google Code里。也可通过SVN获得： svn checkout http://nothing-at-all.googlecode.com/svn/tags/chinese-poem_0_3svn checkout http://nothing-at-all.googlecode.com/svn/tags/chinese-poem_0_2svn [...]]]></description>
			<content:encoded><![CDATA[<p align="center" ><a href="http://lh5.ggpht.com/kldscs/SK6AqqK0B6I/AAAAAAAAAuo/GUJJS29ONjE/s800/text.png" target="_bank" ><img class="frame" src="http://lh5.ggpht.com/kldscs/SK6AqqK0B6I/AAAAAAAAAuo/GUJJS29ONjE/s800/text.png" title="唐诗300首" alt="王之涣 出塞" /></a></p>
<p style="text-indent: 2em" >就如你所看到的，这个<a href="http://mifunny.info/wp-plugin-chinese-poem-84.html" >唐诗宋词(chinese poem)</a>插件默认随机显示唐诗300首、宋诗或宋词中的一首。当然了，上面的《出塞》只是图片,真实示例可以查看我的<a href="http://mifunny.info/guestbook" target="_bank" title="留言板"  alt="guestbook" >留言板</a>。</p>
<p><span id="more-84"></span><br />
<hr />
<p>=== <b>Plugin Name</b> ===<br />唐诗宋词(chinese poem)</p>
<p>Contributors: LD King<br />Donate link:  null<br />Tags(有多少写多少，哈哈): tang300,唐诗300首, songproses宋词, song100,宋诗100首, caigentan,菜根谭, dao,道德经, joke,笑话, lunyu,论语, maoshici,毛泽东诗词, maoyulu,毛泽东语录, proverb,谚语, zengguang,增广贤文, poem <br />Requires at least: 2.6<br />Tested up to: 2.6.1<br />Stable tag:<span style="color:blue"> 0.2</span><br />PHP Requires: 5.2.x<br />License: <a href="http://www.fsf.org/licensing/licenses/gpl.html" target="_bank" title="GNU General Public License" >GPL v3</a></p>
<p>== <b>Description</b> ==<br />这个插件允许在Wordpress中随机显示唐诗宋词, 你可以在widget的配置界面选择需要的<a href="#modules">模块</a>。<br />This plugin show poetry random in WordPress.</p>
<p><strong>Download</strong><br /><a href="http://nothing-at-all.googlecode.com/files/chinese-poem.0.3.zip" title="唐诗宋词(chinese poem)" alt="chinese poem 0.3" >chinese-poem.0.3.zip</a><br /><a href="http://nothing-at-all.googlecode.com/files/chinese-poem.0.2.zip" title="唐诗宋词(chinese poem)" alt="chinese poem 0.2" >chinese-poem.0.2.zip</a><br /><a href="http://nothing-at-all.googlecode.com/files/chinese-poem.0.1.zip" title="唐诗宋词(chinese poem)" alt="chinese poem 0.1" >chinese-poem.0.1.zip</a><br /> 暂时放在Google Code里。也可通过SVN获得：<br />
<table style="border:2px solid #E0E0E0;" >
<tbody>
<tr>
<td>svn checkout http://nothing-at-all.googlecode.com/svn/tags/chinese-poem_0_3<br />svn checkout http://nothing-at-all.googlecode.com/svn/tags/chinese-poem_0_2<br />svn checkout http://nothing-at-all.googlecode.com/svn/tags/chinese-poem_0_1</td>
</tr>
</tbody>
</table>
<p>第一个是0.3版的Tag，主支在 http://nothing-at-all.googlecode.com/svn/trunk/chinese-poem  </p>
<p><strong>功能说明[Usage]</strong></p>
<p style="text-indent: 2em" >0.2版加入了Widget支持，所以只要启用插件，在Widget界面配置即可。</p>
<p align="center" ><a href="http://lh5.ggpht.com/kldscs/SLeyN8a-JgI/AAAAAAAAAvo/XRU4qw3UXCo/s800/chinese-poem-widget.png" target="_bank" ><img class="frame" src="http://lh5.ggpht.com/kldscs/SLeyN8a-JgI/AAAAAAAAAvo/XRU4qw3UXCo/s400/chinese-poem-widget.png" title="唐诗宋词 配置窗口" alt="唐诗宋词 widget chinese poem" /></a><br />Widget 配置窗口</p>
<p style="text-indent: 2em" >同时0.2还加入了一个可以控制刷新时间的函数 show_chinese_poetry，它比原函数多了个 timespan 参数，<br />
<coolcode lang="php" ><br />
< ?php<br />
if (function_exists(show_chinese_poetry))<br />
	show_chinese_poetry(array('tang300', 'song100', 'songproses'), TRUE, 30);<br />
?><br />
</coolcode><br />
这样就可以每隔30分钟更新一次诗词，<span style="color:red">需要注意的是：</span>使用该函数必须保证插件目录下的 &#8220;poem.tmp&#8221;文件全局可写(权限为666),可以用命令 chmod 666 poem.tmp  来修改，或者FTP工具也可。    <br />详细使用方法可以参考<a href="#onepoem" >函数 show_chinese_poem()</a>。自定义模块也挺简单的，需要的可以参考这篇文章： <a href="http://mifunny.info/make-own-module-for-chinese-poem-96.html" target="_bank" title="自定义 个性 唐诗宋词 模块" alt="自定义 个性 唐诗 宋词 模块" >自定义 个性“唐诗宋词”模块</a>。</p>
<p style="text-indent: 2em" >在<a href="#install">安装完插件</a>后，<a name="onepoem">默认使用以下的代码</a>，将随机从tang300、song100、songproses三个文件中取出一首诗。也就是在我的<a href="http://mifunny.info/guestbook" target="_bank" title="留言板"  alt="guestbook" >留言板</a>中看到的那样，会是唐诗300首、宋诗100首或宋词中的其中之一。</p>
<p><coolcode lang="php" ><br />
< ?php if (function_exists(show_chinese_poem)) show_chinese_poem(); ?><br />
</coolcode></p>
<p align="center" ><img class="frame" src="http://lh5.ggpht.com/kldscs/SK6AquuM7bI/AAAAAAAAAug/jw9mLviZOPc/s800/sidebar.png" title="唐诗300首" alt="杜甫 春望" /><br />放在Sidebar里的唐诗</p>
<p style="text-indent: 2em" >当然，前面的<a href="#modules" >可用模块</a>确实是可以使用的，首先说明一下show_chinese_poem()函数的2个参数：<br />
<coolcode lang="php" ><br />
function show_chinese_poem($modules = array(&#8216;tang300&#8242;, &#8216;song100&#8242;, &#8216;songproses&#8217;), $css = TRUE)<br />
</coolcode><br />
第一个参数$modules 是一维数组，插件会在$modules的模块中自动选择一个作为输出; 而$css是布尔型，TRUE表示加载插件的CSS文件。</p>
<p style="text-indent: 2em" >比如模块中有一个&#8221;毛泽东诗词&#8221;，我希望只在&#8221;毛泽东诗词&#8221;中挑选诗词输出，那么可以这么写：<br />
<coolcode lang="php" ><br />
< ?php<br />
if (function_exists(show_chinese_poem))<br />
	show_chinese_poem(array('maoshici'));<br />
?><br />
</coolcode></p>
<p align="center" ><img class="frame" src="http://lh6.ggpht.com/kldscs/SK6fV0bI0_I/AAAAAAAAAvI/fTbgwgn4dJg/s800/maoshici.png" title="毛泽东诗词" alt="七律 人民解放军占领南京" /></p>
<p style="text-indent: 2em" >此外需要说明的是,输出HTML格式，基本所有模块的输出都和下面的定义差不多,可以据此修改poem.css中的风格。<br />
<coolcode lang="html" ><br />
<span class="poem-title">诗词标题</span><br /><span class="poem-author">诗歌作者</span><br /><span class="poem-content">诗歌内容</span><br />
</coolcode></p>
<p><a name="modules" ><strong>可用模块</strong></a></p>
<ul style="list-style-type: none" >
<li>caigentan:   菜根谭</li>
<li>dao:	     道德经</li>
<li>joke:	     笑话集</li>
<li>lunyu:	     论语</li>
<li>maoshici:    毛泽东诗词</li>
<li>maoyulu:     毛泽东语录</li>
<li>proverb:     谚语</li>
<li>song100:     宋诗100首</li>
<li>songproses:  宋词</li>
<li>tang300:     唐诗300首</li>
<li>zengguang:   增广贤文</li>
</ul>
<p>诗词原始资料来源于<a href="http://code.google.com/p/chinese-fortune/" title="中文fortune" >chinese-fortune</a></p>
<p>== <b><a name="install" >Installation</a></b> ==
<ul style="list-style-type: decimal" >
<li>Upload the Plugin folder to the `/wp-content/plugins/` directory</li>
<li>Activate the plugin through the `Plugins` menu in WordPress</li>
<li>Add Anywhere:  &lt;?php show_chinese_poem() ?&gt;</li>
<li>If you need to configure the CSS style of 唐诗宋词(chinese poem), open and edit: <br />/wp-content/plugins/chinese-poem/poem.css</li>
</ul>
<p><b>后记:</b>
<p style="text-indent: 2em; font-size: 0.9em ; color: gray;" >有一个很有名的开源项目：<a href="http://chinese-fortune.googlecode.com" title="fortune-mode-zh" target="_bank" >fortune-mode-zh</a>，里面有丰富的诗词文件，很早之前，我托ubuntu论坛里大牛的福在一直在conky中使用着。最近在看PHP，干脆写成Wordpress的插件，第一次写插件，还有很多不足，慢慢改吧。</p>
]]></content:encoded>
			<wfw:commentRss>http://mifunny.info/wp-plugin-chinese-poem-84.html/feed</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>关于CoolCode在WP系统不在根目录情况下css和js不能加载的bug</title>
		<link>http://mifunny.info/coolcode-bug-54.html</link>
		<comments>http://mifunny.info/coolcode-bug-54.html#comments</comments>
		<pubDate>Thu, 19 Jun 2008 09:45:33 +0000</pubDate>
		<dc:creator>LD</dc:creator>
				<category><![CDATA[plugins]]></category>
		<category><![CDATA[coolcode]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://mifunny.info/coolcode-bug-54.html</guid>
		<description><![CDATA[昨天使用CoolCode插件(Version: 3.4)时才发现： 如果WordPress系统不在根目录，即“WordPress子目录,博客根目录”例如我的http://mifunny.info/,其实上wp的目录在网站根目录下的./blog/; 具体情况可以参考：香草吧噗 ─ WordPress子目录博客根目录; 如上情况的话，就会发现CoolCode的css和js代码不能被加载，看下面的截图： 查看一下coolcode.php ,发现其中加载js和css所用的函数是 get_settings(&#8216;home&#8217;)，看一下wordpress的数据库就会发现，这个函数得到的路径是博客的首页，而不是wordpress的安装目录; 所以这个路径是无效的，只要把他改成 get_option(&#8216;siteurl&#8217;) 就行了，得到的正确的路径。 下面是修改后的效果： 原来的代码 function add_css() { echo &#8216;]]></description>
			<content:encoded><![CDATA[<p style="text-indent: 4mm">昨天使用<a title="andot 的 CoolCode" href="http://www.coolcode.cn/?p=26">CoolCode</a>插件(Version: 3.4)时才发现： 如果WordPress系统不在根目录，即“<strong>WordPress子目录,博客根目录</strong>”例如我的<a title="水草树" href="http://mifunny.info/">http://mifunny.info/</a>,其实上wp的目录在网站根目录下的./blog/; 具体情况可以参考：<a title="WordPress子目录博客根目录" href="http://papu.cn/2007/12/08/giving-wordpress-its-owndirectory.html">香草吧噗 ─ WordPress子目录博客根目录</a>;<br />
如上情况的话，就会发现CoolCode的css和js代码不能被加载，看下面的截图：</p>
<p><img class="frame" title="CoolCode css js 代码未加载" src="http://mifunny.info/blog/uploads/2008/06/coolcode-bug.png" alt="CoolCode css js 代码未加载" /></p>
<p style="text-indent: 4mm">查看一下coolcode.php ,发现其中加载js和css所用的函数是 get_settings(&#8216;home&#8217;)，看一下wordpress的数据库就会发现，这个函数得到的路径是博客的首页，而不是wordpress的安装目录; 所以这个路径是无效的，只要把他改成 get_option(&#8216;siteurl&#8217;) 就行了，得到的正确的路径。 下面是修改后的效果：</p>
<p><span id="more-54"></span><br />
<b>原来的代码</b><br />
<coolcode lang="php"><br />
    function add_css() {<br />
        echo &#8216;
<link rel="stylesheet" href="'<br />
            . get_settings('home')<br />
            . "/wp-content/plugins/coolcode/coolcode.css\" />\n&#8221;;<br />
    }<br />
</coolcode><br />
<br /><b>修改后的代码:</b><br />
<coolcode lang="php"><br />
    function add_css() {<br />
        echo &#8216;
<link rel="stylesheet" href="'<br />
            . get_option('siteurl')<br />
            . "/wp-content/plugins/coolcode/coolcode.css\" />\n&#8221;;<br />
    }<br />
</coolcode></p>
]]></content:encoded>
			<wfw:commentRss>http://mifunny.info/coolcode-bug-54.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
