Skip directly to content

Drush Make & Site Deployment

on Wed, 01/11/2012 - 20:35

When you are going to develop a Drupal website first you have to download the Drupal version you want to use and install it.

When you have completed this task you have to download and install the modules you commonly use in your Drupal websites.

If you want to automate this tasks and create a skeleton for the Drupal websites you develop, you should use the Drush and the Drush Make (included in the Drush 5.x version) scripts.

The Drush and Drush Make scripts installation is very simple in a Linux environment and is explained in the Drush Drupal Project page.

Once you have successfully

Drupal 7 & Twitter

on Sat, 12/03/2011 - 22:48

The Drupal 7 Twitter module is under active development and I am testing it in order to help locating and solving bugs.

The first step to begin with the beta testing proccess is to install the module and it's dependencies.

If you want to activate the Twitter Sign In feature in your website you have to install and enable the following modules:

I have installed the latest development version of both modules (7.x-3.x-dev) because I want to help with the development proccess.

Once you have enabled the modules you have to configure the OAuth module from the

Drupal 7 Template Suggestions

on Tue, 11/29/2011 - 23:31

Sometimes you will need to customize how your Drupal pages, nodes, comments... are presented.
It's time to override the default Drupal templates and make some theming work.
But, you will wonder: What is the correct template name that I should use?

File handling

on Wed, 11/09/2011 - 20:28

In this post I want to explain the process handling file uploading and reading in Drupal 7.
There were some significant changes in the Drupal File API that make easier to deal with files.

Calculate remaining time

on Tue, 10/25/2011 - 18:44

Trying to calculate the remaining time of a date until now I found two solutions for both PHP versions.

The first method is for PHP 5.2 and is based on convert the seconds from a timestamp UNIX date to the number of days, hours and minutes.

The second method uses the DateTime object from PHP 5.3

Tags: 

Theming the node

on Fri, 10/07/2011 - 13:46
If you want your theme to be easy to understand and to locate the tpl files you will need to order them in folders.
 
The best choice is to separate them by node, field, block, view and other folders. So your node.tpl.php files will be located in the templates/nodes folder for example.
 
Another way to improve your node tpl files is separating them by node type. If you want to theme the blog nodes you will need to create a node--blog.tpl.php file and make your changes in it.
 
On the other hand, if you want to theme the node full view and the node teaser view of your blog nodes you could do

Coding standards

on Fri, 04/22/2011 - 14:06

Before code your module you must know the Drupal coding standards in order to code simple and clear modules for the community.

The Coder module will helps you on reviewing your module coding. The following are some coding best practices you should take into consideration before begin to develop Drupal modules:

Module naming conventions

on Tue, 03/08/2011 - 19:13

First of all you will need a name for the module you want to develop. Naming in Drupal is very important because other developers will find your module by it's name.

Drupal also adds the release and branch of your module development status in order to offer a more descriptive information about it:

Branch name Branch Description Downloadable release
7.x 7.x-dev release (core) drupal-7.x-dev.tar.gz|drupal-7.x-dev.zip
7.x-1.x 7.x-1.x-dev release (contrib) drupal-7.x-1.x-dev.tar.gz|myproject-7.x-1.x-dev.zip
7.x-2.x 7.x-2.x-dev release (contrib) drupal-7.x-2.x-dev.tar.gz|myproject-7.x-2.x-dev.zip
Tags: 

Wellcome to drewpull.com

on Sat, 01/08/2011 - 19:13

A few years ago I had to dive into Drupal module development while I was working in an important project at an opensource based company, Emergya.

Nowadays, with the recent Drupal 7 released I taked a look at the differences with the previous version, Drupal 6. Not only the Drupal code has changed, the version control system used by the Drupal developers community has changed too. Recently, Drupal migrate from CVS to Git in order to move to a decentralized workflow.

I will try to describe the correct process for developing drupal modules and upload them to drupal.org as full projects and some