Tag Archives: Postaday2011

Drupal – Render Forgot Password Form by drupal_get_form()

Update @ 2013-05-30: The piece of code in this post works on Drupal 6. If you are looking for Drupal 7 solution, please refer to the comment made by Matthias. Thanks Matthias. =D

If you want to print the Forgot Password form with drupal_get_form(), you have to include the user module.
Try the following piece of code.

<?php
  // Drupal Forgot Password Form
  module_load_include('inc', 'user', 'user.pages');
  print drupal_get_form('user_pass');
?>

 

Done =)

Reference: printing the ‘request-new-password’ form

Drupal – Increase Views Relationship Delta Limit

The relationship delta in Views helps you to link a specific referenced node. but it only has 1 to 10 options. I want to increase the delta limit, so let’s hack the CCK module. Yes, the CCK module instead of the Views module. =P

Open cck/includes/views/handlers/content_handler_relationship.inc and modify the $max_delta as follow. Continue reading Drupal – Increase Views Relationship Delta Limit

Java – JCalendar for Date Selection

Previously i have created two posts about a simple Swing Date Picker.

 

Here comes a better solution – JCalendar.

JCalendar is Java Bean which provides a complete feature of a Date Picker in Java. For more information, please visit JCalendar Java Bean, a Java Date Chooser Continue reading Java – JCalendar for Date Selection

沈旭暉 – 八月飛霜 如何再造和平理性的土壤?

【明報專訊】唐英年司長說,「我們普遍接受的是和平理性的一套」,抽空而言,筆者十分認同。但這和平理性的傳統是如何產生的,如何才能捍衛﹖筆者不熟悉香港政治,在此先引述科大學者蘇耀昌對香港抗爭運動的分析﹕概括而言,我們經歷了三個模式,從20世紀20年代的罷工模式,到50、60年代的城市暴動模式,再過渡到80年代後的民主示威模式。前兩個模式均見流血,比今天任何抗爭激進得多。

和平理性是如何醞釀的

換言之,今天我們很珍惜的和平理性,並非香港與生俱來的,而是60年代後的特定環境醞釀的,筆者嘗試將之歸納為六點﹕ Continue reading 沈旭暉 – 八月飛霜 如何再造和平理性的土壤?