博客

HKDUG June 2 Meetup

Join the Hong Kong Drupal User Group for the June 2 meetup. This meetup will focus on Search Engine Optimization (SEO) + Drupal 6.x/7.x backend. Is honorable to invite Mr. Eddie Choi, Managing Director of FrontiersDigital (F-D), to give us some SEO tips from macro e-marketing point of view. Special thanks to CNNGo.com once again offered us use of their office in Quarry Bay.

Mr. Eddie Choi [1],[2],[3] had been invited to speak for many marketing conferences in Asia, conducted numerous private workshops held by the government and commercial organizations in Asia, specialty is search and social marketing particularly with a deep understanding of the market in China, too.

The Hong Kong Drupal User Group are open to everyone with an interest in Drupal and are a great opportunity to learn more about what Drupal can do and what folks are building with it.

Here are the meetup details so far:

  • SEO tips from macro e-marketing point of view.
  • How's Drupal 6.x/7.x SEO related functionality can boost your website overall traffic.
  • Live website demo of Drupal SEO related functionality.

Logistics:

Schedule (TBC):

  • 19:00 ~ 19:10: Kick-off Session. Introduce yourself; enjoy with free pizza and drinks :-)
  • 19:10 ~ 19:30: First Session. SEO tips from macro e-marketing point of view.
  • 19:30 ~ 19:50: Second Session. How's Drupal 6.x/7.x SEO related functionality can speed up your website overall traffic.
  • 19:50 ~ 20:20: Break. Feel free to ask your question and our volunteers will give you a hand!
  • 20:20 ~ 20:40: Third Session. Live website demo of Drupal SEO related functionality.
  • 20:40 ~ 21:00: Q&A Session. Don't wait and let us know about your issues :D
  • 21:00 ~ 22:30: After event drinks. A 5mins walk from Oxford House, we'll have a cafe sharing section with a free drink at East End Brewery (http://bit.ly/foF3Mg).

Sponsorship:

  • CNNGo.com, for meeting room reservation.
  • FrontiersDigital, for SEO tips presentation.
  • PantaRei Design Limited, for after event drinks.
  • There are sponsorship opportunities still available. Email mhyiu4c [at] pantarei-design [dot] com for details.

Volunteer:

  • Volunteers wanted, contact hswong3i [at] pantarei-design [dot] com to help.

Review of January 28 Meetup for HKDUG Newcomers

Thank you for everyone who join our January 28 Meetup for HKDUG Newcomers. We had a simple and relax gathering at home, introduce and sharing with each others (together with pizza, beer and free chat), discuss for many different Drupal 6/7 issues (Oh yes, MANY!), and also brainstorming for the needs of HKDUG newcomers. We even prolong the gathering with endless topics until 23:00. More photos can be found in here and Flickr!

Special thanks to my lovely wife Rebecca for the delicious home-made chicken wings + spaghettis :D

Some creative suggestion for our upcoming HKDUG meetup:

  • Live demo for Drupal 6/7 theme development, e.g. convert from RAW HTML/CSS design to Zen subtheme, with the help of Firebug.
  • Security of Drupal and cracking Drupal, e.g. how to protect your server and Drupal site, how to discover the attack.
  • Hong Kong Drupal developer marketing strategy, e.g. how many people are working for Drupal-specific development, the needs and requirement of Hong Kong's clients.
  • Hong Kong Drupal User Group website design/idea/suggestion, e.g. prepare topic for 2011-02-26 HKDUG website hacking section.
  • Hong Kong Drupal User Group logo competition, e.g. close for submission a week before 2011-02-24 meetup, setup polling, and announce for winner during meetup.
  • Drupalcamp-like hand on problem solving section, e.g. submit question before meetup, a special meetup on Saturday/Sunday for at least 5 hours, ad-hoc question submit in BarCamp style, hand on problem solving by volunteers.
  • ... and even more!

IMHO it should be a good starting point for our HKDUG 2011 schedule, which focus on needs of our newcomers, setup interconnection between each members, promote the usage of Drupal in Hong Kong market and so on.

Do you have any idea of the HKDUG 2011 roadmap? We need your suggestion and contribution :D

PantaRei Design Limited get listed in Drupal Services

Thank you for help from kiamlaluno and pinglaura PantaRei Design Limited is now get listed in Drupal Services! It is a good start of new year, as we are target to provide more Drupal contribution within Hong Kong market, and support the growth of Hong Kong Drupal User Group, too!

Druapl 7 Release Party and the Hong Kong Drupal User Group

Thank you for attending our Drupal 7 Release Party by Hong Kong Drupal User Group at 2011-01-07. We had around 40 attendants, which was almost 3 times of our normal HKDUG meetup! More photos can be found in here and Flickr!

