Friday, December 12th, 2008 | 1,575 Views
安装wordpress完成后,根据自己的偏好进行设置,记之备忘。
下载最新的Wordpress 2.7安装完成后,开始设置及修改:
1. 修改博客名称,副标题
2. 修改日期格式为 l, F jS, Y,时间格式为 H:i:s
3. 上传新主题 WP_Premium,删除多余的主题
4. 修改永久链接格式为%postname%.htm
5. 建立分类
我的日志| Diary
善用酷软| Software
我的收集| Collection
电脑网络| PCInternet
6. 添加最新评论(作者原文:http://www.gengbing.com/aboutme/show-1410-1.html)
侧栏调用代码如下:
在wp-includes中functions.php模板加入以下代码:
/*
Plugin Name: Recent Comments
*/
if (function_exists('mdv_recent_comments')) {
}else{
function mdv_recent_comments($no_comments = 10, $comment_lenth = 5, $before = '
', $after = '
', $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 . "$comment_author" . ' on ' . $post_title . '.' . $after;
}
else {
$output .= $before . '' . $comment_author . ': ' . $comment_excerpt.'' . $after;
}
}
$output = convert_smilies($output);
} else {
$output .= $before . "None found" . $after;
}
echo $output;
}
}
7. 在侧边栏增加一个TAGS排行榜(作者原文:http://dickeydong.cn/wp-tag-cloud.html)
8.添加页面Album和Tags
9.添加更新服务网址
http://blogsearch.google.com/ping/RPC2
http://api.my.yahoo.com/RPC2
http://api.my.yahoo.com/rss/ping
http://ping.feedburner.com
http://www.zhuaxia.com/rpc/server.php
http://www.xianguo.com/xmlrpc/ping.php
http://www.feedsky.com/api/RPC2
http://blog.iask.com/RPC2
http://ping.blog.qikoo.com/rpc2.php
http://rpc.pingomatic.com/
http://rpc.technorati.com/rpc/ping
http://www.blogsdominicanos.com/ping/
11. 在模板index.php文件中,
找到
将其修改为以下代码:
参照网友修改(月光原文:http://www.williamlong.info/archives/1031.html)
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.
Comments
还没有评论。
请您留下评论