drupal 7

Automated deployments to Acquia. Cloud API

When you set up your Continuous Integration you really would like to set your deployments automatically. If you use Acquia hosting for your website it does make a lot of sense to use all environments in your workflow. But how you can automate deployments to these environments without touching UI (copying database, files, deploying code)?

The answer is in Cloud API


You can call them either with drush command or curl request. We will touch the drush commands approach in this post.

Render custom button

In this article we will show small code snippet that helps you to control very granular how to render submit buttons on your forms.

CTools plugins system

When we are writing our own module we, as good developers, should allow other people extend/modify some parts of it. Yes we are talking about defining our own module's hooks. But what we can do if we need to "extend" our module in several places but we should be sured that other module that implements one hook should also implement another one? What we should do if we have a lot of such cases and we should take care about consistency of implementations of other modules? Also sometimes we would like user to decide what implementation to run (so we want some kind of administration page where we select what extention to be active).

Drupal 7 show empty fields

In this note I would like to share solution for quite common task: show node fields titles even if field are empty. By default if the field is empty it is not included in the node. But practically sometimes client would like to see title of the field even if the field value is not set. As this task has made me debugging for a while I hope it will save someone else's time.

So solution is to use hook_field_attach_view_alter(). This hook is invoked after field module added fields renderable arrays to the content of the node.

Feeds cheatsheet for developers

In this article I would like to create some notes about architecture of the Feeds module. This is really great module and it is real “must know” when we are talking about regular import of the data from some sources.

There is great documentation available on http://drupal.org/documentation/modules/feeds. Here I try to create a cheatsheet for 7.x version of the module that let developers brief understanding about how things work.

Google Chrome joins Simpletest Selenium framework for Drupal

One of the modules I am involved in is Selenium module. In brief it integrates Selenium2 to simpletest framework of Drupal. From the beginning it was possible to run test in Firefox that opens pages of the simpletest sandbox. As we are in full control of browser we are able to test javascripts in it. This is the main goal of the Selenium integration.

Add custom field to Search API Solr index

Today we are going to talk about really awesome module Search API

One of the most popular tasks I have regarding customizing apachesolr search results is adding new fields to index and to have custom facet for them. So lets discuss how it is done if we are using Search API module.

D7 create zip archive from multiple custom uploaded files

In this article I would like to share another interesting task connected with upload files in D7.

Task is to have custom form that allows to upload multiple files at once and create zip archive from these files on finish.

I really liked the way google mail handles attached files form and tried to implement similar behavior but without writing custom javascript. Thanks to Form API and #ajax property it is very managable. So lets dive into code!

Drupal 7 upload private files easy

One of the new features of the Drupal 7 core is new File API. I would like to show how easy it become to use private file system.

Our task is quite simple: user should be able to upload private files that only he has access to download. Also we will add permission for "administrator" role to download any private file that users have downloaded.

So lets start. First of all we create separate page with form and defining our custom permissions.

Drupal7 AJAXified Solr Search with facets. Search API, Panels and some custom code.

In this article I would like to show how to build very nice user experience search page with facets. For this we will use Apache Solr as our search engine and some custom code to make it fully AJAX (with full non-javascript support).

Here is demo screencast of what we want to do.