The party was started with a Drupal 7 slideshow and video by Dave Hansen-Lange, and Edison Wong gave a brief review of Drupal 7 Installation (ppt, pdf), Drupal 7 core improvement quick review (ppt, pdf) and Drupal 7 3rd party modules upgrade status (ppt, pdf). We also had an active Q&A section and shared for some key question about upgrade from Drupal 6 to 7, too.

Moreover, within the Drupal 7 3rd party modules upgrade status section, Edison Wong compare both Drupal 6 and 7 functionality with a custom installation profile, which start develop since BarCamp HK 2010. This installation profile is now available for public download. Please feel free to download and comment with your idea :-)

Finally, we are scheduling for next HKDUG meetup on February 24. Hope to meet you soon!

P.S. Oooh! An additional meetup for HKDUG newcomers on January 28! Don't miss this chance and let's meet with other Hong Kong Drupal fans :-)

HKDUG Drupal 7 Release Party

Drupal 7 - Time to party!

Join the Hong Kong Drupal User Group for the launch of Drupal 7. And for sure, we will throw in some special D7 presentations to add to the fun!

The Hong Kong Drupal User Group are open to everyone with an interest in Drupal and are a great opportunity to learn more about what Drupal can do and what folks are building with it.

Here are the party details so far:

  • Free pizza and drinks :-)
  • Some demonstrations and presentations about Drupal 7
  • Ask A Drupal Expert booth
  • Your idea here - Suggestions welcome - Feel free to comment on this post or contact us directly!

Logistics:

Sponsorship:

  • PantaRei Design Limited
  • There are sponsorship opportunities still available. Email mhyiu4c [at] pantarei-design [dot] com for details.

Volunteer:

  • Volunteers wanted, contact hswong3i [at] pantarei-design [dot] com to help.

Patching Drupal reCAPTCHA module with Library API

During regular update with our public Drupal distribution, I just discover that reCAPTCHA module is now embeding recaptcha-php library within source code, which belongs to MIT license. According to my understanding we should only check-in contribution code into Drupal's CVS repository licensed with GPLv2, so I try to patch and contribute reCAPTCHA module with Library API support. Here I would like to give some sharing about how to add Library API support into your module.

Add the library path option within admin UI

It is always a good idea to let end-user choose where to store its libraries, even module support with Library API. Code below patch reCAPTCHA with such additional option. It will also check the target path during "Save configuration" so guarantee the target file is exists.

Index: recaptcha.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/recaptcha/Attic/recaptcha.admin.inc,v
retrieving revision 1.1.2.2
diff -u -p -r1.1.2.2 recaptcha.admin.inc
--- recaptcha.admin.inc 19 May 2010 17:29:37 -0000 1.1.2.2
+++ recaptcha.admin.inc 22 Dec 2010 13:11:06 -0000
@@ -14,6 +14,14 @@ function recaptcha_admin_settings() {
   _recaptcha_load_library();

   $form = array();
+  $form['recaptcha_library_path'] = array(
+    '#type' => 'textfield',
+    '#title' => t('recaptcha-php library path'),
+    '#default_value' => variable_get('recaptcha_library_path', RECAPTCHA_DEFAULT_LIBRARY_PATH),
+    '#description' => t('The location where recaptcha-php is installed. Relative paths are from the Drupal root directory.'),
+    '#required' => TRUE,
+    '#after_build' => array('_recaptcha_admin_settings_check_library_path'),
+  );
   $form['recaptcha_public_key'] = array(
     '#type' => 'textfield',
     '#title' => t('Public Key'),
@@ -84,3 +92,11 @@ function recaptcha_admin_settings_valida
     form_set_error('recaptcha_tabindex', t('The Tab Index must be an integer.'));
   }
}
+
+function _recaptcha_admin_settings_check_library_path($form_element) {
+  $library_path = $form_element['#value'];
+  if (!is_dir($library_path) || !(file_exists($library_path .'/recaptchalib.php'))) {
+    form_set_error($form_element['#parents'][0], t('The recaptcha-php files <em>recaptchalib.php</em> could not be found in the %library_path directory.', array('%library_path' => $library_path)));
+  }
+  return $form_element;
+}

Check if library file exists before require_once

Next we should check the target path before require_once. The original code utilize module_load_include() so will only check with local path; after patch we will check with follow cases:

  • The pre-configured library path by end-user, as mentioned in previous section.
  • The module local path, e.g. sites/all/modules/recaptcha.
  • The library path fetch from libraries_get_path() if this function exists.

