Articles from Leow Kah Thong

Primary tabs

Code below allows you to render the Drupal user edit form anywhere. Replace UID with the user account ID to edit.

First, hook into your existing form, find your Form ID.

/**<br> * Implements template_preprocess_page().<br> */<br>function YOUR_THEME_preprocess_page(&amp;$vars) {<br>&nbsp; // Remove the "No front page content has been created yet.".<br>&nbsp; if (isset

ReCAPTCHA allows your to add spam protection to your custom Drupal forms without any further coding work.

I had recently found the need to manually reindex the Search API indexes programmatically after performing some other operation.

Super duper simple example on how to programmatically create your own custom Drupal blocks and display any content.

Code snippet below needs to be in a custom module.

I recently wanted to have a quicker way to unpublish my nodes in one of my Drupal project with Contextual Links.

I had another request to alter the default taxonomy_term_data table and adding the timestamps; created and changed just like in the node database table.

Here's a little snippet that will do the trick.

Sharing something I recently needed to do.

Ever been in a situation whereby you want to serve file download via Drupal? Such as exporting nodes to CSV, etc. Well this tutorial is for you.

Pages

Articles from Leow Kah Thong

Code below allows you to render the Drupal user edit form anywhere. Replace UID with the user account ID to edit.

First, hook into your existing form, find your Form ID.

/**<br> * Implements template_preprocess_page().<br> */<br>function YOUR_THEME_preprocess_page(&amp;$vars) {<br>&nbsp; // Remove the "No front page content has been created yet.".<br>&nbsp; if (isset

ReCAPTCHA allows your to add spam protection to your custom Drupal forms without any further coding work.

I had recently found the need to manually reindex the Search API indexes programmatically after performing some other operation.

Super duper simple example on how to programmatically create your own custom Drupal blocks and display any content.

Code snippet below needs to be in a custom module.

I recently wanted to have a quicker way to unpublish my nodes in one of my Drupal project with Contextual Links.

I had another request to alter the default taxonomy_term_data table and adding the timestamps; created and changed just like in the node database table.

Here's a little snippet that will do the trick.

Sharing something I recently needed to do.

Ever been in a situation whereby you want to serve file download via Drupal? Such as exporting nodes to CSV, etc. Well this tutorial is for you.

Pages