Drupal 6.x

A deployment strategy for Drupal sites

Enterprise Servers: 
PHP: 

Oh well, what do you call a system log that has no entries; a malfunctioning system, right. So what would you call a supposedly web log (blog) that has no entries for almost a year and a handful in a couple years Laughing?

Despite deeply wanting  to keep writing, I hardly get a chance to do so these days. But so much for the ranting, time to get down to business now.

Voip Drupal and PhoneRecorderField - Resolving "Audio not recorded. Try again." error

This week I delievered the first phase of a VOIP based Drupal site to a medical industry client using the VoipDrupal suite of modules. Let me first take this opportunity to acknowledge the great work Leo Burd and his team at MIT Center have done in developing an excellent and comprehensive set of modules revolving around providing VOIP support in Drupal, I never thought I could do a Drupal VOIP project in such less time until I did it using the mentioned suite of modules.

Drupal - Handling PayPal IPN callbacks and saving data to the database

Tags: 

PayPal integration is such a common requirement for e-commerce sites, irrespective of the platform the site is built with, right. So recently a client approached me for integrating PayPal payments into their Drupal site, and my immediate question to them was why are they asking me to invent the wheel again. There sure are many PayPal integration modules available on drupal.org, and why don't they use one of them.

Drupal and Chrome - Refused to execute a JavaScript script. Source code of script found within request

While editing content on a client site last week, I got a rather confusing error in Google Chrome Developer tools:

Refused to execute a JavaScript script. Source code of script found within request.

I was incorporating Google Maps on a page through a Block and the block content had some javascript code in it. But on saving the block, two issues surfaced: 1) I got the above error in Chrome Dev tools console and 2) The Map did not show up on the page.

Drupal - true "Save Draft" functionality for node forms by overriding node form validation

Let me clarify staright away that the code below has been tested successfully against Drupal 6 only. But I believe it should work with Drupal 7 also with minor changes (if any required). Okay now, let's come to the point.

Drupal - node form validation methods in hook_form_alter should be set using #after_build to always execute on form submission

Last week, I was trying to add a custom validation method for node form of a particular content type in Drupal. My initial approach was as naive as specifying my custom validation method in hook_form_alter, something like the following:

 

{syntaxhighlighter brush: php;fontsize: 100; first-line: 1; }function mymodule_form_alter(&$form, &$form_state, $form_id) { switch($form_id) { case 'artist_node_form': $form['#validate'][] = '_mymodule_custom validation'; break; } }{/syntaxhighlighter}

Drupal - Removing the default "-Select-" option from select form elements

I needed to remove the default "-None-"/"-Select-" option that Drupal's Form API adds to "select" form elements. Let's take an example. Consider the following "select" element definition for a form:

 

$element = array (
			'#type' => 'select',
			'#options' => array (
							1 => 'Very poor',
							2 => 'Not that bad',
							3 => 'Average',
							4 => 'Good',
							5 => 'Perfect',
						),
			'#required' => TRUE,
			'#title' => 'Rating',
		);

 

Drupal - Need to include css files manually when using jquery_ui module

Web 2.0: 
PHP: 

After my last blog post on Drupal, expect some more Drupal related blog posts related to my recent work that I have been doing in Drupal.

You might be knowing that the jquery_ui contributed module is the preferred way to use jQuery UI in Drupal. This module provides the jqeury_ui_add method with which you can include any jQuery UI widget on the page. The module ensures that any widget's dependencies are also loaded automatically and that multiple modules wanting to include the same widget do not conflict by including the widget script files twice.