Why don't we just use Library API's libraries_get_path() but give such complicated handling? Sometime you may not hope to enforce end-user to install Library API, sometime you may hope to write your own installation profile where Library API not yet install and so module will report with library path not found, etc.

Index: recaptcha.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/recaptcha/Attic/recaptcha.module,v
retrieving revision 1.13.2.4.2.11.2.14
diff -u -p -r1.13.2.4.2.11.2.14 recaptcha.module
--- recaptcha.module 24 Sep 2010 02:25:51 -0000 1.13.2.4.2.11.2.14
+++ recaptcha.module 22 Dec 2010 13:11:07 -0000
@@ -215,5 +229,31 @@ EOT;
  * Load the recaptcha library.
  */
function _recaptcha_load_library() {
-  module_load_include('php', 'recaptcha', 'recaptcha/recaptchalib');
+  static $library_path = NULL;
+
+  if ($library_path == NULL) {
+    $recaptcha_path = variable_get('recaptcha_library_path', RECAPTCHA_DEFAULT_LIBRARY_PATH);
+    if (!$library_path && file_exists("$recaptcha_path/recaptchalib.php")) {
+      $library_path = $recaptcha_path;
+    }
+
+    $module_path = drupal_get_path('module', 'recaptcha');
+    if (!$library_path && file_exists("$module_path/recaptcha-php/recaptchalib.php")) {
+      $library_path = $module_path;
+    }
+
+    if (function_exists('libraries_get_path')) {
+      $libraries_get_path = libraries_get_path('recaptcha-php');
+      if (!$library_path && file_exists("$libraries_get_path/recaptchalib.php")) {
+        $library_path = $libraries_get_path;
+      }
+    }
+  }
+
+  if ($library_path !== NULL) {
+    require_once "$library_path/recaptchalib.php";
+  }
+  else {
+    drupal_set_message(t('The recaptcha-php files <em>recaptchalib.php</em> could not be found in any possible directories.'));
+  }
}

Conclusion

Adding Library API support into module shouldn't be too complicated, but increase the flexiblity for end-user to choose the suitable library version; moreover, this can escape from the license conflict nor hijacking when contribute code to Drupal CVS responsity; finally, it can also decrease the overall module package size for download :P

P.S. Above changes are already included within our pantarei-siren-6.20-dev.tar.gz. Please feel free to test it :D

Some Recent Update with PantaRei Siren

Since last alpha update we add some additional features to PantaRei Siren:

  • Include memcache module (http://drupal.org/project/memcache) within our collection. With memcache enabled we can place all Drupal internal cache from MySQL database table storage to physical memory, therefore reduce the overall disk I/O for both anonymous and authenticated user access.
  • Include cdn (http://drupal.org/project/cdn) within our collection, plus corresponding Drupal core patch. With cdn enabled all static files can be serve from another base URL rather than that of your main domain, therefore client's web browser will able to preform parallel download for your site and so boost up the overall page loading performance. It is still even useful for a server alias with your main domain, therefore client will able to setup multiple parallel connection to your server (BTW, the bottleneck will therefore due to your overall internet connection bandwidth). Additional Drupal core patch is already applied in PantaRei Siren latest development snapshot package.

Both of above 2 modules are now enabled for both my blog (http://edin.no-ip.com/) and our company website (http://pantarei-design.com/). Please feel free to experience with the performance boost :D

PantaRei Siren 6.19 Alpha 3 released

Today we are proud to announce the release of the third alpha version of PantaRei Siren 6.19-x for your further testing and feedback.

This release include:

  • Update contribute theme Easy Breeze as 6.x-2.0-alpha2
  • optimize all png files with pngcrush.
  • patch core with simpletest support by default.
  • update backup_migrate as 6.x-2.3.
  • update colorbox as 6.x-1.0-beta7.
  • update data as 6.x-1.0-alpha14.
  • update image as 6.x-1.0.
  • update imageapi as 6.x-1.9.
  • update imce as 6.x-2.0-rc2.
  • update path_redirect as 6.x-1.0-rc1.
  • update pathauto as 6.x-2.0-alpha3.
  • update simpletest as 6.x-2.11.
  • update token as 6.x-1.15.
  • update views_bulk_operations as 6.x-1.10.
  • update webform as 6.x-3.3.

PantaRei Siren 6.19 Alpha 2 released

Today we are proud to announce the release of the second alpha version of PantaRei Siren 6.19-x for your further testing and feedback.

This release include:

  • Update contribute theme Easy Breeze as 6.x-2.0-alpha1.
  • Update Colorbox as 6.x-1.x-dev.
  • Update Google Analytics as 6.x-3.0.
同步内容