You are here

Altering views queries

Posted: Sat, 14/12/2013
I needed to add a outer select query to a view query to remove double rows in the output, which came form the same node being related to two different Organic groups.

Speed up drush make

Posted: Tue, 09/07/2013
When using drush make on projects where each repository (or module) have their own makefiles and these declares the same modules over and over again drush will download the same data more than once. The code here will utilize drush's cache to only download a module or library once.

Find and Image Magick

Posted: Sun, 17/02/2013
I ran into a problem where a site user had upload a bunch of larger images that ended up crashing PHP as 196Mb of memory was not enough for image styles to resize the images. To the rescue comes the find command combined with ImageMagick's convert program to resize the images.

Log rotation on a Mac

Posted: Wed, 07/11/2012
When working with large web projects over a longer period of time on a local development machine. You may notice that your disk space (especially with a SSD) is running low and one of the reason could be your log files. So why not rotate them an automatically delete older ones.

Ajaxifying Drupal forms

Posted: Sun, 14/10/2012
Sometimes you may want the login form or a contact form to be displayed in a more dynamic way. It could be in modal window and using ajax to submit the form for better user experience. This post provides example modules for Drupal 6 and 7.

SSH tunnels and access restriction

Posted: Wed, 25/07/2012
When working with large Drupal sites which connects to web services, which is protected by IP address or you are lock out by company firewalls. SSH port forwarding (also known as SSH tunnels) can be the solution.

Drush synchronization of database and files

Posted: Mon, 16/04/2012
You can use drush to synchronize databases and files directories from production servers to your local development setup. This blog post show an easy way to setup these aliases and adds three new commands to do drush synchronization.

Protecting development servers for search engines

Posted: Sun, 15/04/2012
When having development servers that clients needs to access, but you don't what search engines to index one solution is to protect the server with HTTP authorization implemented using PHP. This post while explain how to do just this on an Aegir hosting solution.

OpenLayers making polygons interactive in Drupal 7

Posted: Sat, 04/02/2012
I have been working with OpenLayers 2.x in Drupal 7 where I needed polygons, loaded from a KML file, to link to Drupal pages when clicked. I ended up create a module that adds a new behaviour to the layer containing the polygons.

Panels and exposed filters (the repeating URL)

Posted: Thu, 05/01/2012
When using panels together with views panes, which have exposed filters, it happens that parts of the URI is append in the URI each time you submit the form. This can be fixed by altering the views exposed form action variable.