又到中秋

现在是凌晨4点45, 坐在窗口旁, 俯瞰着整个小区。路灯静静得亮着,远方的工地偶尔传来一些机械的声音,旁边闷闷的电脑风扇声。又一个中秋开始了。

测试用Writely 来写blog ,感觉不错。在线Office 2007的测试帐号没申请到,只好先用用google。已经越来越喜欢上google的线上软件,微软做的能有这么好么?

update: Writely写的blog还是有些问题, 标题是空的,更新后又生成一个新的post. 看来还是要先用微软的Live writer

Written by oldmonk on 十月 6th, 2006 with no comments.
Read more articles on IT.

唯色的博客被封了

一个了解西藏历史及现状的窗口被关闭了,一个思想的火焰被隔绝了。 X TMD gong fei!!!下面是唯色对此事的访谈(要有代理才能看):

藏族女作家唯色谈其博克被封

下面是她的作品《西藏记忆》 的节选

《西藏记忆》

补充: 在唯色博客的回帖

Written by oldmonk on 十月 5th, 2006 with 16 comments.
Read more articles on IT.

老婆的中文blog正式开张了

就是韩国阿姨http://www.hanguoayi.com/),其实已经开张很多天了,只是开始时内容很少,等到现在有点内容了再做推介smile_tongue

老婆想在这个网站上介绍韩国料理, 韩国历史,韩国文化,也顺便练练自己的中文。欢迎大家捧场。

Written by oldmonk on 九月 30th, 2006 with 5 comments.
Read more articles on 推荐 and 生活.

一个太不成熟的WP插件

今天在Google Reader上看到有人推荐

Google Sitemaps – UTW Tag Addon for WordPress 2.0, 感觉想法不错, 应该对SEO有帮助, 按照那个网站上说的步骤装了一个。 结果看输出的sitemap.xml 居然里面的tag 链接都是指向这个插件作者的站点。 看了他的php源码, 居然把自己站点的链接写死在了代码里。 改成自己的试了试, 发现还是不行, 才注意到他在URL中没有考虑到亚洲字符。 自己也能改, 但不想浪费时间直接给卸载了。

大家有看到这个插件的就不要浪费时间了,这么不成熟的插件头一次见到, 白白浪费了10分钟。

Written by oldmonk on 九月 29th, 2006 with no comments.
Read more articles on IT.

推荐Google Reader

今天Google Reader升级了, 界面改成下面的样子。比原先又方便了很多。

前一阵在朋友圈里做了个调查,居然很多人都不用RSS Reader,更少人用在线的Reader。其实用Google Reader来看朋友们的blog会方便很多,再也不用隔几天挨个去朋友们的blog查看更新了, 也不用担心会漏过blog上的精彩文章。 大家只要去 http://www.google.com/reader/ 用自己的gmail登陆即可, 然后找到别人的RSS Feed,在Google Reader里选择Add subscription即可。 以后只要每天看一眼Google Reader就能知道所有自己关注的blog有没有新的文章。

我的blog的RSS Feed是 http://www.doyj.com/feed/,欢迎大家订阅smile_nerd

Written by oldmonk on 九月 29th, 2006 with 2 comments.
Read more articles on IT.

优化WordPress的载入速度

按照 Zhang-Zi 的思路优化了一下, 确实速度有明显提升。可惜没什么量化指标,不知道哪里有量化网站访问速度的工具。 依主观感觉,合并js和css对载入速度提升的帮助最大。

Written by oldmonk on 八月 28th, 2006 with 2 comments.
Read more articles on IT.

我的blog也开始挣钱了:)

作了近1个月的google adsense, 终于挣到了1.20美刀. Adsense的大牛们别笑,自己很知足了:D。

大家谁要感兴趣也去 google adsense 申请个帐号吧。 不过中文的 adsense 市场比英文要差很多(从我的站点看,中英文adsense要差10倍以上),大家要有心理准备。 要么就是写给老外看的英文blog, 王健硕的blog主要就是英文内容, 据说收入一个月在5000人民币左右。

下面是一些真正挣钱的blog

http://www.boingboing.net/ 年收入100万美元的blog

http://www.techcrunch.com/ 月收入6万美元的blog

http://www.huffingtonpost.com/ 获VC 500万美元的blog

Written by oldmonk on 八月 26th, 2006 with 8 comments.
Read more articles on IT.

Smart Archives 增强

安装了 Justin Blanton 开发的 smart archives 插件, 发现这个插件对中文和韩文支持不佳。我给做了点小修改,并且对他的一些小缺陷也进行了补正。最后的效果请看 http://www.doyj.com/archives/

安装方法如下:
  1. 将下面的代码拷贝并存成文件smartarchives.php
  2. 将smartarchives.php 上载到你的plugin目录
  3. 到控制面板激活Smart Archives 插件
  4. 在适当的地方插入smartArchives()函数调用。
    这个函数有两个参数,第一个在”both”, “block”,”list”中选择,默认为both 第二个是要排除的分类id.
