Drupal – Enable Custom PHP Code Condition for Rules

Last time i have shown you the basic usage of the Rules module.
Drupal – Build Simple Workflow with Rules

Whenever a rule is fired, you can add some conditions to validate if the actions should be run. And you can even setup a PHP code condition for rule. But this feature required the PHP Filter in the Drupal Core modules.
Continue reading Drupal – Enable Custom PHP Code Condition for Rules

2010 in review

This is the review by wordpress.com. Thanks!! =)

The stats helper monkeys at WordPress.com mulled over how this blog did in 2010, and here’s a high level summary of its overall blog health:

Healthy blog!

The Blog-Health-o-Meter™ reads Wow.

Crunchy numbers

Featured image

The Louvre Museum has 8.5 million visitors per year. This blog was viewed about 190,000 times in 2010. If it were an exhibit at The Louvre Museum, it would take 8 days for that many people to see it.

In 2010, there were 333 new posts, growing the total archive of this blog to 425 posts. There were 800 pictures uploaded, taking up a total of 67mb. That’s about 2 pictures per day.

The busiest day of the year was November 16th with 1,495 views. The most popular post that day was Global – 2009 W. Eugene Smith Grant in Humanistic Photography 尤金史密斯人道主義攝影獎.

Where did they come from?

The top referring sites in 2010 were windows7forums.com, google.co.in, google.com, freeborn.wordpress.com, and stackoverflow.com.

Some visitors came searching, mostly for paella, uiactionsheet, nsstring substring, uiactionsheet example, and android listview.

Attractions in 2010

These are the posts and pages that got the most views in 2010.

1

Global – 2009 W. Eugene Smith Grant in Humanistic Photography 尤金史密斯人道主義攝影獎 October 2009

2

Windows 7 – Cannot connect to network drive September 2009
103 comments

3

Android – Simple ListView using SimpleAdapter January 2010
14 comments

4

iPhone – UIActionSheet Example April 2010
4 comments

5

Android – Applying Alternate Row Color in ListView with SimpleAdapter March 2010
44 comments

健吾 – 大學之道 在識時務

中文大學新任校長沈祖堯博士上台,面對這位在香港對抗SARS的英雄,媒體都乖乖的給了他很大的期望,希望他可以一洗頹風。

尤其是,聽說過去幾年中文大學的校長都令學生和老師失望透頂了。

沈校長上台,說:「世界各國埋首於經濟發展,做科研的,不再是因對知識好奇;辦大學的,亦忽略了培育年輕人靈魂。」他說,他希望上任後盡力保存人文價值,引用中大創辦人之一錢穆語錄,希望趁青春竭盡所能,為教育奮鬥。他又說,現時社會追逐經濟發展,大學教育產生危機。他再說﹕「推動學者做研究的是資源,而非對知識的好奇;大學重視排名,而忽略培育年輕的靈魂的使命。如果這個趨勢持續,學生只會變成牟利的個體,而非可體恤別人需要的人。」

他說了這麼多的話,我每一句也同意得五體投地了。但是,他可以改變什麼嗎?指出問題,是批評者的責任,改善狀況,是在其位者的使命。我相信沈博士這種知識分子,是應該理解的。 Continue reading 健吾 – 大學之道 在識時務

Eureka! – 2010 Review

2010 is a fruitful year in terms of knowledge for me. The time in HKU allow me learning many technologies such as Maven and iPhone Application development. And i have acquired some front end development experiences during the recent 3 months in Beansbox.

I feel that 2011 is an important year in my life… let’s see what i could do in the coming new year.

Eureka! Blog also made a good progress in 2010. There are altogether about 200,000 visits.

  • 2010 Jan – 4,548
  • 2010 Feb – 5,710
  • 2010 Mar – 7,905
  • 2010 Apr – 9,205
  • 2010 May – 11,685
  • 2010 Jun – 13,529
  • 2010 Jul – 16,381
  • 2010 Aug – 21,877
  • 2010 Sep – 24,759
  • 2010 Oct – 25,860
  • 2010 Nov – 29,103
  • 2010 Dec – 29,679
  • 2010 Total – 200,241

That’s all for 2010 and wish you every success in 2011! =)

Score Marker – My Second Approved iPhone App

This slideshow requires JavaScript.

The is the my second approved iPhone application which is called Score Marker (Download). As it’s name says, it is for marking the score of every player in a game such as UNO and Mahjong. After the game is ended, you could save the result as a picture in your iPhone so you can share it with your friends about who is the winner and who is the loser. You can even upload the picture to the internet and share it in social networks. Continue reading Score Marker – My Second Approved iPhone App

Drupal – Get URL Arguments in Custom module or Views Template

You can get the URL arguments in custom module or views template files. Create a custom module and use the hook_nodeapi to print the URL arguments.

/**
 * Implementation of hook_nodeapi()
 */
function custom_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  switch ($op) {
    case 'view':
      print arg(0);
      print "<br/>";
      print arg(1);
      break;
    }
}

Continue reading Drupal – Get URL Arguments in Custom module or Views Template

子華文集 – 棟篤屁 之 楊采妮都退休誰還夠膽入行

棟篤屁之楊采妮都退休誰還夠膽入行

楊采妮,娛樂圈當紅炸子玉女,能唱能演能寫真,事業如日方中,行內行外看見她都替她高興,她卻要在這時提出退休,探討一下背後的原因,可能比起日日追住睇真D那位亞姐為何說謊為何講大話為何做錯事為何喊不停來得有挑戰性。一個光榮離場一個黯然卸甲,在要八也要八得有人情味的大前提下,我們當然要選前者。始終,娛樂圈是供大家笑談取樂的地方,唔使去得太盡,搞出事就唔好啦,特別到時又一定冇人肯出來認頭添。
  
講番我們這位香港山口百惠。采妮自稱退休是因為要轉行做生意另謀發展,鄙八公我認為這個解釋說的太少,沒說的太多。就讓我從理論的層面八卦一下。
  
藝人要離開娛樂圈,一般會基於下列原因: Continue reading 子華文集 – 棟篤屁 之 楊采妮都退休誰還夠膽入行

Drupal – Create your own CSS style

Last time we have added a new font in the Drupal website using the @font-face module.
Drupal – Customize Fonts in Drupal

We can also apply this font-family in the .css file but first we have to add our own .css file and included it in the theme.

Go to your theme folder and create a new folder named as css if it doesn’t exist. Then create your .css file there. After that, go back to the theme folder and add the following line in the <theme>.info file. Continue reading Drupal – Create your own CSS style

Dream BIG and go for it =)