Home
A blog about web development and Drupal.

module

July 30, 2015

Showing a Node Status Icon Using a Custom Panels Plugin

We often use Panels to build node page layouts, because it enables a vast range of options to show content in various sections of the page. In addition, you can develop a custom plugin for Panels, which brings ultimate flexibility. I took that route when I needed to display an icon next to the node’s title to indicate whether it is published or not. The Panels module relies on the Ctools plugin API, so in order to add our custom plugin to Panels, we need to implement hook\ctools\plugin\directory(). This will tell Ctools where it can find our plugins. This hook gets called multiple times, but…

June 21, 2014

Defining Organic Groups Context on Custom Pages

Organic Groups is one of the most powerful social networking modules for Drupal. It allows users to maintain groups. The managers of these groups can control who can join, or post or view content in their groups. Essentially, these groups can act as microsites inside the site; they have their own user list, content, and access control. For example, a football site might want to maintain groups for football teams, and post news and announcements that are relevant to the team in the team's group. The players would then join the OG group of their team. When players visit the group's page, they…

July 30, 2012

Working with the Drupal Computed Field Module

When setting up content types on a more involved site, a developer could easily end up with having an enormous list of fields in one single content type. When this happens, I tend to pause for a second, and think through whether there is any way to consolidate that list. Chances are, I find a field or two whose values either depend on other fields or can be generated without user input. These are the exact scenarios where the Computed Field module can be a great choice. Computed Fields lets you define an algorithm to calculate the value of a certain field, freeing the end user from having to…

February 28, 2012

Migrating Drupal 6 Multigroups to Drupal 7 Field Collections

Although the CCK3 module had never seen a full release, it was still worth upgrading Drupal 6 sites from CCK2 to CCK3, because the latter added a very compelling tool to CCK's arsenal: Multigroups. This feature allowed users to group several fields together, and enter multiple values into that set of fields as a whole by repeating the field group whenever a new value is added. For instance, let's suppose your node has an event multigroup containing date and location data. If you were to add a new value to this multigroup, a new set of date and location fields would appear, and you could enter…

August 8, 2011

Resolving Issues in the Kaltura Video Drupal Module

At Urban Insight, the Kaltura video platform is one of our favorite video hosting services because it has excellent support for mobile devices. Uploaded videos can be converted to mobile format, and when Kaltura code is embedded in a site, videos play nicely on virtually any mobile device. Unfortunately, the Kaltura Drupal module does not currently provide effortless support for the Kaltura HTML5 player feature. Enabling The Kaltura HTML5 Player with the Drupal Kaltura Module The website for the Los Angeles County Museum of Art, which I have helped to develop and support, requires support for…