下面就是修改后的代码:
  1. <?php
  2. /*
  3. Plugin Name: Smart Archives
  4. Version: 1.5
  5. Plugin URI: http://justinblanton.com/projects/smartarchives/
  6. Description: A simple, clean, and future-proof way to present your archives.
  7. Author: Justin Blanton
  8. Author URI: http://justinblanton.com
  9. */
  10.  
  11. function smartArchives($format='both', $catID='') {
  12.  
  13. global $tableposts, $wpdb, $PHP_SELF , $month ;
  14. setlocale(LC_ALL,WPLANG); // set localization language
  15. // set the URI of your archives; this might not need to be changed (currently, it's http://yoursite.com/archives/)
  16. $now = gmdate('Y-m-d H:i:s'); // get the current GMT date
  17.  
  18. if (($format == 'both') || ($format == 'block')) { // check to see if we are supposed to display the block
  19.     $qy = mysql_query("SELECT distinct year(post_date) as year, post_status
  20.         FROM $tableposts 
  21.         WHERE post_status='publish'
  22.         AND post_date <= NOW()
  23.         ORDER BY year desc");
  24.     // loop to create the small archive block with year/month links
  25.     while($years = mysql_fetch_array($qy)) {
  26.     echo('<strong><a href="'.get_year_link($years[year]).'">'.$years[year].'</a>:</strong> ');
  27.         $qm = mysql_query("SELECT distinct month(post_date) as monthv
  28.             FROM $tableposts 
  29.             ORDER BY monthv  asc") or die(mysql_error());
  30.            
  31.             for ($i=1; $i<=12; $i++)
  32.             {
  33.                     $q = mysql_query("SELECT *, year(post_date) as year
  34.                     FROM $tableposts 
  35.                     WHERE year(post_date)='$years[year]'
  36.                     AND month(post_date)='$i'
  37.                     AND post_status='publish'
  38.                     AND post_date <= NOW()
  39.                     ORDER BY id desc") or die(mysql_error());
  40.                     $sm =    $month[zeroise($i,2)]; // get the shortened month name; strtotime() localizes
  41.  
  42.                     if(mysql_num_rows($q)) 
  43.                         { echo('<a href="'.get_month_link( $years[year], $i ).'">'.$sm.'</a> '); }
  44.                     else 
  45.                         { echo('<span class="emptymonth">'.$sm.'</span> '); }
  46.             }
  47.            
  48.             echo('<br />');
  49.     }
  50.     echo ('<br /><br />');
  51. }
  52.  
  53. if (($format == 'both') || ($format == 'list')) { //check to see if we are supposed to display the list
  54.     $qy = mysql_query("SELECT distinct year(post_date) as year, post_status
  55.         FROM $tableposts 
  56.         WHERE post_status='publish'
  57.         AND post_date <= NOW()
  58.         ORDER BY year desc");
  59.     // loop to display links to all posts, sorted by descending month and day
  60.     while($years = mysql_fetch_array($qy)) {
  61.         $qm = mysql_query("SELECT distinct month(post_date) as monthv FROM $tableposts ORDER BY monthv desc") or die(mysql_error());
  62.         while($date = mysql_fetch_array($qm)) {
  63.             $q = mysql_query("SELECT *, year(post_date) as year, month(post_date) as monthv
  64.                 FROM $tableposts WHERE year(post_date)='$years[year]'
  65.                 AND month(post_date)='$date[monthv]'
  66.                 AND post_status='publish'
  67.                 AND post_date <= NOW()
  68.                 ORDER BY id desc") or die(mysql_error());
  69.             if(mysql_num_rows($q)) {
  70.                 $lm = $month[zeroise($date[monthv],2)]; // get the full month name; strtotime() localizes
  71.                 echo('<h2><a href="'.get_month_link( $years[year], $date[monthv] ).'">'.$lm.' '.$years[year].'</a></h2>');
  72.                 echo('<ul>');
  73.                 $q = mysql_query("SELECT *, year(post_date) as year, month(post_date) as monthv
  74.                     FROM $tableposts WHERE year(post_date)='$years[year]'
  75.                     AND month(post_date)='$date[monthv]'
  76.                     AND post_status='publish'
  77.                     ORDER BY post_date desc") or die(mysql_error());
  78.                 while($post = mysql_fetch_array($q)) {
  79.                     if ($post[post_date_gmt] <= $now) {
  80.                         if ($catID != '') { // check to see if a category id was specified in the arguments
  81.                             // get the categories that are attached to the current post
  82.                             $cats = $wpdb->get_col("SELECT category_id FROM $wpdb->post2cat WHERE post_id = $post[ID]");
  83.                             $found=false;
  84.                             foreach ($cats as $cat) { // look to see if the specified category is attached to the current post
  85.                                  if ($cat == $catID) $found=true;
  86.                                }
  87.                                if (!$found) echo('<li><a href="'.get_permalink($post[ID]).'">'.$post[post_title].'</a></li>');
  88.                         }
  89.                         else echo('<li><a href="'.get_permalink($post[ID]).'">'.$post[post_title].'</a></li>');
  90.                     }
  91.                 }
  92.                 echo ('</ul><br />');
  93.             }
  94.         }
  95.     }
  96. }
  97. }
  98. ?>

Written by oldmonk on 八月 19th, 2006 with 5 comments.
Read more articles on IT.

Google Reader Shared Items

我的豆瓣

Categories

Monthly archives

订阅文章

Recent Comments

Most Commented

Random Article

创作共同