What’s wrong!


It has come to our attention that under certain circumstances there is a security vulnerability in WordPress that may be triggered if you’re running the default template. We were able to respond very quickly (under 40 minutes) and update the download to You can upgrade by overwriting your old 1.5 files or if you would like to apply the fix manually it is relatively simple:

1、Open the wp-includes/template-functions-category.php file in a text editor like Wordpad.
2、Go to around line 103 where it says get_the_category_by_ID.
3、Create a new line after that and paste in $cat_ID = (int) $cat_ID;

One note, even if the vulnerability was present in your blog, you would still be safe if your host ran mod_security on their servers. It is an Apache module which can provide very high-level protection against everything like the vulnerability above to comment spam. We will be updating the hosting page shortly to reflect which hosts there support mod_security or not.


2、如果你想自己动手,很简单。打开wp-includes/template-functions-category.php(可以在后台的Manage→Files中打开,方便!),查找到get_the_category_by_ID(在103行,是个函数名),在这行的下面加上$cat_ID = (int) $cat_ID;
function get_the_category_by_ID($cat_ID) {
$category = &get_category($cat_ID);
return $category->cat_name;
function get_the_category_by_ID($cat_ID) {
$cat_ID = (int) $cat_ID; //添加这行
$category = &get_category($cat_ID);
return $category->cat_name;

Migrating from Drupal to WordPress-把Drupal转换为WordPress


I finally decided to move my greek blog from drupal to wordpress. Since there was no migration script, I wrote a couple of sql statements that moved all posts, comments and categories from my drupal tables to the (new) wordpress 1.5 tables.

Here is the proccess in short:

WARNING This may delete your DATA Make sure you backup EVERYTHING before starting the procedure

1. setup a fresh wordpress installation.
2. make sure term_data term_hierarchy node term_node comments (drupal tables) are in the same DB you use from WP.
3. Run the following SQL statements:

delete from weblog_wp_categories ;
delete from weblog_wp_posts;
delete from weblog_wp_post2cat ;
delete from weblog_wp_comments ;

insert into weblog_wp_categories(cat_ID,cat_name, category_nicename, category_description, category_parent) select term_data.tid, name, name, description, parent from term_data, term_hierarchy where term_data.tid=term_hierarchy.tid ;

INSERT INTO weblog_wp_posts(
ID, post_date, post_content, post_title, post_excerpt, post_name, post_modified

SELECT nid, FROM_UNIXTIME(created), body, title, teaser, concat(‘OLD’,nid), FROM_UNIXTIME(changed) FROM node WHERE type=’blog’ OR type=’page’ ;

INSERT INTO weblog_wp_post2cat (post_id,category_id) SELECT nid,tid FROM term_node ;

INSERT INTO weblog_wp_comments (
comment_post_ID, comment_date, comment_content, comment_parent

SELECT nid, FROM_UNIXTIME(timestamp), concat(‘‘,subject, ‘
‘, comment), thread FROM comments ;

You should now have all your posts and comments and categories in WP. Go to the admin interface and make sure everything is in place…

Notes: This is not the perfect way to migrate. Comments are not nested in the right way. A lot of things may not work. On the other hand if, like me, made a really simple use of Drupal, this should move most of your data to WP…



[PS]谢谢 jay在留言簿上的提醒!!之前的很多留言都没能及时回复,在这里跟大伙说声对不起了~

解剖wordpress theme-part4


Adsense for Feeds


Google AdSense for Feeds
AdSense for feeds is a program that enables publishers to place relevant ads in the feeds they syndicate. Google technology understands the nuances of language, and places ads that are closely matched (or “targeted”) to the content next to which they appear. Learn more

If you are a current AdSense publisher and your feed has more than 100 active subscribers, you may qualify for participation in AdSense for feeds (BETA). If you’d like to participate, simply fill out the application below.

If you do not have an AdSense account, click here to apply.

[PS]your feed has more than 100 active subscribers!这好像有点多了吧!看来申请是不能通过了~:sad:





Update: In our effort to optimize we made two mistakes in 1.5.1, one related to feeds and one related to trackbacks and pingbacks. We’ve updated the download with which corrects these bugs and a few others.



-、 trackbacks 可以收不能送, pingbacks 收送都不行
修补是打上这两个pacth:changeset 2609changeset 2606

二、RSS 有 bug — 一段時間沒有新文章, RSS就吐不出資料.这里有修改的方法→HERE