<?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; twitter</title>
	<atom:link href="http://www.sogg.name/archives/tag/twitter/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sogg.name</link>
	<description>简单生活，简单记录</description>
	<lastBuildDate>Mon, 08 Mar 2010 20:00:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>修改tiwtter-tools daily post的时间显示</title>
		<link>http://www.sogg.name/archives/2008/0316142117.html</link>
		<comments>http://www.sogg.name/archives/2008/0316142117.html#comments</comments>
		<pubDate>Sun, 16 Mar 2008 06:21:17 +0000</pubDate>
		<dc:creator>sogg</dc:creator>
				<category><![CDATA[铁锤改锥]]></category>
		<category><![CDATA[修改]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[twitter-tools]]></category>

		<guid isPermaLink="false">http://www.sogg.name/archives/2008/0316142117.html</guid>
		<description><![CDATA[Wordpress的插件twitter-tools是个很好的东西，除了可以在侧边栏显示 最近若干条twitters、将新发的Blog通告给tiwtter外，还能将每日的tweets集合成一篇Blog发布。这样可以方便地将散落在Twitter上的文字集中汇聚回自己的Blog上。比如，对于我的朋友丫枝同学，他喜欢通过Twitter记录他的读书随想，当然也就希望能够在Blog上每日存档这些读书随想。
但是，在Twitter-tools每日输出(daily post)中 ，是没有显示每条tweet时间的。而作为随手发送、记录的Twitter，时间当然是不可缺少的一个要素。如：
今明天气宜人，后天又转阴沉；厦门今夜多云，有轻雾和霾，明天多云转阴，13到23度，东北风2到3级 #
其实，在数据库表中是包含tweet发布时间，字段名为tw_create_at，只要输出这个值就行。但需要注意的是，这是与本地时间有时差的标准时间。因此我对twitter-tools.php第258行的更改是：
$content .= &#8216;   &#60;li&#62;&#8217;.make_clickable($tweet-&#62;tw_text).&#8217;
&#60;a href=&#8221;http://twitter.com/&#8217;.$this-&#62;twitter_username.&#8217;/statuses/&#8217;.$tweet-&#62;tw_id.
&#8216;&#8221;&#62;&#8217;.date(&#8220;Y-m-d H:i:s&#8221;,strtotime($tweet-&#62;tw_created_at)+8*3600).&#8216;&#60;/a&#62;&#60;/li&#62;&#8217;.&#8221;\n&#8221;;
之后显示的是：
厦门今夜晴到多云，明天多云，13到23度，东北风2到3级。春季家庭消毒，可用中药生蓉木、艾叶烟熏除蟑螂与霉菌。 2008-03-15 17:38:15
Update: 2009-12-21
对于Twitter-Tools 2.0，修改位置略有变化，可修改twitter-tools.php文件第818行：
$time_display = &#8216;#&#8217;; 
为：
$time_display = date(&#8216;Y-m-d H:i:s&#8217;,strtotime($tweet-&#62;tw_created_at)+3600*8);
其中“3600*8”，是围了调整时差。

	标签：修改, twitter, twitter-tools

	相关日志：
	
	没有相关日志。
	

]]></description>
			<content:encoded><![CDATA[<p>Wordpress的插件twitter-tools是个很好的东西，除了可以在侧边栏显示 最近若干条twitters、将新发的Blog通告给tiwtter外，还能将每日的tweets集合成一篇Blog发布。这样可以方便地将散落在Twitter上的文字集中汇聚回自己的Blog上。比如，对于我的朋友丫枝同学，他喜欢通过Twitter记录他的读书随想，当然也就希望能够在Blog上每日存档这些读书随想。</p>
<p>但是，在Twitter-tools每日输出(daily post)中 ，是没有显示每条tweet时间的。而作为随手发送、记录的Twitter，时间当然是不可缺少的一个要素。如：</p>
<blockquote><p>今明天气宜人，后天又转阴沉；厦门今夜多云，有轻雾和霾，明天多云转阴，13到23度，东北风2到3级 <a href="http://twitter.com/sogg/statuses/768838080">#</a></p></blockquote>
<p>其实，在数据库表中是包含tweet发布时间，字段名为tw_create_at，只要输出这个值就行。但需要注意的是，这是与本地时间有时差的标准时间。因此我对twitter-tools.php第258行的更改是：</p>
<p>$content .= &#8216;   &lt;li&gt;&#8217;.make_clickable($tweet-&gt;tw_text).&#8217;<br />
&lt;a href=&#8221;http://twitter.com/&#8217;.$this-&gt;twitter_username.&#8217;/statuses/&#8217;.$tweet-&gt;tw_id.</p>
<p><span style="color: #ff0000;">&#8216;&#8221;&gt;&#8217;.date(&#8220;Y-m-d H:i:s&#8221;,strtotime($tweet-&gt;tw_created_at)+8*3600).</span>&#8216;&lt;/a&gt;&lt;/li&gt;&#8217;.&#8221;\n&#8221;;</p>
<p>之后显示的是：</p>
<blockquote><p>厦门今夜晴到多云，明天多云，13到23度，东北风2到3级。春季家庭消毒，可用中药生蓉木、艾叶烟熏除蟑螂与霉菌。 <a href="http://twitter.com/sogg/statuses/771885054">2008-03-15 17:38:15</a></p></blockquote>
<p><span style="color: #ff0000;">Update: 2009-12-21</span><br />
对于Twitter-Tools 2.0，修改位置略有变化，可修改twitter-tools.php文件第<span style="color: #ff0000;"><strong>818</strong></span>行：</p>
<blockquote><p><span style="color: #ff0000;">$time_display = &#8216;#&#8217;; </span></p></blockquote>
<p>为：</p>
<blockquote><p><span style="color: #ff0000;">$time_display = date(&#8216;Y-m-d H:i:s&#8217;,strtotime($tweet-&gt;tw_created_at)+3600*8);</span></p></blockquote>
<p>其中“3600*8”，是围了调整时差。</p>

	标签：<a href="http://www.sogg.name/archives/tag/%e4%bf%ae%e6%94%b9" title="修改" rel="tag nofollow">修改</a>, <a href="http://www.sogg.name/archives/tag/twitter" title="twitter" rel="tag nofollow">twitter</a>, <a href="http://www.sogg.name/archives/tag/twitter-tools" title="twitter-tools" rel="tag nofollow">twitter-tools</a><br />

	<h4>相关日志：</h4>
	<ul class="st-related-posts">
	<li>没有相关日志。</li>
	</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.sogg.name/archives/2008/0316142117.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
