Drupal – Automated URL Alias Using Pathauto

All Drupal contents are base on node. Whatever contents you create, it has a url http://<drupal_root>/node/<node_id&gt;. For each content, you can customized the URL alias but think about if you have 100 nodes, you will not enjoy setting the each alias manually. It’s better to pass the job to PathAuto.

After installation, go to @ Administer –> Site building –> URL aliases. There is a new tab called Automated alias settings. For every Story content type, i want the URL alias to be http://<drupal_root>/stories/<story_title&gt; so i set stories/[title-raw] in Pattern for all Story paths. Continue reading Drupal – Automated URL Alias Using Pathauto

挪威的森林

作者: 村上春樹

第一次接觸村上春樹不是讀他的小說,而係讀他的高牆與雞蛋論。一直都想了解他多一點,但隨了金庸小說我並未讀過非武俠小說,點知一試難忘。

沒有絕世武功,沒有大俠英雄,取而代之係現代人人性的刻畫,真實得令我毛髮直豎,我從未想過會有這種感覺。

我諗我有小小鍾意左…文學。 =P

「沒有什麼人喜歡孤獨的。只是討厭失望而已。」

「不要同情自己,同情自己是下等人幹的事。」

 

P.S.: 係後記中,村上提到此書的前部份是寫於 Mykonos, 後半部主要係 Rome,使我對它更有親切感。

陶傑 – 人民勝利了?

大家樂事件,老闆終於龜縮投降,把剋扣午飯的那二十分鐘幾元錢工時擲回,有團體歡呼:人民勝利了

人民勝利了?哈哈,多矯情的口號。不錯,揚言罷食一天,經許多團體一嚇唬,大家樂的老闆退讓了。說這是什麼「人民的勝利」,不如說是香港的商人,在殖民地的溫室裏受呵護慣了,沒見過大場面,經不得嚇,「人民」只是在城門外叫陣呢,還沒開仗,就搶先扯了白旗。

就像一個青島的美女,跟一個柔弱的港男上牀,她才脫掉上衣, Bra還沒解開,港男就搶先早了洩,垂頭喪氣了。但美女不可以到處誇耀自己的「功夫一流」,不,碰都沒碰一下,是這個不爭氣的廢柴,自己的衰老過早崩了潰。 Continue reading 陶傑 – 人民勝利了?

Drupal – Ubercart Localization

Localization with Ubercart is somehow a bit difficult. Assume we have 2 languages, English and Traditional Chinese, installed. For a particular product, there will be one node representing the English one and the other node representing the Traditional Chinese one. If you add the English node into the cart, it will not be translated in the cart and checkout page. In other words, they are treated as 2 different products.

The following example can localize the Product content type even in the cart and checkout page. and it is based on the work by Stewart Adam. Please refer to for the post – Translating or internationalizing an Ubercart store: Common problems & solutions more information.

1. Create a custom module and add the following hook implementation in the .module file. Continue reading Drupal – Ubercart Localization

Drupal – Build an Online Store with Ubercart

The Ubercart module is a complete E-Commerce suite which turn your Drupal website into an online store. It is a very big module which contains a lot of features. In this article, i will try to show you those basics but actually i am not intimate with it very well.

Before you start, it is recommended that Imagecache, CCK Image field and Views are installed. This allows our store product image showing to the customers.

1. Download and install the Ubercart – core features. Continue reading Drupal – Build an Online Store with Ubercart

Drupal – Synchronize Translation

We can translate contents/nodes by activating the Content Translation.
Drupal – Content Translation
 

The translated node itself has not relation with the original node except their node ids are mapped. So I can have a price $10 in the English item but $1000 in the Traditional Chinese item. It will be quite difficult to manage when the amount of content is getting more and more. Therefore, i18n provides another feature called Synchronize Translations. Whenever a node is updated, the synchronized fields of all other corresponding nodes are also updated. Continue reading Drupal – Synchronize Translation

Dream BIG and go for it =)