20

Comments

今天早上作者再次更新了博客主题.移步这里参观,下载.
但是,作者相当懒.
本来最近回复的函数在WP3.0杯具的.他增加侧边栏的widget支持,然后居然最新回复的函数去掉了,改用 WP Kit CN 插件提供的最新评论功能.
这个太邪恶了,我不喜欢widget,更加不喜欢插件.我的博客一共就3个插件,去垃圾留言,评论者浏览器信息,还有邮件回复.
于是我又自己折腾了一下函数,搞得和作者的一样,不过是直接写在sidebar.php的.
另外,作者的嵌套评论中的第二层是没有头像的,我自己重新写了函数…然后头像就出来了

还有,作者提供的和他自己页面上的样子还是不一样的.头部他自己重新写了,但是不放代码.
如果有同学需要我改造的版本,自己留言吧.我发到你们邮箱里.

< >
7

Comments

今天是我的生日,收到了很多同学朋友的贺电,在此先谢谢大家.特别是人人都是艺术家的朋友们.

步入正题.这个主题的原作者比较懒,造成这个主题比较简洁.这不,WP升到3.0了,他没有及时更新库函数,造成我前几天”最近评论”杯具了.
我的解决方法:直接篡改”function.php”里面的函数…

function get_recent_comments_only($no_comments = 10, $comment_lenth = 5, $before = ‘<li onmouseover=this.className=”on”; onmouseout=this.className=”off”;>’, $after = ‘</li>’, $show_pass_post = false, $comment_style = 0) {
global $wpdb;
$request = “SELECT ID, comment_ID, comment_content, comment_author, comment_author_url, post_title FROM $wpdb->comments LEFT JOIN $wpdb->posts ON $wpdb->posts.ID=$wpdb->comments.comment_post_ID WHERE post_status IN (‘publish’,'static’) “;
if(!$show_pass_post) $request .= “AND post_password =” “;
$request .= “AND comment_approved = ’1′ ORDER BY comment_ID DESC LIMIT $no_comments”;
$comments = $wpdb->get_results($request);
$output = ”;
if ($comments) {
foreach ($comments as $comment) {
$comment_author = stripslashes($comment->comment_author);
if ($comment_author == “”)
$comment_author = “anonymous”;
$comment_content = strip_tags($comment->comment_content);
$comment_content = stripslashes($comment_content);
$words=split(” “,$comment_content);
$comment_excerpt = join(” “,array_slice($words,0,$comment_lenth));
$permalink = get_permalink($comment->ID).”#comment-”.$comment->comment_ID;

if ($comment_style == 1) {
$post_title = stripslashes($comment->post_title);

$url = $comment->comment_author_url;

if (empty($url))
$output .= $before . $comment_author . ‘ on ‘ . $post_title . ‘.’ . $after;
else
$output .= $before . “<a href=’$url’ rel=’external’>$comment_author</a>” . ‘ on ‘ . $post_title . ‘.’ . $after;
}
else {
$output .= $before . ” . $comment_author . ‘:  <a href=”‘ . $permalink;
$output .= ‘” title=”View the entire comment by ‘ . $comment_author.’”>’ . $comment_excerpt.’</a>’ . $after;
}
}
$output = convert_smilies($output);
} else {
$output .= $before . “None found” . $after;
}
echo $output;
}

这个函数是东拼西凑的函数.没有Gravatar,没有链接,防止PR传递.嘿嘿,我比较猥琐.

另外使用插件搞了一个评论嵌套,自己重写了CSS,使嵌套和原来的风格保持一致.作者的博客支持嵌套,但是他公布版本却不支持,估计是通过插件实现的.嗯嗯.

最后是修改了大量代码,让主题支持HTML5,并加入了一些猥琐的特效.IE6下面效果怎么样我不知道,反正我今天早上yum update的firefox效果非常好.

< >
0

Comments

把基本空着的线性代数卷子交上去后,我舒了一口气.大一结束了,美好的暑假在等着我呢.

我的计划:
完成本博客最近评论(sidebar.php),评论嵌套(comment.php)的代码.
完成饭否客户端的oAuth登录.
给某个公司制作基于WordPress的CMS网站.
给家里的客厅做一套功放.
玩点单片机.
尽量不坐在电脑,烙铁前面,多去外面玩玩,走走看看.
去很多同学朋友家玩.
教会同学翻篱//笆.
准备补考.

唔,就这样吧.送刚拍的华丽照片一张,可以做为壁纸.3200*2000.点击看大图.

< , >

微博客

4

Comments

昨天晚上和FXX在浙江传媒学院旁边的一个什么”煲”吃晚饭.

在等待上菜的过程中,我听见了边上的一桌上,三个帅哥在讨论微博客.他们在讨论各个微博客的言论尺度,从新浪到腾讯微博,最后就讲到了Twitter,然后就讲到了为神马国内无法访问…
我觉得他们是知道真相的,然后我就走了过去,递上名片一张.
他们能识别我名片背后的Twitter,Wordpress等Web2.0应用,并知道篱笆,能说出篱笆的雅称”国(河蟹)防网”.(虽然不能说出标准名称).其中有一个同学还在E71上用神器上推.

我不知道这个同学能不能看到这篇文章,不知道能不能在推上fo我,更加不知道他到底是神马学校.但是,至少,他已经适应了微博客生活.

如果到60岁,我们还在一起废话,想想就很温暖.

这就是国内微博客第一-饭否的宗旨.
我用饭否才一个月,高考完毕到被河蟹.
虽然现在饭否被河蟹吃掉了,但是作为一只羊驼,我是不会把沃草让给河蟹们的.
现在有了言论更加自由的Twitter,我也会把持好言论尺度,防止被喝茶.

多河蟹的推啊.

我还在使用腾讯微博,但是这个讲话的尺度很小.包括”腾讯”和”敏感词”都是敏感词.一个公司就其产品本身,也是敏感词,荒唐.我想生活着而不是活着.所以,腾讯微博就放弃不用了.

< ,, >
3

Comments

Today,I buy something from zou.lu(This guy is very silly).After buying,I find that there has a very good plugin in his blog.This plugin could display comments’ MOTHER LAND,OS and BROWSER.

That’s very funny.You like it?Follow me.

下载地址:http://wordpress.org/extend/plugins/comment-info-detector/ ,上传到 wp-content/plugins 目录后台插件里激活,或者通过后台插件搜索 Comment Info Detector 直接一键安装即可.

然后在左边设置-comment-info-detector-下设置Display Country Flags Automatically,Display Web Browsers and OS Automatically为开.

OK,that’s very easy.Look,Waiwai was using Windows Vista!

< , >
1

Comments

也许是我功力不足,IE下的CSS总是写不好.

废话不多说,有图为证.

< ,,, >