Skip to main content
On this tutorial I will show you how to configure Varnish as a proxy server so you can re route you requests to any Apache or Nginx Server. 
Configuring Varnish on Ubuntu on distributed Servers is not a complex task, we just need to download some packages and then we will have to copy/paste the configurations below in order to start. Feel free to modify the provided configurations according to your needs. This post assumes there is another server Apache/Nginx listening on port 80 and running a Drupal site. 
Ok, Let's begin.

Install Varnish 3.0.5 from Ubuntu 14.04…
Read more
Tuesday, January 20, 2015
Foundation is one of the latest and most popular responsive frameworks available on the Web nowadays, quite easy to use, fast to learn, the documentation section is really useful and there is also a Drupal version of this framework included as a base theme so you can take good advantage of Foundation in Drupal.

Zurb Foundation is the Drupal base theme that implements this nice framework and offers a lot of advantages for example, creating Modal windows with Foundation is a pretty straight forward task and the base theme makes this task way easier on Drupal by providing a theme…
Read more
Wednesday, November 5, 2014
On this tutorial, I will explain how to configure a Drupal site so it can display a Map (Google Map) based on coordinates taken from a GPS file (*.GPX).

Modules needed:

            Geofield
            Geocoder
            Geophp

Install these 3 modules and the Geofield Map submodule that comes bundled with Geofield as usual or using drush, once you are finished installing, create a sample content type and add 2 new fields to it:

    …
Read more
Friday, June 13, 2014
Content managers have to deal always with metadata provided by imagery of your website, this can be a tedious task for them and obviously it takes time to fill out all the meta data for your images so they can be  properly displayed on the site, indexed by search providers, etc.

One of the easiest ways I found to get information from an image file on Drupal is by using a module called Exif, this module uses the exif specification format to get the information used by digital cameras for example. This module provides a variety of information extracted from an image field on Drupal and…
Read more
Friday, February 14, 2014
On this tutorial we will learn how to easily install the necessary Ruby packages needed on Ubuntu 14.04 in order to run compass and let Drupal do the magic with SASS.

On a terminal window type:

$sudo apt-get install ruby ruby-dev

once ruby is installed, run:

$sudo gem install compass
$sudo gem install sass

and there you go!

run "compass watch" on the Drupal theme folder you chose for you site and that's all, Compass will start scanning all the *.scsc files and compile all the changes on your styles.

$cd /my-drupal-site/sites/all/themes/my-responsive-theme-with-sass…
Read more
Wednesday, February 12, 2014
Some helpful samples that can be used to process data after a query on Drupal.



<?php
// Retrieve all records into an indexed array of stdClass objects.
$result->fetchAll();

// Retrieve all records into an associative array keyed by the field in the result specified.
$result->fetchAllAssoc($field);

// Retrieve a 2-column result set as an associative array of field 1 => field 2.
$result->fetchAllKeyed();
// You can also specify which two fields to use by specifying the column numbers for each field
$result->fetchAllKeyed(0,2); // would be field 0 => field…
Read more
Friday, September 27, 2013
This is a PHP function I wrote that helps simulating a drupal get form for Views Exposed Filters, it returns the exposed form array so you can theme it or alter it:


function _get_exposed_form($view, $display_id){
$view = views_get_view($view);
$view->set_display($display_id);
$view->init_handlers();
$form_state = array(
'view' => $view,
'display' => $view->display_handler->display,
'exposed_form_plugin' => $view->display_handler->get_plugin('exposed_form'),
'method' => 'get',
'rerender' => TRUE,
'no_redirect' =…
Read more
Friday, July 20, 2012
Node referencing has been a great concept when working with Drupal content, it helps create complex references between nodes and it has been widely used, for example when you create a Photo Gallery. Having a Photo Gallery is pretty easy in Drupal, you need a content-type that will handle the information of an album or gallery and another content-type that will handle the images information. Using Node References will attach those images to your Albums. How? using this module in Drupal 7:

References

Of course, by default you won't have a nice way to identify which of the referenced nodes…
Read more
Sunday, April 10, 2011
I got to say Wow! I have been working with Drupal for the past 4 years and translating content has been a difficult process not only when installing a site with different languages but maintaining that site and the translations. Now with Drupal 7 this tasks is becoming a pretty simple task thanks to 2 fully recommended modules:

Localization update

Localization client

Localization update module is now taking care of importing the .po files from translations project http://localize.drupal.org/ not only for the core files but the community modules installed on your system, automatically…
Read more
Monday, April 4, 2011