Skip to main content

Drupal 6

knackforge blog knowledge base

Drupal cron-queue

Drupal cron queue is very useful while running a big cron job. It will split a big cron job into small chunks and execute without getting timed out or being abruptly ended.

Three important things to remember in queue implementations are

  1. Create cron queue in hook_cron_queue_info
  2. Fill the queue with data
  3. Define worker callback function

STEP 1 - Create cron queue in hook_cron_queue_info

knackforge blog knowledge base

Drupal 6: system_settings_form

Drupal has a rich set of API to aid us in implementing custom functionalities with minimal optimized code. One such utility is system_settings_form($form).

Recently in my project, I created a new admin configuration form, in that I had to set the all the field values as system variables. If I had not used system_settings_form(), then the code would have been like this.

knackforge blog knowledge base

Responsive vertical column layouts using jQuery Plugin

Usually while we add contents to a div, it get arranged accordingly to our web styles. But there are some special cases where we need our contents to be arranged in a vertical manner as like the newspaper (or) journal content. To achieve this vertical fashion of content alignment, after a very long and vast search, we found these jQuery plugin to customize the column layouts dynamically based on these plugins:

  • columnizer.js
  • isotope.js
Custom drush command

Creating a custom drush command

No Drupal Developer needs introduction about Drush. The power and features of Drush has made the job easier for many developers. Drush by default has a list of commands that we can make use of, the entire list can be seen here. But apart from that, the Drush does has the feature to allow custom commands. 
These custom commands can be used as per our need and scenarios. In my case, I had the need to list the users in site using a Drush command.
knackforge blog knowledge base

Configure Apache Solr with Tomcat

At many times Drupal Architects prefer to go with Apache Solr instead of Drupal core search. I am no outlander to this scenario, but this time it was a new requirement. By default the Apache Solr relies on Jetty server to index and retrive items during the search. My need was to use Tomcat server in the place of Jetty. The first glance proved it was an easy task, but latter the tough fight started.

Subscribe to Drupal 6