TwitterTools A Day PostのTwitの冒頭に日付を入れる

TwitterToolsがバージョンアップされた模様。LoudTwitter亡き後、Twitのログ管理はこれにおんぶにだっこ状態なのでもちろんそれにのっからせていただくが、日付挿入の改造をほどこしているのを忘れていた。
*** twitter-tools.php.default	2009-08-03 17:37:44.000000000 +0900
--- twitter-tools.php	2009-08-06 10:05:57.000000000 +0900
***************
*** 382,388 ****
  			if (count($tweets_to_post) > 0) {
  				$content = '<ul class="aktt_tweet_digest">'."\n";
  				foreach ($tweets_to_post as $tweet) {
! 					$content .= '	<li>'.aktt_tweet_display($tweet, 'absolute').'</li>'."\n";
  				}
  				$content .= '</ul>'."\n";
  				if ($this->give_tt_credit == '1') {
--- 382,388 ----
  			if (count($tweets_to_post) > 0) {
  				$content = '<ul class="aktt_tweet_digest">'."\n";
  				foreach ($tweets_to_post as $tweet) {
! 					$content .= '	<li> ['.date('H:i:s', strtotime($tweet->tw_created_at)+ 9*3600).']'.aktt_tweet_display($tweet, 'absolute').'</li>'."\n";
  				}
  				$content .= '</ul>'."\n";
  				if ($this->give_tt_credit == '1') {
***************
*** 762,768 ****
  		.'	<ul>'."\n";
  	if (count($tweets) > 0) {
  		foreach ($tweets as $tweet) {
! 			$output .= '		<li>'.aktt_tweet_display($tweet).'</li>'."\n";
  		}
  	}
  	else {
--- 762,768 ----
  		.'	<ul>'."\n";
  	if (count($tweets) > 0) {
  		foreach ($tweets as $tweet) {
! 			$output .= '		<li>'.date('Y-m-d H:i:s', strtotime($tweet->tw_created_at)+ 9*3600).aktt_tweet_display($tweet).'</li>'."\n";
  		}
  	}
  	else {

ちゃんと残しておかないといかんね。そして今回はじめてdiffコマンドの使い方を覚えました。diff -c old newね。アイシー。
You can leave a response, or trackback from your own site.

Leave a Reply

v class="span-24">
Powered by WordPress | Designed by: video games | Thanks to Trucks and SUV
%d人のブロガーが「いいね」をつけました。