开始用Twitter

找了半天没找到最合适的wordpress twitter插件,于是修改了一下Twitter Tool,做了一个widget放在sidebar上,还是挺好的。不懂PHP,大概可能差不多的修改了一下twitter tool的代码,其实主要就修改了一个方法,让它看起来更舒服一点。

修改了一下aktt_tweet_display方法的内容,如下:

[php]
function aktt_tweet_display($tweet, $time = ‘relative’) {
switch ($time) {
case ‘relative’:
$time_display = aktt_relativeTime($tweet->tw_created_at, 3);
break;
case ‘absolute’:
$time_display = ‘#’;
break;
}
$output = ‘<b>’.$time_display.’:</b><br/>’;
//$output .= ‘ <a href="’.aktt_status_url($aktt->twitter_username, $tweet->tw_id).’">’.$time_display.’</a>’;
//
global $aktt;
$output .= aktt_make_clickable(wp_specialchars($tweet->tw_text));
if (!empty($tweet->tw_reply_username)) {
$output .= ‘ <a href="’.aktt_status_url($tweet->tw_reply_username, $tweet->tw_reply_tweet).’">’.sprintf(__(‘in reply to %s’, ‘twitter-tools’), $tweet->tw_reply_username).’</a>’;
}
$output .= ‘<br/>’;
return $output;
}
[/php]

后来用了用TwitPic,如果能直接在twitter里面显示twitPic的图片就好了。。。可是我真的不会php哎~~~

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Hello world

Hi,我是Tang Bin,finalbug.org是我的个人站点。这里有更多关于我的内容。English readers please click here to learn more about me and this site.

Categories