<?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>A colourful bubble? &#187; popularity-contest</title>
	<atom:link href="http://www.paopao.name/tag/popularity-contest/feed" rel="self" type="application/rss+xml" />
	<link>http://www.paopao.name</link>
	<description>生活 读书 新知</description>
	<lastBuildDate>Wed, 20 May 2009 02:22:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>解决Popularity Contest插件与Google Sitemaps Generator 3.0插件的兼容性问题</title>
		<link>http://www.paopao.name/wordpress/plugin-wordpress/popularity-contest-compatible-with-google-sitemaps-generator-3.html</link>
		<comments>http://www.paopao.name/wordpress/plugin-wordpress/popularity-contest-compatible-with-google-sitemaps-generator-3.html#comments</comments>
		<pubDate>Fri, 28 Sep 2007 04:22:58 +0000</pubDate>
		<dc:creator>paopao</dc:creator>
				<category><![CDATA[插件]]></category>
		<category><![CDATA[google-sitemaps-generator-3]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[popularity-contest]]></category>
		<category><![CDATA[wordpress-2.3]]></category>

		<guid isPermaLink="false">http://www.paopao.name/?p=84</guid>
		<description><![CDATA[在让Popularity Contest插件适用于WordPress 2.3之后，漫步留言说Popularity Contest和Google Sitemaps Generator 3.0这两个插件之间的兼容性有问题，如果同时启用评论会有问题。我本地测试了一下，确实在提交... ]]></description>
			<content:encoded><![CDATA[<p>在<a HREF="http://www.paopao.name/wordpress/popularity-contest-for-wordpress-23.html" TARGET="_blank" TITLE="让Popularity Contest插件适用于WordPress 2.3">让Popularity Contest插件适用于WordPress 2.3</a>之后，<a HREF="http://roamlog.cn/" TARGET="_blank">漫步</a>留言说Popularity Contest和<a HREF="http://www.arnebrachhold.de/redir/sitemap-home/" TARGET="_blank" TITLE="Google Sitemaps Generator">Google Sitemaps Generator 3.0</a>这两个插件之间的兼容性有问题，如果同时启用评论会有问题。我本地测试了一下，确实在提交评论的时候会出现错误，错误原因是mysql_query函数使用了不存在的一个数据库用户名。查看popularity-contest.php文件，发现里面使用了mysql_xxx类函数。而Google Sitemaps Generator 3.0里面也使用了mysql_xxx类函数，并且在最后使用了<code>mysql_close($con);</code>语句来关闭了数据库连接，这样就导致了popularity-contest.php无法使用有效的数据库连接。</p>
<p>我的解决办法是把popularity-contest.php里面所有的mysql_xxx类函数都用功能相同的WodrPress提供的wpdb类中的函数来替代。以下是修改好的Popularity Contest插件:</p>
<p><a HREF="http://www.paopao.name/wp-content/uploads/2007/09/popularity-contest-gsg3.zip" TITLE="与Google Sitemaps Generator 3.0兼容的Popularity Contest插件">与Google Sitemaps Generator 3.0兼容的Popularity Contest插件</a></p>
<p>这个问题在Google Sitemaps Generator 2.7.1版本里不会出现，因为2.7.1版本里没有使用mysql_xxx类函数，不知道为什么3.0版本里会使用，而不是使用wpdb类。我个人是认为在插件涉及到WordPress的数据库时最好使用wpdb类，这样一来比较安全，二来也减少了因为WordPress升级而可能带来的不兼容性。</p>
<p>当然，有什么问题还是可以给我留言或者发信给我^_^</p>
<img src="http://www.paopao.name/?ak_action=api_record_view&id=84&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.paopao.name/wordpress/plugin-wordpress/popularity-contest-compatible-with-google-sitemaps-generator-3.html/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>让Popularity Contest插件适用于WordPress 2.3</title>
		<link>http://www.paopao.name/wordpress/plugin-wordpress/popularity-contest-for-wordpress-23.html</link>
		<comments>http://www.paopao.name/wordpress/plugin-wordpress/popularity-contest-for-wordpress-23.html#comments</comments>
		<pubDate>Wed, 26 Sep 2007 14:43:56 +0000</pubDate>
		<dc:creator>paopao</dc:creator>
				<category><![CDATA[插件]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[popularity-contest]]></category>
		<category><![CDATA[wordpress-2.3]]></category>

		<guid isPermaLink="false">http://www.paopao.name/?p=83</guid>
		<description><![CDATA[Popularity Contest是一个常用的WordPress统计插件，水煮鱼介绍过它及其扩展应用，我也一直使用这个插件。
但是它的老版本在最新发布的WordPress 2.3里会产生错误，作者的blog里也指出了这个情况，... ]]></description>
			<content:encoded><![CDATA[<p><a TITLE="Popularity Contest" TARGET="_blank" HREF="http://alexking.org/projects/wordpress/">Popularity Contest</a>是一个常用的WordPress统计插件，水煮鱼介绍过<a TITLE="Popularity Contest 及其扩展应用" TARGET="_blank" HREF="http://fairyfish.net/2007/06/20/popularity-contest/">它及其扩展应用</a>，我也一直使用这个插件。</p>
<p>但是它的老版本在最新发布的WordPress 2.3里会产生错误，作者的blog里也<a TITLE="WordPress 2.3 Plugin Compatibility" TARGET="_blank" HREF="http://alexking.org/blog/2007/09/25/wordpress-23-plugin-compatibility">指出了这个情况</a>，由于作者有较多的插件需要更新，所以不能马上解决这个问题。刚好有人留言说想在WordPress 2.3下使用这个插件，我就尝试着修改了一下。老版本的错误主要出现在它使用了post2cat和categories这两个已经在2.3中无效的数据表，我修改了一下它的sql语句，使它能在2.3下正常工作。</p>
<p>下载地址：<a TITLE="popularity-contest WordPress 2.3" HREF="http://www.paopao.name/wp-content/uploads/2007/09/popularity-contest-gsg3.zip">popularity-contest for WordPress 2.3</a><br />
<strong>更新</strong>：下载地址已经更新至兼容Google Sitemap Generator 3.0的版本</p>
<p>注意，该版本仅在WordPress 2.3下能正常工作。由于我并没有使用这个插件的所有功能，所以如果在使用中发现其他的问题，请给我留言或发信给我。</p>
<img src="http://www.paopao.name/?ak_action=api_record_view&id=83&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.paopao.name/wordpress/plugin-wordpress/popularity-contest-for-wordpress-23.html/feed</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
	</channel>
</rss>

