Monthly Archive for December, 2006

wordpress-mu sitemap plugin

抓取「Google Sitemap Generator 3 Beta」丟到 plugin 目錄,然後作些 dirty hack:
<blockquote>
<pre style=”text-align: left”>— /home/admin/cookys/work/sitemap.php Thu Nov 16 22:26:58 2006
— /home/admin/cookys/work/sitemap.php Thu Nov 16 22:26:58 2006
+++ sitemap.php Wed Dec 6 20:37:50 2006
@@ -865,6 +865,7 @@

//the get_home_path function in our own...
$home = get_settings('home');
$home_path="";
+/*
if ( $home != '' &amp;&amp; $home != get_settings('siteurl') ) {
$home_path = parse_url($home);
$home_path = $home_path['path'];
@@ -873,8 +874,10 @@
} else {
$home_path = ABSPATH;
}
+*/
$res = $home_path;
}
+               $res =ABSPATH.UPLOADS; //str_replace('/files','',ABSPATH.UPLOADS); // cookys dirty hack for wp-mu
return $res;
}

@@ -1313,7 +1316,7 @@
if(!$forceAuto &amp;&amp; $this->GetOption("b_location_mode")=="manual") {
return $this->GetOption("b_fileurl_manual");
} else {
-                       return trailingslashit(get_bloginfo('siteurl')). $this->GetOption("b_filename");
+                       return trailingslashit(get_bloginfo('siteurl')).'files/'. $this->GetOption("b_filename");
}
}

@@ -2705,4 +2708,4 @@
#endregion
}

-?>
No newline at end of file
+?>

然後把 .htaccess 補上一條
<pre>RewriteRule ^sitemap.xml /wp-content/blogs.php?file=sitemap.xml [L]</pre>
搞定收工。

塗鴉

上個禮拜二一方面在趕論文初稿,一方面又被許多雜七雜八的事情纏身,所以一整個很悶。於是乎在星期二聽演講的時候,就無聊開始玩起了塗鴉的遊戲,就在 msn 上畫了幼稚園等級的塗鴉,沒想到還蠻有趣的。

(下午 04:42)cookys - laptop:
(下午 04:42) Chiu ~>:畫的還真不錯耶!
(下午 04:42) Chiu ~>:您真厲害
(下午 04:43) Chiu ~>:===========>請註明 我是母螃蟹 謝謝
(下午 04:45) cookys - laptop:
(下午 04:45) Chiu ~>:我們觀察到一種餅乾
(下午 04:45) Chiu ~>:是專門作compiler的餅乾 真恐怖
(下午 04:45) Chiu ~>:XD
(下午 04:45) Chiu ~>:還給我畫熟掉的
(下午 04:45) Chiu ~>:你這樣對嗎?!
(下午 04:47) cookys - laptop:
(下午 04:47) Chiu ~>:呵呵
(下午 04:47) Chiu ~>:加月牙是吧
(下午 05:11) Chiu ~>:去你的
(下午 05:11) Chiu ~>:快去趕你的初稿~~
(下午 05:13) cookys - laptop:
(下午 05:14) Chiu ~>:餅乾越畫越有心得
(下午 05:14) Chiu ~>:這啥小
(下午 05:14) Chiu ~>:走
(下午 05:14) Chiu ~>:吃晚餐去

吃飯的過程中螃蟹一直吵鬧說「明明就不是我吃掉月牙,是月牙被我吃掉,你不要亂畫!」所以我回來就做出修正,不過有點血腥 XD

(下午 06:53) cookys - laptop:

之後螃蟹說,別炒^H吵月牙了,月牙要 coding …所以…(還有剛剛被螃蟹夾的傷痕喔!)

(下午 07:51) cookys - laptop:

接著這隻螃蟹跟月牙絡跑回家了,只好換人畫:

(下午 09:16) cookys - laptop:
(下午 09:25) cookys - laptop:

之後又看到把妹偉在把妹,所以:

(下午 09:55) cookys - laptop:

幼稚園等級塗鴉完畢!謝謝收看。