Dec 11 2015
Dec 11

In Drupal an alter is intended to provide a way to modify an object during a point in the execution of a certain event or process. Alters are defined within individual modules. Those modules then give the opportunity for other modules to "alter" an object by calling drupal_alter at the appropriate time.

For example, the core field module calls drupal_alter on 'field_attach_view' inside of the field_view_field function. The core rdf module implements that alter by creating a function that is named rdf_field_attach_view_alter. The purpose of this function is to "Append term mappings on displayed taxonomy links." The function looks for a taxonomy term reference element that is being displayed as a link and then adds some RDF data to that element's attributes.

This has probably gotten a bit too technical and abstract to make complete sense. To tie the information back into what I stated the purpose of an alter is, the "object" that is being modified is a field that is going to be displayed. The modification that is happening is to provide a bit of metadata about the field so that things like search engines or aggregators can make better sense of that field.

This process was accomplished through the use of an alter function. Since the field module defined the alter function it was possible for the rdf module to add its metadata to the field without having to hack into the field module.

If you would like to learn more about Drupal you can take my "Drupal for Beginners" class for just $5.

Dec 10 2015
Dec 10

The whole point of creating a custom theme is to get a website to look the way you want it to. So, it's important for the output that modules generate to be themeable.

I will give a simple example of modifying the markup that is used to display some links. The Flag module provides a mechanism to do things such as "liking" a post or reporting a post as spam. A post may have a link for each flag that is associated with it.

The default Bartik theme displays all the flags on the same row. I have created a custom subtheme that displays the flags on separate rows with a colored background. I accomplished this by overriding the flag.tpl.php file inside of my custom theme. I copied the file from the Flag module's directory to my custom theme's directory. Then, I simply added a wrapping div element with a particular class to the original markup. Since a div is a block element, each flag appears on a separate line. Since I have attached a special class to the div element I can use CSS to target that element and place a background on it.

If you don't understand HTML, block elements and CSS the only thing for you to recognize is that I'm displaying flags differently in my custom theme than I am in the default theme and I'm doing it by overriding how the markup is specified.

As a side note, and further illustration of hooks, the Flag module uses hook_theme to tell Drupal to use the flag.tpl.php file to generate the markup for a flag. But, Drupal knows to look at the theme to see if it has overridden the file. Themers typically prefer that output is themed via the use of these types of files. However, it's also possible to use a function to theme the output. It's not important to look at a specific example, though, because the concept of overriding the function is analagous to overriding the template file.

If you would like to learn more about Drupal you can take my "Drupal for Beginners" class for just $5.

Dec 09 2015
Dec 09

In Drupal a hook is intended to provide a way for actions to be triggered during a point in the execution of a certain event or process. Hooks are defined within individual modules. Those modules then give the opportunity for other modules to "hook into" their processing by calling the hook at the appropriate time.

For example, the Link module makes use of hook_field_info to allow it to appear as an option for a type of field that can be added to a content type. If you look at the fields available to add to a content type when the Link module is disabled, you see that it does not appear in the list. When you enable the link module and then return to the field types that are available to add to a content type you will see that Link appears.

There are other hooks that the Link module must also enable to provide the functionality of that new field type. For instance, hook_field_formatter_info provides the different display types for a link. hook_field_formatter_view contains the actual logic that properly builds a link for display based on which display type was chosen.

The module that defined the hook_field_info hook is, not surprisingly, the Field module. One place that the hook is called is in _field_info_collate_types. Since I think I'm already getting a bit more technical than I really ought to be getting in this post, I won't go into more detail. Suffice it to say that this is where that list of possible fields gets defined for each content type.

Modules use module_implements, module_invoke and module_invoke_all to trigger their hook.

Well, that may have been a bit too much information! To recap, all that you should take away from this post is that prior to enabling the Link module, the Link field type did not appear in the list of available field types. After enabling the Link module it does appear. The method used to make this happen is called a Hook.

If you would like to learn more about Drupal you can take my "Drupal for Beginners" class for just $5.

Dec 08 2015
Dec 08

Collaboration is an important part of the Drupal community. The principle of collaboration applies equally to how people in the community engage with each other and to how modules are written.

I mentioned the Libraries API in a spearate post when I discussed creating a slideshow. The specific example was that you would use the Libraries API and you would also use the jQuery cycle plugin as part of creating a slideshow.

Instead of having a monolithic slideshow plugin that includes the jQuery cycle plugin, the Views Slideshow module knows how to use the Libraries API so that it can find the jQuery cycle plugin.

Approaching things in this collaborative fashion means that the jQuery cycle plugin is also available on the site for another module to use. This results in a smaller codebase on account of eliminating duplication of code across distinct monolithic plugins.

Additionally, the collaborative approach helps to eliminate the situation that I encountered when searching for slideshow on the WordPress official site. That search yielded over 500 results! Does a person really need over 500 different choices to create a slideshow? How is one supposed to choose?

Drupal's philosophy is that module developers should work together to create modules that are both small enough and extensible enough so that the situation of 500 slideshow plugins never arises.

If you would like to learn more about Drupal, you can take my "Drupal for Beginners" class for just $5.

Dec 07 2015
Dec 07

When creating a module for Drupal it is important to write the module so that it is extensible by other modules. I will talk about ways that it is possible to do this in other posts.

I mentioned a couple of examples of extensibility in the Modularity post. In my example of adding a slideshow to a Drupal site I said that you would likely use Views, Views Slideshow, custom content types and custom fields.

The Views module is written in a way that allows other modules to add new display formats. The Views Slideshow module defines the slideshow format.

The ability to add custom fields to a content type is another example of extensibility. Drupal provides the core functionality to create content types and then allows other modules to define new field types that can be added to content types.

The power behind modularity and extensibility is that it allows for the possibility to mix and match things in different ways. Once you learn how to use various modules you can combine them in different ways to add different functionality on your site.

So, for example, once you've figured out how to use Views to add a slideshow to your site, you have gained a good understanding of how you can use Views to do other things on your site. You have also learned about how to use custom content types and custom fields as a method to architect things on your site.

Another Drupal principle that works along with modularity and extensibility is collaboration.

I will cover that in another post.

If you want to learn more about Drupal you can take my "Drupal for Beginners" class for just $5.

Dec 04 2015
Dec 04

I mentioned in a previous post that Drupal is a modular framework. The idea is that modules should be designed to do one (small) thing well. This is in contrast to the monolithic approach that plugins employ in other content management systems.

For example, if you want to add a slideshow to a WordPress website you can download a single plugin from the WordPress official site. When I visited the WordPress site and searched on slideshow I got over 500 results!

If you want to create a slideshow in Drupal, you will download a number of contributed modules. At a minimum you will use Views, Views Slideshow and the Libraries API. You will also need to download the jQuery Cycle plugin and place it in the appropriate place in the directory structure (sites/all/libraries/jquery.cycle). There is a good chance that you will create a custom content type and add fields to it. This may seem like a lot of work when you are first getting started with Drupal. There are a number of advantages to using this type of modular approach, though.

One advantage of creating a small module is that it is much easier to debug a problem on the site. As long as a module is not a dependency of another module, you can disable that module to see if the problem goes away. If the problems remains, then you know the disabled module is not the culprit. If you had a single large module, disabling it would likely mean that you couldn't even test the functionality any more because disabling the module also removed all of the functionality.

Another advantage is that you can see performance gains on a production site by disabling the administrative modules. For example, the Views suite of modules breaks things up into administrative interface types of modules and key logic types of modules. As you are building a site, you will enable the administrative interfaces and when you launch the site you disable them.

Finally, doing things this way provides a lot of power and leverage. I'll talk about this more in other post.

If you want to learn more about Drupal you can take my course "Drupal for Beginners" for just $5.

Dec 03 2015
Dec 03

In order to retain the changes you make to a theme like the Bartik theme you need to create a custom subtheme. Use the Bartik theme as a base theme.

It's beyond the scope of this post to go into detail about Drupal's theme layer and how to create custom subthemes and themes. So, I won't explain everything you have to do. You can find more information on Drupal.org.

The key point to keep in mind is that a subtheme provides a way to override (or overload if you prefer) what the base theme is doing. Drupal uses this methodology of overriding / overloading in other context as well to allow you to make changes without having to hack core.

For your convenience I have created a repository of my custom subtheme.

Place my custom subtheme inside of your sites/all/themes subdirectory. If you are using Drupal 8 you can also place it directly in the themes subdirectory. Once you have placed the subtheme in the appropriate directory enable it and set it as the default theme.

My subtheme has a page.tpl.php file inside of the templates directory that appends a literal string to the Site Title. The CSS makes the font size larger. It also targets some other things based on the example I created on my demonstration site.

If you want to learn more you can take my course "Drupal for Beginners" for just $5. You can also just watch the free preview lectures if you want to see the example of my custom subtheme in action.

Dec 03 2015
Dec 03

The first thing to understand about Drupal is that it is based on a modular approach to providing functionality. I will elaborate on this further in another post.

The point I want to focus on in this post is that every module on a Drupal site is a first-class citizen. There are no "special" modules that can so something that other modules cannot do.

Three basic types of modules are:

  1. core
  2. contrib
  3. custom

Core modules are what is included with Drupal when you download the archive file from Drupal.org.

Contrib modules are those that have been contributed by members of the community and that can optionally be downloaded and used. You can find contrib modules at Download & Extend.

When you choose a particular contributed module to download one of the first things you should notice is that the namespace for that module is structured in the same way as the namespace for Drupal core. That is to say, the module will be located at https://www.drupal.org/project/[project-shortname]

Custom modules are any modules that are installed on a Drupal site that are not included on Drupal's official site.

When you need to add new functionality to a Drupal site, you may enable another core module, download and enable a contrib module or write a custom module on your own.

What you should never do is hack core or contrib.

This is the first rule of Drupal: Don't Hack Core!

Some people may think that this rule is on account of the "elite" being persnickety about other people touching their code. The reality is that the rule is in place for your own benefit.

I'll give you an example right now of why you don't want to hack core. Let's say that you wanted to tweak the way the Bartik theme appears. You decided to modify the page.tpl.php file located inside of themes/bartik/templates. Once you did it, everything looked great to you. But, wait until you update Drupal. If you use a tool like drush, then all your changes will be lost. If you update manually, you'll have to remember to re-implement your hacks.

The second rule of Drupal is: Modules and themes should be placed in the appropriate place in the directory structure.

For Drupal 7 and below, that means placing them somewhere inside of the sites directory. This was a point of confusion for many people who are new to Drupal. The modules and themes directories seemed like a logical place to put things. However, those directories hold the core code. Starting with Drupal 8, this confusion has been addressed. There is a core directory under which all core code resides. It's okay to place modules and themes inside of the modules and themes directories in Drupal 8. It's also still possible to place them somewhere within the sites directory.

So, you may be wondering how you should have customized the Bartik theme on your site. I'll explain that in another post!

If you'd like to learn more about Drupal, you can take my course "Drupal for Beginners" for just $5.

Apr 01 2014
Apr 01

The last week three of us from Cocomore went to the little town of Szeged in Hungary, around 175km south east of Budapest.

The DevDays were all about developing Drupal 8 further and enhance drupal.org. The only topic was contributing to Drupal in the one way or the other. Whatever you are, either a developer, a themer, a site builder, a devop or a business man, everyone has his/her part in this amazing community and everyone found a spot where he/she could help to foster Drupal further.

GroupPhoto

All the week there were sprints and mentors around if you needed to get started and from Thursday till Saturday there were a lot of very interesting sessions. While the Cons are heading more and more to be business orientated lately and the camps are mostly for the local communities, the DevDays are a community event, where everything centers on contributing. Core committers around the world joined this event and some received a scholarship, so that they had the opportunity to be there, too.

It was a very successful and exhausting week for all of us. We had a great time, met a lot of people and for sure had the one or other drink with them. A lot of things got done. Drupal 8 is now a big step further to becoming a beta and drupal.org will have a responsive design. Much of work for that was done in this particular week. And all of this couldn't have happened without the outstanding work of the organization team. So a very big kudos to them!

Organization Team

And now get some good impressions of all the stuff in form of some cool pictures and tweets from the last week by Gábor Hojtsy

[embedded content]

Also don't miss out of the Drupalfolk Song!

[embedded content]

Drupalfolk from Rafa Terrero on Vimeo.

Thanks to everyone who made this happen and everyone who attended the week, which made this time just so amazing!

See you all next year again at the next DrupalDevDays, where ever they will be or at any other upcoming DrupalCamps (like Frankfurt, add Spain here?) or Cons (like Amsterdam).

Jan 17 2014
Jan 17

[embedded content]

The Internationalization Tag Set 2.0 has now the status of an official W3C-recommendation. Cocomore participated in the development of this standard for encoding information that increases the quality and efficiency of translation and internationalization on the web. Within the EU sponsored LT-Web project we did not only contribute to the standard. We also created a number of reference implementations that put it into practice and demonstrate its benefits. A lot more detail on what we did in the project can be found in the official project deliverables that are now online (we were responsible for D3.1.1, D3.1.5, D5.1.1). Below are short summaries.

Drupal Modules

Within D3.1.1 of the MultilingualWeb-LT project Cocomore implemented modules for translation and ITS2.0 handling within the open-source CMS Drupal. The implementations are based on the translation management (TMGMT) module available for Drupal as a community module (https://drupal.org/project/tmgmt). The implementations provide the following functionality:
  • Base TMGMT module models translation workflow with external LSPs in Drupal
  • Cocomore’s extensions added the following abilities:
    • Handle ITS 2.0 throughout the whole workflow
    • Apply global ITS 2.0 metadata at content node level
    • Handle ITS 2.0 annotation in Drupal WYSIWYG-editors (where content is produced). Annotation via menu bar, context menu, keyboard shortcuts.
    • Standalone ITS 2.0 editor (jquery Plugin) to support annotation in a separate process step, without modifying the actual content. Annotation via menu bar, context menu, keyboard shortcuts.
    • Localization chain interface: Round-tripping of data to/from LSP‘s TMS, including automatic data export and re-import
    • Interface with Enrycher for automatic annotation
These functionalities are embodied in the following modules:
  • Drupal TMGMT Workflow (TMGMT-module extension) to allow workflows with ITS 2.0 annotation
  • Drupal WYSIWYG editor: Plugin for ITS 2.0 annotation
  • Drupal TMGMT Translator Linguaserve: Localization chain interface (see also D3.2.2 and D4.1.3)
  • JQuery plugin for ITS 2.0 annotation in a separate step (new implementation)
  • Drupal Enrycher Integration (see also D3.1.3)
The modules are released under GNU General Public License 2 and can be downloaded and modified. They are available at the following URLs:

ITS 2.0+CMS: Best Practices

One important application for ITS 2.0 is the preparation of web content within a CMS for optimized localization/translation. This is best done by implementing ITS 2.0 directly inside a CMS. The experiences gathered in this context within the MultilingualWeb-LT project are summarized in a best practice documentation published as D3.1.5. It discusses topics that occur when using ITS 2.0 in connection with a CMS, and suggests ways to deal with these topics. The document is informed by the experiences gathered in the MultilingualWeb-LT project, where an ITS 2.0 aware translation workflow was implemented within the open source CMS Drupal. Its aim however is to provide guidance independent of the CMS as far as possible. An important aspect are therefore the characteristics of the CMS that interact with ITS usage and handling. However, not all internationalization-related issues can be resolved by the special markup described in ITS 2.0. The best practices in this document therefore go beyond application of ITS markup to address a number of problems that can be avoided by correctly designing the XML format, and by applying a few additional guidelines when developing content. This document and Internationalization Tag Set (ITS) Version 2.0 implement requirements formulated in the W3C Working Draft Requirements for Internationalization Tag Set (ITS) 2.0.

Drupal Machine Translation Training Module

Within D5.1.1 of the MultilingualWeb-LT project Cocomore implemented a module to send aligned original and translated data with ITS 2.0 markup to a machine translation (MT) provider for data driven creation or optimization of machine translation engines or models. The most common use case will be to train or tune a statistical MT model based on the aligned data and give special consideration on top of the standard techniques to the knowledge that is encoded in the ITS 2.0 markup. But other use cases, like the systematic identification of problematic cases for manual adjustment of a rule based MT system are also conceivable.. While ITS aware MT training was explored in more detail in D 5.2, the scope of this deliverable is the extraction of annotated and aligned bilingual data from the Drupal CMS. This process is based on the ITS 2.0 capabilities added to Drupal as described in the deliverables for WP 3. It was successfully tested in the context of the business case described in these deliverables (translation of VDMA press releases). Based on 141 press releases that were translated from German to French and Chinese. we could provide a three-way parallel annotated corpus of some 12.000 sentences.
Dec 23 2013
Dec 23

What's that feature: the #attributes key.

Perhaps you have written your own javascript code to determine that an empty textfield does not have focus, and in such a situation place some placeholder text in the field. If you are using the FAPI there is an easier way. You can do this:

$form['my_textfield'] = array(
  '#type' => 'textfield',
  '#attributes' => array(
    'placeholder' => t('My placeholder text'),
  ),
);

Take note that this is telling Drupal to use the placeholder="My placeholder text" attribute for the textfield. The placeholder attribute is an HTML5 attribute. Keep this in mind when considering what browsers will be accessing your site and whether it's important for all visitors to see the placeholder text.

You can tell Drupal to use any (valid) HTML attributes with this technique.

This really-easy-to-use feature was one that I had forgotten about. So, I figured others may have forgotten about it as well. I hope you enjoy it!

Nov 19 2013
Nov 19

Christian Lopez (Penyaskito) representing Drupal in the EBE13 CMS round table.

Penyaskito, aka Christian Lopez, Drupal developer at CocomoreThis past weekend was a busy one for some of our developers who attended EBE13, a major Spanish conference for digital marketing, blogging, social media, and online communication, held annually in Seville, not far from our Cocomore in Spain, which drew over 1000 developers this year. Christian Lopez (aka Penyaskito on Drupal.org and Twitter), participated as an expert panelist representing Drupal in a "round table" moderated debate, lending much credibility to our favorite popular open-source CMS and Web application framework. He spoke about typical use cases for Drupal, as well as some unusual places he has seen Drupal in action, such as in a POS system in McDonalds, among other odd uses. He was joined by Isidro Baquero, representing Joomla, and Rafael Poveda, representing Wordpress. The debate was moderated by Agile trainer and coach, Jeronimo Palacios.

What they learned was that, in the end, everyone who actively contributes to open-source is a winner, regardless of the technology! The benefits of being a part of a great open-source community turned out to be the most compelling reason for using each of these projects. Of course there are other strong reasons we, at Cocomore, favor Drupal, but involvement with a greater development community is a good way to become an expert in the CMS you use. So if you work with Drupal (or Wordpress or Joomla or any other open-source CMS), finding ways to contribute will help you grow as well as improving the code base that you use.

Oct 08 2013
Oct 08

Disclaimer: This post describes how to create custom pages on your drupal site, and create custom menu items (page routes), within a module. After reading this post, you will know how to implement hook_theme() and hook_menu() to create custom urls (Paths) and very basic content templates in both Drupal 6 and Drupal 7. This tutorial assumes you know how to create and upload files to your server using FTP, and also know how to create a basic custom module to use as a foundation. If you do not know how to create a basic custom module, check out our quick tutorial on the subject.

NOTE: For practice, we will be adding comments to almost all lines of code.

1. Creating a hook

Hooks in Drupal are just ways of modifying the website page's results.
Let's create one in our new module.

There are two hooks we will be using in this exercise: hook_menu and hook_theme. These links will take you to the drupal api pages that describe each hook.

New let's edit the custom_example.module, and make its contents the following: <?php /* * Implementation of hook_menu() */ function custom_example_menu(){ }

Now here is the important part about using a hook:
Copy the hook function from Drupal's API page, and replace the word hook with your module's name.
Your module is now "hook"ed into Drupal's menu system.

2. Creating a custom menu item

Edit the module file again to make its content the following: <?php /* * Implementation of hook_menu() */ function custom_example_menu(){ // path location (http://www.url.com/foo/bar ) $items['foo/bar'] = array( // page title 'title' => 'Page Title', // describe the page for the menu system. site visitors will not see this 'description' => 'Simple custom hook_menu() implementation.', // function that is called when visiting the new path 'page callback' => 'my_page_function', // permissions required to view page 'access arguments' => array('access content'), ); return $items; }

Save before continuing (always save your work!), and now let's look at what we've done here:

  • $items['foo/bar']: This key adds a new path to drupal at http://url.com/foo/bar - replace foo/bar with the preferred URL location.
  • 'title' => 'Page Title': This required key-value pair will create the page title of the menu item. Most themes implement the page title as an H1 html tag.
  • 'description' => 'Simple custom hook_menu() implementation.': This key-value pair is a short description of the purpose of this new path.
  • 'page callback' => 'my_page_function': This key-value pair is the name of the function that Drupal will call when a user is visiting the new path.
  • 'access arguments' => array('access content'): This key-value pair determines who can see the new path and content, by providing an array of specific permissions a user must have. Here is a reference page of permissions you may find useful.

If you visit the hook_menu api page, you will see that there are many more options available, but this is all we will need for this introductory tutorial.

Next, we need to create the callback function, since we named one up above. Add the following below your hook_menu function: <?php /* * Returns custom content to Drupal */ function my_page_function(){ }

We'll leave it empty for now and come back to it after the next section.

3. Creating a custom template file

We'll now create a custom template file in the module. Add the following to your custom_example.module: <?php /* * Implement hook_theme(). */ function custom_example_theme(){ return array( 'my_custom_template' => array( // file name will be custom-page.tpl.php 'template' => 'custom-page', ), ); }

We've now hooked our module into the theme system. Let's look at what these items do:

  • 'my_custom_template' => array(): This is the name of your template implementation.
  • 'template' => 'custom-page': This key-value pair will create a call to a new template file that will look like this: 'custom-page.tpl.php'. Note: You don't have to add '.tpl.php' to the value. Also, this file is not created yet, we will do that below.
  • That's it for this part, now let's look at how to make our custom page return this new template file. Edit your module again, find your my_page_function function, and alter it to look like the following: /* * Returns custom content to Drupal */ function my_page_function(){ // Call theme() function, so that Drupal includes the custom-page.tpl.php template return theme('my_custom_template'); }

    What we're doing here is telling Drupal, "When a site visitor goes to /foo/bar, include my custom template".

    Now the last thing you need to do is actually create that template. In the same directory as your module, create a new file titled 'custom-page.tpl.php'. Type the following (or anything you'd like) into it. Hello World That's pretty much it! Save the files, flush all your Drupal caches, and visit your new path. Here is what mine looks like:

    Below is a copy of the entire module file so that you can see it in it's final form. <?php /* * Implementation of hook_menu() */ function custom_example_menu(){ // path location (http://www.url.com/foo/bar ) $items['foo/bar'] = array( // page title 'title' => 'Page Title', // describe the page for the menu system. site visitors will not see this 'description' => 'Simple custom hook_menu() implementation.', // function that is called when visiting the new path 'page callback' => 'my_page_function', // permissions required to view page 'access arguments' => array('access content'), ); return $items; } /* * Returns custom content to Drupal */ function my_page_function(){ // Call theme() function, so that Drupal includes the custom-page.tpl.php template return theme('my_custom_template'); } /* * Implementation of hook_theme(). */ function custom_example_theme(){ return array( 'my_custom_template' => array( // template file name will be custom-page.tpl.php 'template' => 'custom-page', ), ); }

    That's the basics of hook_menu and hook_theme. Don't forget to enable your custom module in module administration. Good luck!

    References:

    1. Drupal 7 hook_menu API
    2. Drupal 7 hook_theme API
    3. Drupal 6 hook_menu API
    4. Drupal 6 hook_theme API
    5. A good reference post on hook_menu on drupal.org
Jun 20 2013
Jun 20

Disclaimer: This post describes how to create a custom module and use it to create custom permissions on your drupal site. The purpose is to present a general idea of how to implement hook_permission() (or hook_perm() if using drupal 6) to create custom permissions, as well as to use and find drupal hooks. This tutorial assumes you know how to create and upload files to your server using FTP.

NOTE: Though we will not need it for the purposes of this tutorial, knowledge of the usage and implementation of the devel module may be useful as you continue your exploration of custom drupal modules.

1. Creating a module

First, let's make a new module. Follow these steps exactly.

  1. Create/Upload a new folder in you drupal's sites/all/modules/ folder named custom_example
  2. Create/Upload two new files in that folder: the first named custom_example.info, and the second named custom_example.module
  3. Take a moment to notice that the module's folder name and file names are the same.

Now edit the custom_example.info file, and make it's contents the following:

name = Custom Example description = Just a simple example module version = 0.1 core = 7.x package = Alpha Custom Modules

Save/Upload that file.
Drupal 6 note: If you're doing this in drupal 6, change the 'core' number to 6.x

Next, edit the custom_example.module file and make it's contents the follow:

<?php

Thats it! Save/Upload that file and then visit your site's module page.

On your site's module page, you should now be able to see and enable the module (it's in the "Alpha Custom Modules" section). Do so.

2. Creating a hook

Hooks in drupal are just ways of modifying the website page's results.
Let's create one in our new module.

Though there are two hooks being explored in this tutorial ( hook_permission and hook_perm ), you will only need to use one of them. If your site is a drupal 7 site, you will be using hook_permission(). If your site is a drupal 6 site, you will be using hook_perm(). These links will take you to the drupal api pages that describe each hook in detail.

2.a. Using hook_permission() in Drupal 7

In drupal 7, let's edit the custom_example.module, and make its contents the following: <?php /* * Implementation of hook_permission() */ function custom_example_permission(){ }

2.b. Using hook_perm() in Drupal 6

If you are instead using drupal 6, make your module contents the following: <?php /* * Implementation of hook_perm() */ function custom_example_perm(){ }

Now here is the important part about using a hook:
Copy the hook function from drupal's API page, and replace the word hook with your module's name.
Your module is now "hook"ed into drupal's menu system.

3. Creating the custom permission

Again, if you are using drupal 7, edit the module to the following: <?php function custom_example_permission() { return array( 'administer my module' => array( 'title' => t('Administer my module'), 'description' => t('Perform administration tasks for my module.'), ), ); }

In drupal 6, it's actually much simpler code. All you need to have in your module is the following: <?php function custom_example_perm() { return array('Administer my module'); }

Save before continuing (always save your work!), and now let's look at what we've done here (Notice 2 things: 1 - In drupal 7, the strings are wrapped in the t() function; and 2 - In drupal 6, there is no description, there is simply the permission name):

  • 'title' => t('Administer my module'): This key-value pair creates the name of the permission that is displayed on your site's permission page.
  • 'description' => t('Perform administration tasks for my module.'): This simply gives a description of what the permission does.

If you visit the hook_permission api page, you will notice there are more options available in drupal 7, but those are optional, and the two above are all that is needed for this introductory tutorial. Feel free to explore those on your site and try them out, you may find them useful.

Now you will be able to call these permissions using the user_access() function. For example, if you would like to restrict access to a part of your site with this permission, you would do something like this: <?php if (user_access('Administer my module')) { // you have access! } else { // no access. }

And that's it! This is all that is required to create new custom permissions on your drupal site.

Apr 18 2013
Apr 18

It's the year 2013 and here at Cocomore we are looking forward to the future of Drupal and the release of Drupal 8.

With the release of Drupal 8 the official support for Drupal 6 ends. At the latest from this event the use of Drupal 7 should be planned. There is still some time left, but a migration does not happen during overnight. And no one wants to run a system that is not supported any more and where no security updates are available. Even http://drupal.org will soon be migrated

On February 13th 2008 Drupal 6 was published. One year later in August 2009 Cocomore started to publish its own Drupal Core because there were several problems with the official Drupal 6 core. In all these years we started to love Drupal 6 - we had 5 really good years together.

Since Drupal 7 was published we started to use it for our new projects. Recently we neglected our Drupal 6 core because we do not have many Drupal 6 sites left. So we think now it's time to say "Bye, Bye Drupal 6". We had a good time with you, but now it's time to move forward. Drupal 8 is coming. We will stop supporting Drupal 6 and we will not publish any new updates for our Drupal 6 core.

Everybody who does not want to resign the Drupal 6 core we recommend to have a look at the repository of Markus Kalkbrenner (Bio.logis) - https://github.com/mkalkbrenner/6. This Drupal 6 Core is based on the Cocomore core and contains the same modifications. So, a change without problems is possible.

We want to thank everybody who helped to work at the Drupal 6 core and even on the huge amount of modules. You have done a very great job. Thank you all!

Apr 08 2013
Apr 08
xml3d rubick

The XML3D Module provides a simple and easy way to integrate the XML3D models and applications into Drupal. The current 7.x-1.x version allows to simply enter the XML3D code into a Long Text field that has the XML3D Input Field formatter. The content will then be displayed on the page in the form of an iframe having the same size as the XML3D application.

We added this module to the blog and added a field with a XML3D example, see it at the end of this Article in action.

Requirements

The module has the following requirements:

  • Drupal 7
  • the field, field_ui, libraries modules
  • a browser with Web GL support (currently, Firefox and Chrome)
    • if you have a Intel GPU Chip and are using Chromium/Chrome on a Linux based OS, try to enable "Override software rendering list Mac, Windows, Linux, Chrome OS" under chrome://flags
  • the js library files (xml3d.js and camera.js) must be located in the corresponding folder in the libraries directory (the current version of the module uses XML3D version 4.3):
    xml3d library files structure

Adding the Field Type

After having installed and enabled the XML3D module, you must create a field of the Long Text type by going to Structure -> Content types -> Manage Fields:

xml3d add field

Then you must assign the XML3D Input Field formatter to the field by going to Structure -> Content types -> Display Fields and select it from the Format drop-down list.':

xml3d manage display

In order to add/modify your XML3D content you just need to go to your content type that contains a field with the XML3D formatter and paste the content into the field (you can grab the code from one of the examples available: http://xml3d.github.com/xml3d-examples/):

xml3d add content

The content is supposed to have one tag containing the rest of the content.

After performing all the step correctly, you should be able to see your XML3D content visualized:

xml3d rubick

As mentioned above, the XML3D element will be presented as an iframe that will have the size of the content inside (the width and height parameters of the element will be used for this). By default, the iframe has neither borders nor scrolling. That can easily be changed via the CSS file in the module ([modules folder]/xml3d/css/xml3d.css). The iframe has a class named "xml3d_frame" that you can use for styling it.

Global Integration into Drupal

While working on the module we met some obstacles. The major obstacle was the requirement to use the MIME-type application/xhtml+xml for the pages that have XML3D content. Moreover, the page must start with:

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">

The problem is that a standard page in Drupal is not of application/xhtml+xml type and it has the following header (doctype) element:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
  "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language; ?>" version="XHTML+RDFa 1.0" dir="<?php print $language->dir; ?>"<?php print $rdf_namespaces; ?>>

The header is hard coded in the html template file (modules/system/html.tpl.php) and is not/or hardly editable from within a module (it could be overridden by a theme, though). Thus, the first attempt to set the MIME type with php and change the header in the template file manually failed (it worked in Chrome only).

The second attempt to build in an iframe and put the content using JavaScript on the fly failed as well. It worked neither in Chrome nor in Firefox. Different techniques have been used here: starting from contentDocument.open('') (or contentWindow.document) with different MIME types including 'application/xhtml+xml' and finishing with '...src="http://drupal.cocomore.com/blog/xml3d-and-drupal/data:application/xhtml+xml...."'.

At the end, an iframe referring to a separate page (generating the content for a certain field) was decided to be used. The page must receive four arguments: entity type, entity id, field name and delta. For example: http://example.com/xml3d/iframe/node/18/field_testxml3d/0

To Do

The current version of the module is aimed to present a simple integration of the XML3D technology into Drupal. Thus, the content to be inserted is not supposed to be very long.

As an alternative option to the currently implemented variant could be uploading a file (or files) with the content to be inserted or selecting from a predefined list of content residing on the same or a third-party server. It would make the integration process of large pieces of code easier for the end user.

Example:

Mar 03 2013
Mar 03
Modules of the month story banner illustration.

Well, February is always a short month, but this year it seemed like it passed in just a couple of weeks… and now it’s already March and I’m only finally getting around to putting the final touches on this posting for the January “Modules of the Month”. How did that happen? Well, I won’t try to bore you or make excuses. It’s just been one of those months. I’m going to try to keep up my current momentum and evaluate and write up my favorites from February now… hopefully finishing that in the next week or so. If it’s not done by the 15th, it won’t be done till April since I’ll be taking off for my first trip to India in the middle of this month.

But I’m not here to write about myself. This is about some modules which I found might be worthy of notice… specifically those released in January 2013. It’s interesting to see the evolution of a Drupal version and what kinds of modules are being released these days. Almost no modules are being released for Drupal 6 and Drupal 8’s developer API is still far enough from maturity that there are very few modules being released for it, so almost all the focus is on Drupal 7. Almost anything really critical has already been done, so most modules now fit into areas of workflow improvement, integration of third-party libraries, developer tools, and addressing the needs of an increasingly mobile audience (responsive design). There are a lot of new modules for image display, for keeping a closer eye on site administration issues, creating better e-shops, deploying content from one site to another, and managing caching, among other trends. It’s clear that Drupal 7 is a mature product serving the needs of an extremely diverse community and it’s exciting to see all the new ways that, each month, developers encounter new needs and find inventive ways to further extend on the feature-set. So read on to see what new and fun stuff we got in January… (and I promise to try to get February’s review done in the next week or so).

*/ Access denied backtrace

The Access denied backtrace module helps track down the point where access rights are denied.How many times have you had to try to sort out access issues on a Drupal site? Sometimes this can be a pain, but the module, by Eduardo Garcia of Anexus IT, promises to help put an end to this senseless suffering; it helps track down the exact point at which a particular role is denied access for a particular node or path. Perhaps the screenshot here is a bit contrived; the only reason the basic "authenticated user" cannot create a new node of type "Article" is that they don’t have the appropriate permission checked. In a more complex site with lots of custom content and custom user-access code, this could be very useful. (My primary work is on a team where the access model for all content types and users would require a full article to explain.)

Status: There is a stable release available for Drupal 7.

Advanced help dialog

The module, by Dan Polant of Commerce Guys, allows developers to extend the popular Advanced Help module. By implementing the provided hook, you can add a link to the "Help" region of specific paths; the link opens a modal box with the relevant "advanced help" content. Nice.

Status: There is a development release available for Drupal 7.

Anonymous Redirect

The module, from Michael Strelan of Glo Digital, redirects anonymous users to another domain, but visitors can still reach /user or /user/login to authenticate. After logging in, users have normal access. This can easily be configured to limit access to a staging server and redirect users to your production site, the most typical use case for the module.

Status: There is a development release available for Drupal 7.

Boost Custom Expire Rules

The module, authored by Zyxware Technologies, allows setting different expiry times for content cached with Boost. Complex rules can be configured to fine-tune how long various content on your site is cached. Older nodes can have a longer cache lifetime, for instance. Rules can be configured for the URL path, node type, age, etc. This definitely looks like a must-have for sites which use Boost, especially if they actively add new content on a regular basis and retain older content.

Status: There are stable releases available for both Drupal 6 and Drupal 7.

Block Up Down

The Block Up/Down module allows you to easily disable or move blocks within a region without going into block administration.The module, coded by Pol Dell'Aiera of Trasys, is dead simple. Just activate it and you get three new contextual links on blocks so you don’t need to go into the block administration page just to disable a block or move it up or down within a region. I think this is great, since probably most of the time I go into the block administration page, which can take a while to load on a complex site with a lot of blocks and regions, moving one block up or down (or disabling a block) is all I really want to do, so allowing administrators to manage this from within the front-end is a really sweet feature.

Status: There is a stable release available for Drupal 7.

CKEditor Link File

The CKEditor Link File module, created by Devin Carlson, integrates (and requires) the CKEditor Link and File entity modules so that editors on your site can easily add links to existing files on your site. This definitely looks useful for sites which use CKEditor.

Status: There is a stable release available for Drupal 7.

Combined Termref

The module, written by Girish Nair, allows you to address up to three different vocabularies with one term-reference field; obviously only one vocabulary in the group can take “free tagging”. If new terms are added, they go into the first of the vocabularies selected for the Combined Termref field. There can be good reasons that you need different vocabularies, but the purpose can stay behind the scenes; content creation can be simpler by allowing entry with a single field. I think this looks cool.

Status: There is a beta release available for Drupal 7.

Commerce Cart Message

The Drupal Commerce Cart Message module displays a message in the cart.The module, authored by Aidan Lister, provides an option to add rules for displaying messages on your Drupal Commerce cart. This definitely looks useful.

Status: There is a stable release available for Drupal 7.

Views Contextual Range Filter

The module, written by Rik de Boer of flink, provides a Views plugin that allows you to filter views based on a range of values for any field where this might make sense. For instance, you might want to filter by price range, age range, etc. This kind of search is a pretty common use case, so I suspect this will become quite popular.

Status: There is a stable release available for Drupal 7.

Creative commons field

The module, by Ben Scott, defines a field type for attaching Creative Commons licence types, so you can add CC licences to files or any entity type. There are other modules which can add a CC license, but they only work with nodes; files are likely a most common use case. Cool!

Status: There is a stable release available for Drupal 7.

Entity Extras

Categories: Utility

The module, coded by Dave Hall, provides extra utility functions to extend the Entity API module. The idea is to share useful functions here and improve on them before proposing them for inclusion in Entity API or Drupal core. If you aren’t a developer, you’ll probably only enable this if another module requires it, but if you write your own modules which use the Entity API, this is probably worth taking a look at.

Status: There is an alpha release available for Drupal 7.

Facebook Album Fetcher

The module, written by Kaushal Kishore of OSSCube, allows you to import your Facebook albums and photo galleries. You can also import the images from your friends’ accounts, too, but be sure you ask your friends if it’s okay. Personally, I only allow friends to view my Facebook account, so people like me might be annoyed if the images they shared on Facebook were pulled into a public-facing album without their consent. That said, companies with a Facebook presence might like to pull the images from their Facebook galleries into a gallery on their main website, and I’m sure there are many other good use cases for this module.

Status: There is a stable release available for Drupal 7.

Field Collection Deploy

The module, created by Robert Castelo of Code Positive, provides a way to deploy content from the Field Collection fields from one site to another. It extends (and requires) Features, Field Collection (of course), UUID, Node Export, and Entity API. Getting this to work is clearly non-trivial, but if you need this functionality, you’ll be happy to find this module.

Status: There is a beta release available for Drupal 7.

File Entity Preview

Categories: Media

The module, contributed by Graham Bates of Catch Digital, provides a widget for file fields with previews of uploaded files, as configured with File Entity. It otherwise works like the “core” File widget.

Status: There is a stable release available for Drupal 7.

Graphviz

The module, written by Clemens Tolboom, renders a Graphviz text file for further processing; it hooks into Graph API to provide Views integration and can output an image file using the Graphviz Filter.

Status: There is a development release available for Drupal 7.

Graph Phyz

Graph Phyz helps display a nice relationships graph. is another graph-related module contributed by Clemens Tolboom. It renders an interactive graph using Graph API. Pretty cool, if your site calls for this, and I can think of at least one project where this might have saved some custom coding.

Status: There is a development release available for Drupal 7.

Hide PHP Fatal Error

The module, by B-Prod of MaPS System, redirects users to a configurable error page whenever a fatal error is thrown in PHP. Of course the error is also logged into the watchdog so you can work on eliminating the error for the next user. Nice.

Status: There is a stable release available for Drupal 7.

Hierarchical taxonomy

The module, by Marcus Deglos of Techito, is a developer module (you won’t need this, as a non-coder unless another module requires it) which provides a simple hierarchical_taxonomy_get_tree() function which renders an array of a vocabulary’s hierarchical structure. This should probably be in “core”.

Status: There is a development release available for Drupal 7.

Image Zoomer

The Image Zoomer module integrates various Javascript libraries for getting a closer look at an photo.The module, contributed by Tuan, integrates two image zoom-related JQuery plugins; Power Zoomer and Featured Zoomer and the developer of this module is adding support for other modules which provide image zooming. This could be cool for online “catalog” images or for commercial photography sites who want to provide a closer look at an image without making it too simple for users to download a higher-resolution version.

Status: There is a stable release available for Drupal 7.

Image Focus Crop

The module, contributed by Nguyễn Hải Nam of Open Web Solutions, helps find the focal center of an image you are scaling and cropping and includes advanced facial recognition algorithms. This looks interesting.

Status: There is a stable release available for Drupal 7.

Image formatter link to image style

image_formatter_link_to_image_style.pngThe module, developed by Manuel García, provides an additional formatter for the core image field so that you can create, for instance, a “thumbnail” which links to a larger, watermarked version of the image. This seems like a common enough need that this kind of functionality should probably be added to core. Until then, there’s this.

Status: There is a stable release available for Drupal 7.

jQuery UI Slider Field

The Jquery Ui Slider Field module provides a simple way “slide” between a range of integer values.The module, developed by Sina Salek integrates the jQuery UI Slider plugin so you can easily allow users of your site to utilize a graphical slider to quickly enter an integer value in a field. This looks handy, especially for users accessing your site without a normal keyboard.

Status: There is an alpha release available for Drupal 7.

Juicebox HTML5 Responsive Image Galleries

The Juicebox integration module for Drupal helps you display a beautiful responsive image gallery.The module, written by Ryan Jacobs integrates the beautiful Juicebox HTML5 responsive gallery library into your Drupal site. There’s a lot to this module; probably enough to have a whole article dedicated to ways you can use it, but it definitely looks nice if you want to provide image galleries that render well on a wide range of devices. Like many other such modules that integrate third-party code, it requires Libraries and adding the Juicebox code to your sites/all/libraries directory. We should note that there are both Lite (free) and Pro (commercial) versions of Juicebox (you’ll need to decide which is more appropriate for your use case) and the maintainers of this module are not affiliated with the developers of Juicebox, itself. This module will work to integrate either version of Juicebox.

Status: There is a beta release available for Drupal 7.

Lazy Entity

The module, written by James I. Armes of AllPlayers.com, allows field values for Drupal entities to be lazy-loaded rather than loaded at the time the entity loads, so can provide a boost to performance and memory usage. This module is for developers, so will not be useful to you unless you are a coder who needs to lazy-load fields. Otherwise you would only enable this module if another module requires it.

Status: There is a development release available for Drupal 7.

Linked Data Tools

The module, by Chris Skene of PreviousNext, is a developer module to help retrieve, cache, and work with linked data sources. It depends on EasyRDF and X Autoload and Guzzle is also recommended.

Status: There is an alpha release available for Drupal 7.

Library attach

The module, written by Dave Reid of Palantir.net, adds a Library reference field type so that libraries can be attached to individual entities when rendered, thus saving your site from loading lots of unnecessary Javascript for every page. It also adds an option to the Views UI so allows adding libraries for specific Views displays. This is a great idea!

Status: There is an RC release available for Drupal 7.

Lorempixel

The module, written by Fredric Bergström of Wunderkraut, provides “dummy images” which it fetches from the very slick lorempixel.com web service. Oh, and the module can also be used to get the placeholder images added to content by Devel generate.

Status: There is a development release available for Drupal 7.

MD WordCloud

The MD Wordcloud displays a cloud of all terms in a vocabulary, sized according to frequency of their use.The module, written by Neo Khuat, creates a block with a “cloud” of terms from a taxonomy. You’ll need to download and add some Javascript files to the module’s “js” folder. So you don’t need to save and replace the Javascript files, it might be better to symlink them to a directory in sites/all/libraries.

Status: There is a stable release available for Drupal 7.

Multisite wizard

The module, written by Alex Posidelov, helps simplify the process of converting a single site Drupal installation to multisite. A lot of the work is done for you with just one click of a button and it helps lead the administrator through the rest of the requirements. It depends on the Backup and Migrate module.

Status: There is a stable release available for Drupal 7.

Notify 404

, by teknic of Appnovation Technologies, provides a means to send notification emails to a site administrator when a configurable volume or frequency of 404 (page not found) errors have occurred.

Status: There is a stable release available for Drupal 7.

Photobox

The Photobox module integrates the jQuery-powered Photo-box gallery as a display format for images.The module, developed by Andrew Berezovsky of Axel Springer Russia, adds an Image field formatter for viewing images in a Photobox image gallery. You’ll need to use the jQuery Update module since Photobox requires jQuery 1.8. This does look nice.

Status: There is a development release available for Drupal 7.

RecommenderGhost

The Recommenderghost module integrates the free external recommender service to help show users other content of interest on your site.The module, coded by hhhc, integrates the free recommender services hosted by RecommenderGhost. It makes it easy to display recommendations for “other visitors bought…”, etc. This is much simpler than installing and integrating a separate server.

Status: There is a stable release available for Drupal 7.

Reference helper

Categories: Fields

The module, created by Kevin Miller of Cal State Monterey Bay, is a helper module for displaying recent or most relevant entities under an entity reference field and was a winner of the Module Off challenge. It definitely sounds useful.

Status: There is a development release available for Drupal 7.

Regcheck

The module, produced by Tobias Haugen of Wunderkraut, adds a hidden checkbox to your site’s registration form; if checked, the registration process is aborted. “Robot” users tend to check the box, so it can be a simple way to eliminate at least some of the unwanted registrations used for spamming your site or other nefarious purposes. There are other modules which help with protecting forms like this, but a wide variety of spam prevention methods are useful for keeping a step ahead of the bot coders.

Status: There are stable releases available for both Drupal 6 and Drupal 7.

Simple hierarchical select

The module, written by Stefan Borchert of undpaul, defines a new form widget for hierarchical taxonomy fields so you can simply navigate the structure of the taxonomy and select a term.

Status: There is a stable release available for Drupal 7.

Site Disclaimer

The module, by Ilya I, can add “Terms of Use”, “Privacy policy” or other agreements to the registration form. Visitors who want to register on your site need to agree to the terms of the “disclaimer” in order to register.

Status: There is a stable stable release available for Drupal 7.

Tablesorter

The Tablesorter module integrates a jQuery plugin to allow standard tables to be sorted by any column.The module, coded by Shoaib Rehman Mirza of Xululabs, integrates the tablesorter jQuery plugin so that any standard HTML table with THEAD and TBODY tags can be turned into a sortable table without even requiring a page refresh. Of course it’s not helpful if the data is paginated, but for normal tables with all the data on one page, this could be useful. Of course you need to download the Javascript libraries and install them in your sites/all/libraries directory, and of course that means this depends on Libraries API.

Status: There is a stable release available for Drupal 7.

Taxonomy Protect

The Taxonomy Protect helps prevent users with some administration rights from deleting vocabularies.The module, contributed by Jay Beaton allows administrators to select certain taxonomy vocabularies and prevent them from being deleted. That way, even if some users who need to be able to administer taxonomies don’t fully understand the system, they won’t make the mistake of deleting a critical vocabulary.

Status: There is a stable release available for Drupal 7.

Topbar Messages

The module, created by Mark Koester of Int3c.com: International Cross-Cultural Consulting, allows you to add a message in the top of your Drupal pages. The message can be dismissed with a click on a “close” link and can include links and other formatting. There are other such modules, but this one might be the best fit for your use case. It does look useful.

Status: There is a development release available for Drupal 7.

Views Ajax Fade

The module, authored by Thomas Lattimore of Classic Graphics, is a Views plugin which allows you to add a fade in/out effect for Ajax-enabled Views displays. This would be nice for some use cases.

Status: There is a stable release available for Drupal 7.

Webform Countdown

Categories: Content

The module, by Andrew Lindsay provides a textarea component for Drupal webforms which includes a configurable, Twitter-style dynamic word or character count to limit the length of submissions. Of course it requires the Webformmodule and Libraries module (as well as the word-and-character-counter.js in sites/all/libraries.

Status: There is a beta release available for Drupal 7.

Webform Postal Code

Categories: Content

The module, is another Webform-enhancing module contributed by Andrew Lindsay. It adds strong, configurable postal code validation which can even be set to handle multiple countries simultaneously. In addition to the obvious dependency on Webform, this also requires the Postal Code Validation module.

Status: There is a beta release available for Drupal 7.

Jan 02 2013
Jan 02
Modules of the month story banner illustration.

Closing out the year 2012 with a bang, December brought us quite a number of new modules which look promising enough to cover; a few that I’m covering this time are far from ready or even only at the “concept” stage and normally would not be included, but they seemed particularly interesting or unique, and I want to see how they develop. Anyway, this month there were quite a few modules released for mobile support/responsive content. There were also several search-related modules, anti-spam modules, a couple of novelty modules, some interesting commerce-related releases, a number of Features package modules customized for various special-purpose distributions, lots of new “Third-party Integration” modules, theme enhancements, and more… I only wish I had more time so I could actually try out more of them, but there are several I do plan to get back to.

As usual, this post is sorted alphabetically and only covers modules which had their first release, or at least a new project created, in December. Selection for the Modules of the Month is a completely arbitrary process, but normally excludes common or niche items like a new payment method for Commerce that provides connections for a payment system used in, e.g. Romania. We also don’t normally include commercial service integration modules (unless the service looks really cool and is reasonably priced).

Anyway, it seems like only last week that I was putting the final touches on the November “Modules of the Month” story… oh wait, it was only last week: nine days ago, as I write this. Well I promised to try to get December’s published in early January, so I pushed some days around to make this happen. Let’s take a look at the modules, then, shall we? …

*/ Activation Code

The module, brought to us by prolific über-contributor Bryan Ollendyke of Penn State University, provides a fieldable “activation_code” entity type with a number of fields for an ID, creation timestamp, redemption timestamp, username, etc. It’s used by the Course Information System distribution as another method for authorizing access to online course materials, etc, but for those who don’t need the module on their site, it could still provide a useful example for how to build a fieldable entity.

Status: There is a development release available for Drupal 7.

Apachesolr Link

Categories: Search

The module, produced by Michael Prasuhn of Shomeya, enables indexing a Link field’s “target”, along with the entity it is attached to, in the Apache Solr search index. It might be obvious, but this module depends on Link and Apache Solr Search Integration; the Apache Solr Attachments module will also be useful if some of the links you wish to index are to PDF files or other “non-plain-text” results which you wish to index.

Status: There is a development release available for Drupal 7.

Are You A Human PlayThru Are You a Human Playthru login

The module, written by Chris Keller of Commercial Progression, provides a more simple, fun, and intuitive means for a user to prove they are human than typical CAPTCHA options. It uses game mechanics which a user interacts with rather than having users try to interpret text in graphics. CAPTCHA fields can be frustratingly and tedious, so it’s nice to see people are working on interesting alternatives. Cool! I often skip over commercial third-party integration modules, but this seems interesting enough not to pass up, and they do provide free options which might be adequate for many sites.

Status: There is a beta release available for Drupal 7.

Backstretch Formatter

The module, written by Yannick Leyendecker of LOOM GmbH, provides a field formatter for jQuery Backstretch - A simple jQuery plugin that allows you to add a dynamically-resized, slideshow-capable background image to any page or element. Once you have everything (JavaScript libraries and the module, etc) correctly installed, if you select “Backstretch” as field formatter for an image field which allows more than one image you will get a slideshow. If your slideshow needs don’t require anything too fancy, this could be the ideal module to implement it. Cool!

Status: There is a development release available for Drupal 7.

Badbot

Because we wouldn’t want one CAPTCHA alternative to be lonely… the module, developed by Yuriy Babenko of Suite101, provides another method of CAPTCHA-free spam-prevention; it is currently limited to the user registration form, but comment forms are in the works. Visitors must have JavaScript enabled in their browsers for this system to work; it displays an error if JavaScript is disabled. Since spam bots generally do not parse JS, this helps avoid the need for CAPTCHAs, which are often solved by low-paid workers these days, anyway.

Status: There is a stable release available for Drupal 7.

BetterTip

The module, produced by Shoaib Rehman Mirza of Xululabs, is a lightweight jQuery plugin for clean, HTML5-valid tooltips which can provide a richer user experience than default tooltip text.

Status: There is a stable release available for Drupal 7 (and the project page includes a pledge to provide a Drupal 6 version).

Breakpoint Panels

The module, developed by Daniel Linn of Metal Toad Media, adds a Panel style called “Breakpoint Panel”. When selected, it will display checkboxes next to all of the breakpoints specified in that module’s UI. Unchecking any of these will “hide” it from that breakpoint. If you are lost by this description of the functionality, it probably helps to understand that “breakpoints” define different display-width ranges so that you can determine layout for content on different width devices or even eliminate some content from being displayed on, e.g. devices less than 480 pixels wide. Of course it depends on the Breakpoints module, whose functionality is going into Drupal 8 “core”, and Panels, but you’ll also need to download some Javascript files and enable them with Libraries. See the project page for further details, but this could definitely help improve mobile/responsive content and the roadmap looks good, too.

Status: There is a stable release available for Drupal 7.

Christmas Lights

The module, created by Andrew Podlubnyj, is, depending on your use case, of course, probably just a novelty module, but one that might be fun to enable in the right season. It adds decorative “Christmas lights” for you and your users to enjoy.

Status: There is a stable release available for Drupal 7.

CKEditor for WYSIWYG Module

When Nathan Haug of Lullabot-fame releases a new module, it’s always GoodStuff™, so it’s no surprise that there are already hundreds of sites using the after just one month. It provides a WYSIWYG editor (surprise, surprise!) using the CKEditor library (surprise, again!). This project aims to combine some of the best of the Wysiwyg-module integration with CKEditor with the best of the standalone CKEditor-integration module, with support for the Drupal Image and Drupal Image captioning plugins, compatibility with other WYSIWYG editors integrated through the Wysiwyg module, and no inline styles inserted into HTML… among other nice features either already implemented or in the “roadmap”. It requires the Wysiwyg module and is incompatible with the normal CKEditor integration module (which must be completely removed before using this module).

Status: There is a development release available for Drupal 7.

Coins wallet

The module, authored by ssm2017 Binder, is a Bitcoin wallet system to be used with a devcoin-compatible daemon. This module is a complete rewrite for Drupal 7 of the never-released original Drupal 6 version discussed here and uses the bitcoin-php library. While I confess that I’m a bit leery of how this all works, I’m also fascinated by the idea of alternative currencies which aren’t controlled and manipulated by bankers and other “white collar criminals”, so while the optimist in me is curious to see how this works, the pessimist in me worries that between human greed and governmental attempts to rein this in, well… interesting work, in any case.

Status: There is a stable release available for Drupal 7.

Collapsible fieldset memory

The module, written by David Herminghaus, solves a nice little UX issue for Drupal. If you have ever worked on a project where you had to enter content into Drupal forms with fieldsets which needed to be uncollapsed to access required fields, or where closing fieldsets to get them out of your way is part of your workflow, you might like this module. It allows everyone, even anonymous users, to have stored defaults for any Drupal form with collapsible fieldsets, so if a fieldset on a form was uncollapsed when you last used it, it will start out that way the next time you do. Nice! Of course it requires Javascript (as do collapsible fieldsets). The developer is open to feature requests and issues, so pitch in if you use this module and help make it better. There’s a bit you should know about before implementing it on your site, so be sure to peruse the project page.

Status: There are alpha releases available for both Drupal 6 and Drupal 7.

Commerce Check

Status: There is an alpha release available for Drupal 7.

Commerce Message

The module, produced by Bojan Živanović of Commerce Guys, provides Commerce-specific Message integration, including some default message settings for common order states, such as “order paid”, “product added to cart”, “order confirmation”, etc. It looks like a pretty well-thought-out module to help provide automated or custom messages to clients at appropriate stages in their order process. It’s integrated with Commerce Backoffice and Commerce Kickstart v2, so is already in use on quite a number of sites.

Status: There is a beta release available for Drupal 7.

Commons Polls

The module, by Ezra Barnett Gildesgame of Acquia, and the primary maintainer of Drupal Commons, integrates Drupal’s “core” Poll module as a group-enabled content type in Drupal Commons 3.0.

Status: There is a development release available for Drupal 7.

Content callback If you register a content callback via hook_content_callback_info() it will be available in the Content callback field options.

—Project description excerpt

The module, developed by Jasper Knops of Nascom, allows you to return any renderable array, created in code, via a field; it also contains a sub-module which provides a searchable Views display, as well as a context condition, among other features you should check out on the project page. If it’s not clear, though, I might mention this is not a simple add-and-enable module; it provides some tools for coders and advanced site builders.

Status: There is a stable release available for Drupal 7.

Context Breakpoint

The module, developed by Christoph, helps bridge Context and Breakpoints so that you can alter a page based on the visitor’s screen resolution, browser window size, or aspect ratio. Installing it adds a context condition for “Breakpoint”. This could definitely be useful, especially if your site already uses Context. Of course it’s a bit complex, so please see the project page and the module’s README file for information about how to install, configure, and make use of this.

Status: There is an alpha release available for Drupal 7.

Context code

The is another module by Jasper Knops of Nascom. It provides “a new context condition plugin which allows you to trigger contexts from code”. It should probably go without saying that it requires the Context module and is a module developed for other developers. See the project page for implementation examples, but I think this looks very useful, at least for advanced Drupalists and coders.

Status: There is a stable release available for Drupal 7.

CP2P2: Content Profile to Profile2

The module, written by Damien McKenna of Mediacurrent, is an add-on for Profile2 to convert Content Profile content types into Profile types. Note that there is no admin user interface for this; all functionality is provided by Drush commands run in the terminal, so this module is targeted toward experienced Drupalists and coders.

Status: There is a beta release available for Drupal 7.

Create and continue

The module, written by Dominique De Cooman of Ausy/DataFlow, simply adds a button to node forms which saves the current node and opens node/add/CONTENT_TYPE to create another instance of the same node type and help streamline the content creation process.

Status: There is a stable release available for Drupal 7.

Crossdomain

Categories: Media

The module, written by Adam Moore of Stanford Graduate School of Business, simply creates a crossdomain.xml file at the root of your Drupal site and provides configuration setting for which domains should be included. This is useful for certain web services which may require different domains to have access to your site content.

Status: There is a stable release available for Drupal 7.

Currency for Drupal Commerce

The module, produced by Bart Feenstra replaces the native currency-based price display in Drupal Commerce with locale-based display, using the Currency module. Because proper display depends on locale (language and country) and not on currencies, this module helps ensure that users see prices in a format they are used to.

Status: There is a beta release available for Drupal 7.

Field Quick Required

The module, written by Jelle Sebreghts of attiks, provides a simple overview of which field are required for a given content type, without having to enter the settings for that field. You can also change the “required” setting for any field. Nice! It does this by adding an extra column to the “manage fields” overview for your content types, e.g. for /admin/structure/types/manage/article/fields, where you would normally have columns for “Label”, “Machine name”, “Field type”, “Widget”, and “Operations”, you would also have a column labeled “Required” with a checkbox that can easily be changed if you decide a certain field should (or should not) be required for a particular content type. This could be especially useful during the initial phases of designing a site’s content types and logic.

Status: There is a stable release available for Drupal 7.

"File Metadata Table" Field Formatter

Categories: Fields

The module, written by Jeremy Thorson, with support from Derek Wright, looks interesting. It’s still in development, but it provides a customizable “File Metadata Table” field formatter for file fields. All of the options are a bit much to list here, but given the profiles of these two super-contributors, I think this will be an interesting module to check back on. I’m expecting something awesome here!

Status: There is a development release available for Drupal 7.

Foresight Images

The module, developed by Graham Bates of Catch Digital, provides a field formatter which integrates the foresight.js library to display image fields. Images are requested and generated at the exact size required. As with other such third-party Javascript library integrations, this will require Libraries and you install the additional JavaScript code in sites/all/libraries. I’m not convinced that this module offers enough benefits to select it rather than one of the other more-established responsive image modules; I’m also not convinced otherwise and the Foresight Images project page includes a list of other “similar” responsive images modules and some brief notes about how the approach or features differ from those provided by Foresight Images. So this project page could be worth looking at if you need an overview to help choose the appropriate module(s) or approach for your next project.

Status: There is a stable release available for Drupal 7.

Forum notifications

The module, created by David Snopek, extends the Notifications module to add some nice UI improvements for notifications involving forums based on the “core” Forums module. If you have a site with forums and wish to have a nice user experience for “subscribing” (and “unsubscribing”) to forums or individual threads, this module could help.

Status: There is a development release available for Drupal 7 and a beta release available for Drupal 6.

htaccess

The module, coded by giorgio79, autogenerates a Drupal root htaccess file based on your settings, including such configuration settings as automatic insertion of Boost htaccess settings, whether or not to use “www”, Followsymlinks or SymlinksIfOwnersMatch, etc. You simply configure these settings at /admin/config/system/htaccess if this module is enabled and of course you could only enable this module when upgrading Drupal, to replace the default .htaccess with one based on your settings. I don’t think it should be so dangerous to try this, but you might want to make your own backup copy of your current .htaccess file, just in case anything goes wrong (in theory, this module should also make a backup copy of your existing .htaccess file).

Status: There is a stable release available for Drupal 7.

Image optimize effect

The module, yet another contributed by Peter Droogmans of Attiks, adds two new image effects to optimize image files to reduce your average page size. Most websites do not have very well optimized images and images can be substantially reduced in size, even without noticeable change in quality. This module uses pngquant to optimize png files and imgmin, which can work on various formats, but is best for JPEG files. Of course it depends on the relevant libraries (see the project description). For more information, see this recent article on the Performance Calendar blog: Giving Your Images an Extra Squeeze

Status: There is a stable release available for Drupal 7.

Image Style Pregenerate

The module, developed by Gabor Szanto, helps you to generate all the images for a new image style before enabling the style; it’s designed for bulk image generation on production sites where the performance hit of switching the image style in your field formatter without already having the new images in place, could result in issues. It relies on Views Bulk Operations (VBO) and File Entity.

Status: There is a development release available for Drupal 7.

Insert image with text

Categories: Content

The module, developed by Esben von Buchwald of Reload!, extends the Insert module to modify the image markup to include caption text below the image. I don’t know how this compares to other methods of adding an image caption, but if you are already using Insert, and you want a simple way to include image captions, this module could be useful.

Status: There are dev releases available for both Drupal 6 and Drupal 7.

Joyride

The module, written by Mark Koester of Int3c.com: International Cross-Cultural Consulting, integrates the Joyride plugin to provide a simple way to give a tour of features or information on your Drupal-based site. This looks pretty cool. Of course you need to download the Javascript and install it in your sites/all/libraries directory… and of course that means it also requires the Libraries module.

Status: There is a development release available for Drupal 7.

jQuery Tabs Field

The module, contributed by Varun Mishra, allows you to create up to seven tab fields, each with a “body” and “tab title” on any node where this field is part of the content type. On viewing the node, the module will format the output to display each as horizontal tabs, which can make for more attractive output. This is relatively simple compared to options where you could have a number of fields in each tab, but if it fills the requirements of your use case, this simplicity would be ideal. There are already quite a few sites using this and it should become much more useful when the “body” of each tab supports HTML formats (currently it only accepts plain text, but the first issue for this module has elicited a promise to get HTML support in there.)

Status: There is a stable release available for Drupal 7.

Kazoo API

The module, contributed by Bevan Rudge of Drupal.geek.nz, integrates the Kazoo REST API telecommunications platform into Drupal-based sites. This is fairly complex and the use cases for this are somewhat limited, so I’m not going to bother going into great detail, but it’s interesting to know about, nonetheless.

Status: There is a development release available for Drupal 7.

Kim Jong-filter The Kim Jong filter is used to highlight specified words or phrases within content

The module, coded by the prolific Peter Lieverdink of Creative Contingencies, provides an input filter that wraps all occurrences of names of great leaders in a <span> element with a suitable class for easy highlighting. Of course you could use it for other purposes, so this might be more than an odd novelty module.

Status: There is a development release available for Drupal 7.

Language fallback

The module, written by Peter Droogmans, a very active contributor who has done a lot for multilingual functionality in Drupal, allows you to specify a fallback language for each language on your site, so if a string is found untranslated in the preferred language, you can get the next closest language translation file. Example use cases are for regional variants of a language, so if there is no translation in “nl-be” (Belgian Dutch), it would default to a translation found in Netherlands Dutch “nl-nl” and finally default to a standard translation found in “nl”, if available. This could certainly be useful and I believe this is a backport of functionality that’s already been built into Drupal 8 “core” (if not, I suspect it will be ported to Drupal 8 as a contrib module).

Status: There is a stable release available for Drupal 7.

Layouter - WYSIWYG layout templates The Layouter module helps create templates within content to facilitate columns or other layouts.

The module, from Alexander of ADCI, LLC, provides a simple way to select a particular “layout” (e.g. columns) for content. It already integrates with the CKEditor and the developer plans support for other popular editors, but it can apparently be used without a WYSIWYG editor, too.

Status: There is a stable release available for Drupal 7.

Lazyloader filter

The module, authored by Derek Webb of CollectiveColors, provides an input filter for lazy loading images as they may appear in textareas and relies on the Lazyloader project for the actual lazy-loading of images. This module only provides a filter that renders <img> tags in a manner consistent with the needs of the Lazyloader module, while allowing you to theme the image output to your liking and preserve original image attributes. This looks useful.

Status: There is a stable release available for Drupal 7.

Leaflet MapBox

The module, contributed by Jaime Herencia of WebPartners, provides integration between another Drupal contrib module, Leaflet (which integrates the Leaflet JavaScript mapping library), and MapBox. The Leaflet module’s project page actually links to an example which uses Mapbox: The Intertwine, which documents trails in the Portland-Vancouver metropolitan region. This site really looks cool, so if mapping functionality is important for your site, this might be useful for you.
Caveat: Mapbox is not a free service, but is reasonably priced and includes some pretty cool tools and features, not to mention distributed map hosting.

Status: There is a stable release available for Drupal 7.

Link CSS

The module, created by Graham Bates of Catch Digital, allows you to add CSS files using the <link> element instead of @import. This is useful for live refresh workflows such as CodeKit which do not support files loaded with @import.

Status: There is a stable release available for Drupal 7.

Local Foodhub Local Foodhub defines the commerce functionality to support a foodhub in a community, where producers and consumers attend a regular collection day where ordered products can be collected. Foodhubs are a convenient way to provide local produce for people in the community while giving producers more regular orders.

—Project description

The module, developed by Paul Mackay, is a project description which definitely looks interesting, although there is, as of this time, no code released. Normally I don’t include modules in this column if there aren’t at least some Git code commits, but there is enough information already, and I like the idea well enough that I’m making an exception here. We need to have more local food production and distribution… and infrastructure to support this if we want to live in a future with more environmentally sustainable practices, so on behalf of my future children and grandchildren, I give thanks for people working on projects like this.

Status: Check back. Currently no project code.

Mobile Switch (Varnish version)

The module, developed by Paul Maddern of ITV, provides a simple automatic theme switch functionality for mobile devices, utilising Varnish for detecting the user-agent and providing proper cacheable pages using the same URLs per mobile device group. This helps avoid bootstrapping Drupal while still presenting the appropriate, cached content for each device type. Nice! Of course getting this all right is not simple, so be sure to peruse the project page for more complete implementation details.

Status: There is a stable release available for Drupal 7.

Moodle Connector

The module, produced by Pere Orga, aims to provide a common interface for modules that integrate Drupal with the open-source Moodle e-learning system. It does not provide any end-user features and the initial release simple adds an admin configuration page for you to enter Moodle credentials, but there are plans for some other appropriate features. If you have a site that bridges Drupal and Moodle, this could be a worthwhile module for you.

Status: There is a stable release available for Drupal 7.

Multilingual Panels

The module, created by Valeriy Sokolov, provides support for making Panels panes translatable, which could definitely be useful for multilingual sites which make use of Panels.

Status: There is a development release available for Drupal 7.

Organic Groups formatters

The module, produced by Eric Mulder of LimoenGroen, extends Organic Groups by adding additional field formatters for the “Groups Audience” field. The “Group delimited list” formatter allows you to display Group names (labels) as a delimited list. Other formatters may be added if requested in the issue queue.

Status: There is a stable release available for Drupal 7.

Panels Image Link

The module, authored by Nick Piacentine of the Mars Space Flight Facility at Arizona State University, provides a simple Panels content type to display an uploaded image and link it to a provided url/path. There are already quite a few sites using this, considering its very recent release, so I suppose this could become quite popular for sites using Panels.

Status: There is a stable release available for Drupal 7.

Pants

The module, produced by Angie Byron of Acquia, is an actual module instead of just code used in a tutorial demonstration, but the purpose is the same. The previous version of the Pants “module” (not actually released) was for Drupal 5. This project updates it to Drupal 7 code and may be used as part of Angie’s DrupalCon Sydney core conversation presentation about “Upgrading your modules”, which will cover getting Drupal 7 code ready to run in Drupal 8.

Status: There is a development release available for Drupal 7.

PDF Forms API

The module, authored by Kevin Kaland of WizOne Solutions, is an API module which you should only install if another module requires it or if you are a developer and want to use its functions, which are initially focused on PDF form functionality.

Status: There is a development release available for Drupal 7.

Pinterest Verify Website

The module, written by Peter Lieverdink of Creative Contingencies, simplifies the verication process for pinterest by adding a verification tag or page to a Drupal site.

Status: There is a development release available for Drupal 7.

Polychotomous Keys

The module, written by Ed Baker of the Natural History Museum, “allows you to build polychotomous keys using Views”. At least that is the “project description”, but currently there is not even a single code commit. While that would normally mean I’d skip the project for inclusion here, I’m interested in modules being developed for academics and there could be a lot of use cases for such a module. I’m looking forward to seeing it in action.

Status: Check back. Currently no project code available.

Prelaunch

The module, written by Dominique De Cooman of Ausy/DataFlow, allows you to set one page of a Drupal site as “prelaunch page”. An example use case might be to display a webform to collect emails to notify interested parties when your site is launched, or page with information about what’s coming. Your site can essentially be “offline” without using maintenance mode; it prevents users from accessing any part of the site besides the prelaunch page (although assigned roles can access other areas). This definitely sounds useful.

Status: There is a stable release available for Drupal 7.

Pushtape Admin

is actually a Drupal distribution for musicians, which was initially released about 18 months ago. So why am I including it here? Well, I’m not really, but there are five new Features package modules which were released in December which are all geared toward improving support for building sites with Pushtape and which might be useful even if you aren’t using the distribution. All of the following modules were contributed by Farsheed of Zirafa Works:

  • contains admin views and menus.
  • adds a simple file field to the Track content type to allow uploading mp3 files.
  • configures an event content type, view, and menu link.
  • creates a news content type, view, and menu link.
  • creates a simple photo-set to share a group of photos. Content type, views, and menu link are bundled; this also uses Colorbox.

Status: For each of these modules, there are development releases available for Drupal 7.

Radix Layouts

The module, produced by Arshad Chummun, provides responsive panels layouts set to work with Panopoly and the Radix theme (also contributed by Arshad Chummun). If you are using Panopoly, you might like Radix and if you are using Radix, you might like this module, especially if you need responsive layouts for mobile devices.

Status: There is a development release available for Drupal 7.

Restaurant

is a new distribution, also developed by Arshad Chummun, which is based on Panopoly and designed to simplify hosting websites for restaurants. Several supporting modules were also released in December:

  • provides base configuration and structure.
  • adds a blog system.
  • provides structure for creating and managing events.
  • provides structure for creating and managing menus.
  • provides structure for creating and managing slideshows.
  • adds theming helpers.

Status: There are development releases available for Drupal 7 for the Restaurant distribution and each of the listed supporting modules.

Search API Stanbol

The module, written by Stéphane Corlosquet and Wolfgang Ziegler provides Drupal integration with Apache Stanbol, a new and exciting search technology for extracting information from “unstructured” text content. Getting into the full details of how this works is well outside the scope of this column, but this definitely does look interesting. This module requires the Search API and RDF Extensions modules.

Status: There is an alpha release available for Drupal 7.

Single Image Formatter

Categories: Fields

The module, created by Federico Jaramillo of SeeD, exposes a formatter that displays one image from a multi-value image field. It allows the same options as the original image formatter, but adds an option to choose which image to display. For some use cases, the Field multiple limit may be more suitable, but the Single Image Formatter might be more efficient for situations where there are many values in a multi-value image field.

Status: There is a stable release available for Drupal 7.

Sky field

The module, created by Leonid Mamaev and Alexander of ADCI, LLC, is sort of a new, improved version of the Node field module released a few months back by the same developers. It allows you to add unique custom fields to any single Drupal entity (node, user, comment, etc). You can add text fields, long text fields, links, radios, select, checkbox, taxonomy terms, among others and includes an API to add support for additional field types. This could be very useful for sites where an occasional instance might benefit from an extra field that isn’t normally used for that content type.

Status: There is a beta release available for Drupal 7.

Twitter Web Intents

Categories: Views

The module, developed by Francisco José Cruz Romanos of Hiberus, integrates Twitter’s Web Intents system to add extra Twitter links for replying, retweeting, adding to favorites, following, etc, into a view of Twitter messages. This allows users to interact with Twitter content from within the context of your site, without needing to leave the page or authorize an app just for this interaction.

Status: There is a stable release available for Drupal 7.

Twysi

The module, created by Tony Star of Acronis, is “an amazing Twitter Bootstrap WYSIWYG HTML5 editor”, at least that’s what the project description says. But it might be a bit early to tell about the module, itself. Currently, if I install the wysihtml5 library, I can select it as the editor for a given text format, but no buttons are present and no editor shows up on a text area. That said, this does sound like a project worth checking back on.

Status: There is a development release available for Drupal 7.

URL token URL token is an API module that provides token-based authentication for other modules, where the token can be used in URLs without requiring a Drupal user. Tokens can also be limited to a set number of uses or a fixed period of time.

—from the project’s README.txt

The module, by Marcus Deglos of Techito, is “an API module to make token-based access control simple”. Normal users should only install this module if another module requires it. Developers might want to take a look at the project page for some decent code examples of how to request a token and check that a token is valid. Note: in case this is not obvious, this module has nothing to do with the Token module. “Token”, in this context, is simply an access key.

Status: There is a development release available for Drupal 7.

Views OG cache

The module, from long-time contributor Amitai Burstein of Gizra, adds a Views time-based cache, configurable per group; uses OG-context to identify a group’s view to cache; includes OG-access integration: if the group is private, caching is done per-user instead of per-group… among other listed features. This definitely looks like it could be useful for sites using both Organic Groups and Views.

Status: There is a development release available for Drupal 7.

Welcome

The Welcome module displays a custom message when users log in.The module, from Blair Wadman displays a simple, configurable welcome message when a user logs in. Simply enable it at admin/config/people/welcome, and yes Token support is included. The example message displayed at left uses Tokens for both the site-name and username. (Of course the “Swachula” username is courtesy of “Devel generate” and “d7test” is my local Drupal 7 testing environment.)

Status: There is a development release available for Drupal 7.

Yet Another Yellow Box This is mostly being used to announce weather-related school closings on sites where I've been using it.

—from the project description

The module, authored by Micah Webner of Access-Interactive, provides a simple way to add a prominent “announcement” block of filtered text to any pre-configured region. The contents and visibility of the announcement block can then be managed by users who may not otherwise have permission to manage blocks. If you have a site where staff may need to make emergency announcements, this could be a useful module to set up. See the project page for further information about how to get everything working.

Status: There is a development release available for Drupal 7 and a stable release available for Drupal 6.

Zoundation Support

The module, written by Jeff Graham of FunnyMonkey, is designed to work with the responsive HTML5-based zoundation theme and its sub-themes. It provides custom menu builder functions and blocks for menus, a foundation navbar and topbar, a custom field formatter for orbit slideshow integration, improved placeholder integration for elements, and “other minor UI improvements” that work better in this module than in the zoundation theme, itself.

Status: There is a development release available for Drupal 7.

Dec 23 2012
Dec 23
Modules of the month story banner illustration.

November 2012 was a busy month for a lot of people involved in Drupal contribution. It was the final weeks before the “feature freeze” for Drupal 8, so a lot of the focus was on new features for the next great release of Drupal. Many of the “new projects” were simply “namespace reservations” for new core modules or planned contrib modules which relate to Drupal 8; most of which had no project code committed at all (for some, presumably, it’s all in the main Drupal 8 repository). But there were also a number of new feature-enhancing modules released for Drupal 7 (and a few for Drupal 6), several which improve search functionality, a few for delivering mobile-friendly content from a Drupal site, some for commerce, others designed to help manage Drupal sites and ensure that nothing slips through the cracks when moving from “development” to “production”, among other new gems.

It’s fun, too, that we got a couple new “novelty” modules in November: one, Driesday, puts a “Happy Driesday!” message on your site every November 19th; another is a bit more insidious, with a fully-disclosed dependency on Bad judgement: Feature creep allows you to nostalgically hang onto the “good old days” when Features had a few more quirks. So if you want to remember that fun, just turn this module on and, as the module description says, “every time that you export or update a feature the Feature creep module will randomly add an extra component to your feature, what fun!”

Before we get into the module descriptions, of course, I should acknowledge the very late arrival of this month’s release of this column. It’s been one of those months… again. But let me try to hold onto my optimism that I’ll be seeing you with December’s write-up in just a couple weeks. I’ll be aiming for the first week of January. Now let’s have a look at the “new” modules.

*/ Apache Solr Term Proximity

The module, coded by the prolific Chris Pliakas of Acquia fame, should be of interest for sites using Apache Solr. It boosts the relevancy of documents in which the search terms appear closer together. In other words, if I’m searching for “data migration”, a document which has these two words together should rank higher than another document where they are separated by a few words, which should rank higher than one where these words appear in different paragraphs. Nice!

Status: There is an RC release available for Drupal 7.

bigint

Categories: Fields

It’s always nice when developers share modules which help to get around some of the native limits in Drupal. One such limit is the lack of a proper “BigInt” integer type, which might not be needed for most sites, but is certainly a limitation that developers have to work around for some use cases. The module, by Ryan Coulombe of NewMedia!, provides a true BigInt field, thus saving site builders from having to find creative ways to handle text or decimal values that they really want to be an integer. Cool!

Status: There is a stable release available for Drupal 7.

Block Group

Categories: Utility

An example “block group” to display the “user blocks”The module, by znerol, provides a taste of Drupal 8-like layouts by extending the Drupal block system with “block groups” which can be placed like a normal block, are nestable, and can have regions within them. A simple use case might be that you want all of your user-related blocks to be kept together in one “user blocks” block group, which you can then put into whatever theme region you wish, without having to always fix their order when adding them to a different theme or reorder them if you change the region. Very handy!

Status: There is an alpha release available for Drupal 7.

Book Touch

The module, which requires the Thumbnav module, is another innovation from Bryan Ollendyke of Penn State University, who has been contributing loads of great modules in recent months. It provides gestures and touch events for mobile navigation of an online book to help replicate the experience of a touch-sensitive e-book reader. Most awesome!

Status: There is a beta release available for Drupal 7.

Bounce reasons

The module, produced by Alexander of ADCI, LLC, may or may not be a good idea. It pops up a Webform in an overlay, when your site visitors attempt to close a window, where you can ask why they are leaving. Personally, I think I would just find this annoying and might likely avoid following future links to the site, but that’s just my initial reaction; maybe I’m not the typical web user and it’s possible that in some cultures people wouldn’t mind a site preventing a window from being closed to ask them why. That said, maybe it would be better to provide an “opt-in” for such an “exit poll” feature, i.e. ask visitors when they arrive to your site if they wouldn’t mind being asked about their experience when they leave. But perhaps you have a client who has asked you to build exactly this functionality? If so, rather than argue with them about why this might not be a good idea, you now know “there is a module for that”. And maybe using this for a while would help them improve their site. The project description page doesn’t specifically mention it, but it would seem to depend on Webform… and possibly also Bad judgement. Hmmm…

Status: There are stable releases available for both Drupal 6 and Drupal 7.

ckeditor_syntaxhighlighter

The module, by Jason Xie of VicTheme, integrates syntaxhighlighter into the CKEditor module by loading another yet another JavaScript project, ckeditor-syntaxhighlight. It depends on the CKEditor and SyntaxHighlighter modules, as well as the JavaScript libraries they require, installed in sites/all/libraries per installation directions (and the Libraries module, of course).

Status: There is a stable release available for Drupal 7.

Commerce Backoffice

The module, by Bojan Živanović of Commerce Guys, provides administration enhancements for Drupal Commerce and is already in use on over 2,000 sites less than a month after its release (perhaps largely since it’s a component of the latest release of the Commerce Kickstart distribution). It includes three sub-modules, each of which have a number of dependencies and the project page does a good job of explaining everything, so I won’t say more than this: if you are using Commerce and aren’t using the Kickstart distribution, you will probably benefit from adding and configuring this module.

Status: There is a stable release available for Drupal 7.

Commerce Price Extra

The module, from Marc ElBichon, adds extra features based on the price component in Drupal Commerce, including allowing ordering of price components in the cart pane, printing discounts on their own line, and other nifty features.

Status: There is a stable release available for Drupal 7.

Commerce Rules Extra

The module, also developed by Marc ElBichon, is a library of Rules events, conditions, and actions to support Drupal Commerce site building.

My wish is to merge all modules based on Rules and Drupal Commerce in a single one. It forks the apparently-unmaintained Commerce Extra Rules Conditions module. See the project page for more information about what this module already supports or to suggest additional features.

Status: There is an alpha release available for Drupal 7.

Commerce Search API

Categories: Search

The another module, contributed by Bojan Živanović of Commerce Guys, provides Commerce-specific Search API integration and fulfills a feature request that dates back to the early days of Commerce. It was covered on Commerce Module Tuesday and is part of the latest Commerce Kickstart, so is already used by many sites. If you don’t use Kickstart, and want improved search functions for your Commerce-based site, this is a good module to consider.

Status: There is an RC release available for Drupal 7.

Context Block Visibility

The module, coded by Peter Berryman, provides context for block visibility using the normal block admin page. This could be handy for certain use cases.

Status: There is an alpha release available for Drupal 7.

Dictionary Export

The module, coded by Ed Baker of the Natural History Museum, provides support for Microsoft Office-compatible dictionaries in (*.dic) format for any vocabulary on your site.

Status: There is a stable release available for Drupal 7.

Download Userpoints

The module, by Eugen, provides a way for you to allow access to private files via user points. This looks useful for communities which provide points for contribution and require points for downloads of community-contributed files (as one example use-case). It requires the Userpoints module.

Status: There is a beta release available for Drupal 7.

Drifter

The module, produced by Peter Anderson of PackWeb, allows fields to be floated to the left or right of content. While this kind of layout is normally provided by theme CSS, it can be useful for it to be theme-independent.

Status: There is a stable release available for Drupal 7.

EasyRdf

The module, from Chris Skene of PreviousNext, provides Libraries API compatibility for EasyRdf, which, in turn requires Libraries . It should only be installed if other modules require, but definitely looks useful.

Status: There is an alpha release available for Drupal 7.

Entity reference multiple display

The module, written by Jean Valverde of Linagora, provides a new field formatter for Entity Reference that let you configure different view modes for each referenced entity, for instance if you want the first elements to be displayed in full and subsequent elements to be displayed as teasers, this module could be your friend.

Status: There is a stable release available for Drupal 7.

Entity Reference Views Formatter

Categories: Fields

The module, authored by Maxim Podorov, provides a Views-based entity reference field formatter which allows you to use any view to show entity reference field value(s). It’s based on the Entity Reference View Field Formatter (sandbox) project from Katherine Bailey.

Status: There is a development release available for Drupal 7.

Facebook Autopost

The module, written by Mateu Aguiló Bosch of Human Bits, provides simple configuration to allow your site to automatically post to designated Facebook Pages. It includes a good developer API, integrates with Rules and the Entity API and includes Libraries integration for the Facebook Developer PHP SDK. It includes a Facebook app, which you authorize to make posts on the designated accounts’ behalf. There is a detailed video tutorial on the setup process linked on the project page.

Status: There is an alpha release available for Drupal 7.

Field Formatter CSS Class

The module, by Christian Zuckschwerdt, is perhaps a bit similar to the aforementioned Drifter module; it adds a CSS selector for fields so that you can select to, for example, use a class which floats an element left or right on a per-node basis. Of course you need to set up your theme for the classes and configure your fields, so it’s not a simple “add-and-activate” module, but it should give content authors a bit more control of display for individual nodes. The author invites the community to request additional features, so I think this will definitely be useful for a lot of sites (and there are already quite a few using it). Nice!

Status: There is a stable release available for Drupal 7.

Final Polish

Categories: Utility

The module, by Yannick Leyendecker of LOOM GmbH, helps take care of some of the last steps that are often forgotten when launching a Drupal site. It allows you to disable access to paths like /node, /rss.xml, etc; it uploads a “touch icon” to be used by mobile devices; it verifies the existence of /favicon.ico, /apple-touch-icon.png, etc, so that you don’t get a plethora of 404 errors in the logs, and the author invites input for additional features, but already has a nice development road-map to include checking recipients for Webform emails, checking the site email address, redirecting to the front page on errors (access denied / not found), etc. This can definitely streamline the last steps of getting our sites ready for use, so I’ll definitely be giving this a try.

Status: There is a development release available for Drupal 7.

Gumroad

The module, from Eric Peterson of Tableau Software, helps use Gumroad to sell products on a Drupal website. I normally skip over modules which integrate commercial services, but what Gumroad offers and what they charge for their services seems like a good deal. So if you want to, for instance, sell your self-produced music and don’t want to spend a lot of time (and/or money) building up e-commerce infrastructure, handling payments, and all that, this can be a simple way to collect a reasonable percentage of the incoming revenue, and start making sales, without a ton of work. Of course, if you have more involved needs for e-commerce functionality, you’ll probably want to use Drupal Commerce, but I think this module should be attractive for a lot of creatives who simply want to focus on the “fun stuff” and just sell a few things from their sites.

Status: There is a development release available for Drupal 7.

Hackpad

The module, contributed by Andrew Berry of Lullabot, integrates Hackpad into a Drupal site. Hackpad is a hosted service, based on Etherpad (but with a lot more cool, more modern features), which allows collaborative editing of documents; it’s very cool, fun, and can be used for a lot of purposes for teams, so I think the interest in Hackpad will definitely grow, as will the features supported by this module which is still new enough that the API for it has not yet been documented, but with Lullabot behind its development, you know it will be awesome!

Status: There is a development release available for Drupal 7.

Image Combination Effects (ICE)

The illustration image from the ICE project page with three pictures placed on an easel.The module, by Guy A. Paddock of Red Bottle Design, is too complex to succinctly summarize, but if you are building an image-centric site (e.g. a site to display your photography), this looks very useful for combining image effects or displaying multiple images at the same time (as one image), i.e., like “spriting” icons, but with larger images. It was designed to reduce the number of requests necessary for loading a slideshow, where they still wanted the client to be able to add new images or adjust the display order, but it looks like there could be a lot of potential use cases. It looks like this offers some pretty cool features that you might want to consider if image display is an important part of your planned site. I’ll certainly be playing with this.

Status: There is an alpha release available for Drupal 7.

jQuery Placeholder

An example of HTML5 placeholder text in a formThe module, written by James Silver of ComputerMinds, integrates the HTML5 Placeholder jQuery Plugin to provide backward compatibility, using a Javascript-only method, for older browsers which don’t support the HTML5 placeholder attribute. For those not so up on HTML5 attributes, the “placeholder” attribute provides the “placeholder text” you see in a form field before you click on it to, e.g. enter your name, but until HTML5-support improves, we need some fallbacks, so this looks like a useful module.) It requires jQuery 1.6+ and the Elements module.

Status: There is a beta release available for Drupal 7.

Legal Extras

Categories: Content

The module, contributed by Rafal W., adds additional features to the Legal module, including the option to allow a registered user to access your site with reduced permissions if they reject the “terms of use”, display the date each user accepted the terms of use, and a number of related features to help manage those annoying legal issues that might be a headache for you, too. I hope I won’t have to use this anytime soon, but it’s nice to know this module exists.

Status: There is a development release available for Drupal 6, but I suspect a Drupal 7 port will be in the works.

Mass Password Reset

The module, written by Mark Shropshire of Classic Graphics, allows a Drupal site administrator to reset the password on all user accounts (except user/1) and then notify all users. It’s good to know this module is available if there’s ever an emergency situation where we might need it.

Status: There is a stable release available for Drupal 7.

Meta tags: Panels

The module, contributed by Diogo Correia of DRI, extends the Meta tags module with support for Panels pages. It also has Features integration, so that if you export a panels page, the meta-tag configuration is exported with it. Cool!

Status: There is a beta release available for Drupal 7.

Mobile Switch Blocks

The module, written by Siegfried Neumann, extends Mobile Switch, a module contributed by the same author, to provide block visibility control for mobile devices. This sounds useful.

Status: There is an alpha release available for Drupal 7.

OG homepage

The module, produced by enzipher, allows you to configure an Organic group’s front-page as the default “home” for logged in members of the group; it also includes options to determine how a user is redirected if they belong to more than one group, among other nifty features. This could be useful for a lot of Organic Groups -based sites.

Status: There is a stable release available for Drupal 7.

Performance and Scalability Checklist

The module, contributed by Travis Carden, is similar to the popular SEO Checklist module, which he also helps maintain. It provides an interactive, step-by-step checklist to help manage the common tasks involved in launching or administering a Drupal site; in this case where it comes to optimizing your site’s software stack, from Apache to your Drupal theme.

The Performance and Scalability Checklist module interface for Drupal 7.

This module is still new and the topic it attempts to cover is so broad, that the module is sure to change and improve in time, but it already looks pretty darn useful. The author is actively seeking suggestions in the Performance and Scalability Checklist issue queue, so please give it a try, then add your 2¢ to help improve this module. Enabling this module requires the ChecklistAPI module.

Status: There is a beta release available for Drupal 7.

Performance data

The module, by Nathaniel Catchpole of Tag1 Consulting, is envisioned to be a UI for viewing and analyzing performance data that you’ve recorded and saved using other tools. When a key core maintainer starts a new project, there’s usually reason to take notice and expect there might be great things coming. That said, according to the project page, this is still in the early stages of development, so unless you have an interest in assisting the development process, you might want to wait a while to try it out.

Status: There is an alpha release available for Drupal 7.

Print Anything

The module, coded by Chris Desautels of R2integrated, helps you configure special rules for generating print-friendly output for any path. There is some work to getting it all working, but it has some nice features and helps you handle a lot of content that isn’t otherwise simple to print, as well as helps maintain your brand visibility by including your logo in the output, among other features.

Status: There is a stable release available for Drupal 7.

Quo.js

The module, created by Bryan Ollendyke of Penn State University, integrates the Quo.js mobile event library into Drupal. As with other such modules, you’ll still need to download and install the JavaScript code, separately. It provides a number of features, including environment detection, and event detection, such as reading “tap”, “hold”, “pinch”, “rotate” and other such mobile gesture events. It integrates well with, and enhances, the other modules recently released by the same prolific contributor, including the aforementioned Book Touch and Thumbnav modules, so it certainly looks useful and I expect it will grow in use as more sites start providing mobile-specific features.

Status: There is a beta release available for Drupal 7.

Search API Page Block

Categories: Search

The module, produced by Tobby Hagler of Phase2 Technology, uses the Search API Page module to perform a search using the currently viewed node’s title as keywords, displaying the results in a block, so you can direct users to related content.

Status: There is a beta release available for Drupal 7.

Simple Anti-Spam

Simple Anti-Spam user interface for Drupal 7.The module, by xandeadx, adds two new elements to designated forms: one checkbox, labeled “I’m not a spammer” and a hidden checkbox, “I’m a spammer”. If user does not check the first or (is a bot which) has checked the second checkbox, the form is not submitted and displays a warning message.

Status: There is a development release available for Drupal 7.

Simple Table of Contents

Categories: Content

The module, coded by Devin Carlson of Ontario’s Ministry of Northern Development and Mines, automatically adds a table of contents to all of your node content, as long as the content is within the node’s “body” field. It’s a simple add-and-enable module which presumably depends on normally-structured content (with headings, etc.)

Status: There is a stable release available for Drupal 7.

Speedboxes - Fast checkbox handling

The module, produced by Manuel Pistner of Bright Solutions GmbH, provides a Javascript-based method to easily check, uncheck, or invert the current setting of a selected range of checkboxes in a grid, e.g. the Drupal permissions page; simply click and drag over a selection of checkboxes and a toolbar appears which allows you to modify the state of all the selected checkboxes. Too cool!

As an alternative to the module, the Bright Solutions blog also includes post about how to use speedboxes as a browser plugin so you can benefit from this feature on any page you visit with your browser.

Status: There is a stable release available for Drupal 7.

Thumbnav

The module, yet another module produced by Bryan Ollendyke of Penn State University, provides a mobile-friendly framework for using a website on touch-driven devices, with support for a variety of navigation methods and an API for developers. It includes support for Quo.js, but doesn’t rely on Quo. See the project page for links to some nice demonstrations, but if you are looking for ways to improve your site’s mobile support, this could definitely be worth checking out.

Status: There is an alpha release available for Drupal 7.

Unit Conversion Formatters

The module, developed by Tony Rasmussen of Metal Toad Media, provides formatters for number fields to convert values between any unit supported by the Units API module. This could certainly be useful for some sites.

Status: There is a stable release available for Drupal 7.

Views Drupal 7 to Drupal 8 upgrade

Categories: Views

BACK UP YOUR DATABASE BEFORE ATTEMPTING TO USE THIS MODULE FOR AN UPGRADE. Really. We're not kidding.

—from the module’s project page description

The module, written by Jess of University of Wisconsin-Madison, a major force behind getting “Views in core” in Drupal 8, helps migrate Drupal 7 Views data to Drupal 8. It’s nice to see work on this is this far along.

Status: There is a development release available for Drupal 7 (really a Git repository you can check out).

Wunderstatus connector

The module, from Henri Hirvonen of Wunderkraut, sends information about installed modules as a JSON to a central service. This could be useful for monitoring a group of sites your company maintains, so I look forward to giving this a whirl and seeing how it develops.

Status: There are alpha releases available for both Drupal 6 and Drupal 7.

XSL Formatter

The module, developed by Dan Morrison of Sparks Interactive, provides a field formatter to process XML content through a defined XSL stylesheet for rendering. If that sounds useful, it’s probably best you just look at the well-written project page, because there is quite a lot of information there, which runs well outside the scope of this column.

Status: There are dev releases available for both Drupal 6 and Drupal 7.

Nov 23 2012
Nov 23
Modules of the month story banner illustration.

October 2012 brought us a nice batch of interesting new modules. Of course I wanted to tell you all about them weeks ago, but without going into excuses and details, I’m afraid getting this published didn’t go as planned. I’d like to get back on schedule to release the next installation of this series in early December, though. Anyway, it’s great to see all of the innovations that have been introduced in the past month. You can tell that Drupal 7 has truly reached maturity by the kind of modules that are being released now. Many, if not most, of the new modules integrate with and extend the functionality of other contributed modules—for example, there are three new modules which provide plugins for the Facet API—or integrate exciting new jQuery plugins to bring a bit of sizzle to your site.

As usual, the list is in alphabetical order and I haven’t tried all of these modules (although I have experimented with quite a few of them and even eliminated a few from consideration since they seemed a bit too “broken” at this point.) Some of these modules might not be ready for use yet, but just show good promise and look worth keeping an eye on. Creating this monthly list is as much for me as it is for you, but I do hope that the modules I select work well for you, if you give them a try, and I look forward to seeing your comments about any of these modules.

*/ Adminimal Administration Menu It adds a nice and simple minimalist look and provides some tweaks to improve your Drupal administration experience. The menu hierarchy is now simpler and easier to understand […] The shortcuts fit nicely and have a small icon that separates them from the normal admin menu links.

(Adminimal Administration Menu project description)

The module, by Andonis Ratsos, changes the style of the popular module’s menu bar.

The adminimal_admin_menu look and feel

Whether or not you like the way it restyles the Admin menu is likely a matter of personal taste, but I do observe that even with only the default shortcuts in the menu (no custom shortcuts added) the larger font of the menu makes it take up a lot space at the top of the window and it starts to wrap to a second line if the window is narrower than about 1,100 pixels, so it’s possible that people administering Drupal sites from smaller devices (netbooks or tablets, not to mention smartphones) might find this modification less appealing. On the other hand, the larger links should make easier targets for a finger-tip… six of one, half a dozen of another.

adminimal_menu shortcuts

Personally, I like the theme change and I like the Adminimal Adminimal Theme admin theme, too, so for my personal testing sites, I’ll go ahead and leave these active. I’m hoping to see some simple customization available in the future… I think I would want to see that before recommending it for client sites.

Status: There is a development release available for Drupal 7.

Autocache

The module, by Teemu Merikoski of Wunderkraut simplifies caching of Views and Panels and has some support for appropriate clearing of Varnish caches, too. It’s still new and the roadmap is perhaps a bit longer than the current features list, but I’m sure that this will be worth keeping an eye on.

Status: There is a development release available for Drupal 7.

Bootstrap optimizer

The module, by Maslouski Yauheni, has only been released for a couple of weeks and there are already over 150 sites using it, so it must be worth a try! On the other hand, if you don’t “improperly delete” modules, perhaps it’s not so useful for you. It appears that its primary functionality is to remove modules from the system table which no longer exist in the modules directory, so if all your sites are well-maintained, this might not do much for you. It looks like Drupal 8 should hopefully resolve this issue. But until this is really fixed in core, there is a place for modules like this, especially for older projects that might not be very actively maintained and might have had some modules deleted over the time. For such sites, this module claims to provide a several-fold increase in the bootstrap time, and provides screenshots as evidence.

Status: There is a beta release available for Drupal 7.

Bulk User Delete

The module, produced by Mark Theunissen of Four Kitchens, provides with a text area where you can enter a list of email addresses for users you wish to “bulk delete”. Normally, it’s probably easier to simply check the boxes next to the names of a group of users you wish to delete and select the action “Cancel the selected user accounts”. But I can imagine scenarios, especially scripted ones, where using this module might be a simpler solution, e.g. when creating a number of test users en masse, users with various combinations of roles and/or other custom relationships, and then removing them after the tests have been run. This could be useful if you want to run such tests on a busy production site without needing to take special care that you select only the right users for deletion or when you have so many test users that they wouldn’t all be visible on one page of users.

Status: There is a stable release available for Drupal 7.

Cache Lifetime Options

The module, from giorgio79, provides additional cache-time options which can be selected on admin/config/development/performance, with cache lifetimes up to a year. This is especially useful for sites with a lot of static content. Boost is a recommended companion.

Status: There is a stable release available for Drupal 7.

ceaZine

The module, written by Carlos Espino Angulo, allows you to display PDFs in a Colorbox overlay with “page flip” effects and everything. If you want a nice effect for showing off your books, this is a great module. Setting it up is a bit involved, though, so be sure to check the project page for full details. It requires a few of jQuery libraries, and (of course) a recent version of the Libraries module, Views (for an included display of all your online magazines, if you wish to use it), and PDF to ImageField which, in turn, requires ImageMagick, but it uses only CSS, JS, and HTML—no Flash. Nice!

Status: There is a stable release available for Drupal 7.

CkEditor Plugin: Google Doc embedded iframe

The module, authored by Sergio García Fernández, is an extension for the popular CKEditor module, which provides a simple editor button for easily embedding Google Docs iframes in your content.

Status: There is a stable release available for Drupal 7.

Cloze

The module, written by Sivaji Ganesh of KnackForge, provides Cloze question type for the Quiz module. Cloze questions are the type of question where blanks are inserted in the middle of questions, a question type commonly used in language assessments.

Status: There is an alpha release available for Drupal 6.

CodeMirror editor

The module, developed by Darren Mothersele, adds syntax highlighting directly to your Wysiwyg editor experience, using the Codemirror Javascript library, among other nice features. If you have a site where writing and displaying code is important, this could well be useful. It doesn’t even require WYSIWYG (although there are, perhaps, more fully developed alternatives if you simply want syntax highlighting for code entered in a basic text area), much less any particular editor. It’s still under active development, but the plans look interesting, so this is definitely worth keeping in mind for projects which involve presenting code.

Status: There is a development release available for Drupal 7.

Collapsible comment threads

The module, developed by Manuel Garcia, uses jQuery to collapse and expand comment threads, thus helping remove the “visual noise” of deeply threaded comment conversations. This could be especially useful for sites with a forum or very active discussion in blog comments.

Status: There is a beta release available for Drupal 7.

Content Access Admin

The module, by Peter Lieverdink of Creative Contingencies, lists all node grants in a simple table. This is especially handy since special access grants, provided by the Content Access module, are otherwise only visible on the individual nodes.

Content Access Admin displays a table with some filters to see just what you want to, with links on each node title to help you jump right to each node and manage the access.

Status: There is a development release available for Drupal 7.

Date Facets

The module, contributed by Chris Pliakas of Acquia, provides date range facets similar to major search engines so that you can look for search results within a defined date range. Too cool! It integrates with the range of search modules available for Drupal, including Apache Solr, among others. Of course it’s search technology, so implementing it is not as simple as activating the module.

Status: There is a beta release available for Drupal 7.

Dates

The module, created by Chris Charlton of XTND.US, is not actually part of the Date module, but provides a range of additional advanced date formats. This could be especially handy, but beware that disabling or uninstalling this module does not remove the packaged date types and formats which are stored in the Drupal database when the module is enabled.

Status: There is an alpha release available for Drupal 7.

Devel Input Filter

The module, contributed by Garrett Albright of PINGV, aids development of input filters; it provides a page where you can enter test input to see filtered input, without caching. It’s really only for developers who are debugging text filters.

Status: There is a development release available for Drupal 7.

Email Log

The module, authored by Mikael Kundert of Wunderkraut, allows site maintainers to get email notification when there are critical log entries. Log entry tokens would need to be supported for this to be done by Rules, but even so, it greatly simplifies staying on top of important site updates. The user interface and options are almost exactly the same as the Watchdog Digest module’s, except that this module will send you an alert whenever there is a watchdog entry of a given severity level, so you might wish to send only the most critical alerts with this module and use Watchdog Digest to send an email which includes all the other log entries in one email.

Status: There is an RC release available for Drupal 7.

Entity Translation Tabs

The module, contributed by Ryan Weal of Kafei Interactive, gives site editors an edit tab for each enabled language. For the time-being, it only supports nodes, but the roadmap includes support for other entity types, e.g. taxonomy and user entities, among others. This should be great for multilingual sites! It is currently in active development, so I won’t list the potential caveats. Please see the project page for recommended usage.

Status: There is a stable release available for Drupal 7.

Facet API Collapsible The search facet links from Facet API Collapsible

The module, by Peter Droogmans of Attiks, is a “full project” release of a sandbox project created by Acquia’s Katherine Bailey. If the name doesn’t make things especially clear, it probably helps to understand that the Facet API is another Drupal project, which this one extends (although the project description leaves that part out). Faceted search (e.g. searching within a range of pre-selected terms or dates) is what the Facet API does and this widget provides a slick interface for single-click searches.

Status: There is a stable release available for Drupal 7.

Facet API tabs

Categories: Search

When it rains facets, it pours facets. The module is another widget for the Facet API, written by Erno Kaikkonen of Exove Ltd in Finland. It allows you to display search facets in tabs and the project description indicates you’ll want to do “some CSS work to style the tabs”. If a sidebar isn’t what you need, this might be the ticket.

Status: There is a beta release available for Drupal 7.

Field collection feeds

The module, contributed by Howard Ge, provides feeds integration for field collections and also requires Feeds. This could well be useful.

Status: There is an alpha release available for Drupal 7.

Field Collection Tab formatter

Field Collection Tab Formatter imageThe module, written by Lee Rowlands of Australia’s PreviousNext gives us a nifty output for field collections in a tab-set. I can think of at least one place I’d personally like to use this and apparently I’m not the only one since there are already more than 50 sites using the module, barely a month after its release… a pretty solid start! Of course it requires the Field Collection module.

Status: There is a stable release available for Drupal 7.

Field formatter conditions

The module, written by Kristof De Jaeger of Wunderkraut, adds conditions to field formatters. The “Manage Display” tab for each entity type provides per-field configuration of field conditions. It supports fields from the Field API and Display Suite with a number of included conditions and it requires Field formatter settings

Status: There is an alpha release available for Drupal 7.

Flipcard - nodes made into flashcards

The module, by Hugh, helps you create node-based flashcards where the node title is the “answer”. Users can sort based on custom taxonomies and can record whether they knew the answer to each card, so questions they are still having trouble with will show up more often. I used to cut up index cards to make actual paper flashcards to study for exams and more recently, but still some years ago, made them to study on an old Palm device, with great success, so I know the usefulness of flashcarding, but this even offers jPlayer support to use automatically-played audio recordings for the questions. Very cool! You can see the demo site, where you can also learn a bit of Thai, to get an idea of the usefulness this module already offers. There are always new things I’m trying to memorize, so I’ll be a likely candidate to give this module a try. The only thing I’m really hoping it will offer (that I didn’t notice in the demo) is the ability to use the “question” as the “answer” (i.e. to practice both directions), but I doubt that would be too hard to manage. The demo site already offers the option to “view words” (clicking on each word in English takes you to the audio recording of its equivalent in Thai, whereas in practice mode, you hear the word and check to see if you know what it means). Personally, I think the current mode is better for the initial phase of passive comprehension, but for learning to actively speak a language, it’s better to work from “mother tongue” to “other tongue”. So ideally, the module should support working in both directions and keeping track of your answers in both directions, too, but maybe all this is already in the development roadmap.

Status: There is a development release available for Drupal 7.

Invites

The module, developed by Raz Konforti of Linnovate, allows you and/or your site members to invite new members to your site and includes an OG module to provide for inviting people to a particular group; it provides for the creation of a custom, fieldable Invites type and for custom invitation emails with Rules integration, among other interesting features. Google has proven the power of viral campaigns to build a community around a new product with “invitation-only” access… so this could definitely be a good idea for your community site, too. Note: Administrators of OG sites might, alternatively, wish to use the OG Invite People module, which eliminates the registration process for invitees.

Status: There is an alpha release available for Drupal 7.

jQuery selectBox Styles of SELECT element provided by the jQuery selectBox module.

The module, produced by Henry Umansky, provides multiple Javascript-enhanced styling options for SELECT elements. It integrates Cory LaViska's selectBoxjQuery library plugin, so like most such integration modules, it requires the Libraries module as well as the afore-mentioned and eponymous selectBox jQuery library installed in sites/all/libraries, according to the nicely detailed directions on the project page. The selectBox demo is really freakin' cool! There are various options for slick effects in addition to the various ways of building a SELECT box for improved UX.

Status: There is a beta release available for Drupal 7.

JS Watchdog

The module, coded by Bevan Rudge provides Drupal.watchdog() in Javascript to log errors to the database. It’s really mostly a developer tool for people working on Javascript code, but this should be useful. It provides a number of nice features, though, so if you are working on JS code, you might want to take a look at this. Unfortunately, there isn’t a Drupal 7 version (yet), but according to the project page, creating one should be “trivial”, so hopefully we’ll have a nice D7 version ready for use before long, too.

Status: There is a beta release available for Drupal 6.

Leaflet Widget for Geofield Simple geometries supported by the Leaflet Widget

The module, developed by Tom Nightingale of Affinity Bridge, a Geofield widget that provides a Leaflet map and uses the Leaflet widget plugin to work with geometries, making it possible to, for example, mark up web-based maps with the outline of a real estate propery or city district. Of course it requires Libraries and configuring any kind of mapping is never as simple as just activating a module, so be sure to check the project page for more details.

Status: There is a beta release available for Drupal 7.

Logo Block

The module, authored by Kristofer Tengström, provides flexibility in how you display your site logo, including applying an image style, and provides a block you can place anywhere, thus circumventing the limitations of the Drupal logo configuration.

Status: There is a stable release available for Drupal 7.

MC Hammer

The module, written by Nils destoop of Wunderkraut, provides tools and templates for sending sophisticated email newsletters from your Drupal site. There is only a development release, so far, but it already has an impressive feature-set, so if you plan want to produce a newsletter, this could be a great tool to look at, and with Wunderkraut behind this, we can bet this will develop nicely.

Status: There is a development release available for Drupal 7.

Nice Date This is the kind of date display provided by Nice Date

The module, written by Nicholas Thompson of Turner Broadcasting Systems, provides a nicely formatted date to display the publication date of nodes, e.g. blog posts, and comments. It uses a CSS Sprite with all the months, days and years to generate a 41x40px block with the date in it.

Status: There is a stable release available for Drupal 7.

Node Display Field

The module, contributed by Christian Biggins of PreviousNext, provides an alternative teaser display mode which can be enabled for any node, e.g. a “promo” mode. This could be useful.

Status: There is a development release available for Drupal 7.

No term pages

The module, written by Gaël Gosset of Insite, provides an extra option for a vocabulary which blocks the terms in that vocabulary from ever being displayed as a page. With all the different ways that terms are used in a typical Drupal site, not wanting term pages for some vocabularies is a pretty common use case, so now you know—there’s a module for that! This functionality should probably be in “core”.

Status: There is a stable release available for Drupal 7.

OG Invite People

The module, developed by Aleš Rebec, has some features in common with the previously-mentioned Invites module, but it’s only for Organic Groups. One interesting feature of this module is the complete elimination of the registration process. A user entity is during the invitation process and the invitees receive a one-time login link in their invitation emails.

Status: There is a development release available for Drupal 7.

Panels Content Cache

The module, developed by Graham Taylor of Capgemini, provides a content-aware cache plugin which supports caching Panels and other Ctools displays, until their content changes. Isn’t that how caching should work? Caching strategies and the technologies that support them are not trivial and there are a number of options, but this module looks promising for those who are working with Panels content.

Status: There are dev releases available for both Drupal 6 and Drupal 7.

Permissions Grid The simple permissions UI provided by the Permission grid module Links to the Permissions grid on the general permissions page.

The module, by Joachim Noreiko, provides a per-role grid of permissions for modules which declare structured permissions. These permissions can be viewed, on a separate page for each role, with the entity types in rows and permission verbs in columns. Of course it doesn’t eliminate the normal sea of permissions… but for the basics related to your site content, this helps simplify things. This is very nicely done and I’ll be sure to use it.

Status: There is a stable release available for Drupal 7.

Retina Images

The module, contributed by Michael Prasuhn, provides the option for core image styles to output a high resolution version of images for high DPI or retina displays. It can be used to return high resolution images for all devices. There can be very little difference in file-size between a low-resolution, high-quality image and a high-resolution, low-quality image. But the high-resolution image will work better on high-resolution devices and still look fine when scaled down for display on a normal-resolution monitor. This module already has a strong user-base, considering its recent release and the developer seems to be doing a great job managing the issues, so if improving mobile UX is important for your site, this module might well be worth considering.

Status: There is a beta release available for Drupal 7.

Rich Snippets

The module, developed by Chris Pliakas of Acquia, enhances the search results to provide nicer “snippets” of content returned in search results, much like those displayed by major search engines. Instead of just displaying the teaser or first characters of an article, it displays that with ellipses and the user’s search term within the context of the content. Very nice! Caveat: Be sure to read the “Usage” and “Gotchas” on the project page. Configuring a perfect site search is a non-trivial task, but this definitely looks helpful and works with core search and Apache Solr.

Status: There is a development release available for Drupal 7.

Role memory limit The simple configuration for the role_memory_limit module.

The module, developed by Kevin Yousef, is a small module which allows you to configure separate PHP memory limits, per role. For normal users, the memory limit could be set to 128MB, while the admin interface, which can require much more memory, can be allocated what it needs. Of course you need access to change the memory limit in your php.ini file. Since the memory limit is set per-user and this often has to be higher than normal for a Drupal site, just because of the greater needs for the site administrator, logical configuration with this module could, in theory, dramatically improve the number of concurrent users your site can handle. I’ll certainly be giving this a try.

Status: There is a stable release available for Drupal 7.

Scoville

The module, produced by Garrett Albright of PINGV, which gets its name from the “hotness” scale used for describing a variety of chili pepper’s level of spiciness, helps you easily display a block or page of your site’s “hottest” content. For more complicated use cases, you’ll probably want to use the Radioactivity module, instead, but since configuring it can be a bit of a chore, people who just want to get a basic “hot content” block into their site might want to give this one a try.

Status: There is a development release available for Drupal 7.

Search API Taxonomy

Categories: Search

The module, developed by Steven Jones of ComputerMinds, adds some extra features for integrating taxonomy into the Search API, including indexing the taxonomy term parents and display of a facet (using Facet API) for top-level terms. It’s still in development, so additional features could well be added, but this already looks very useful.

Status: There is a development release available for Drupal 7.

Taxonomy Freetag Detection

The module, by Leigh Morresi, extends Term reference fields of type Autocomplete term widget (free tagging) with an option to add a button to scan other fields (e.g. your node “body”) to and add words which it finds which match existing terms in that vocabulary. Of course you might need to eliminate any terms it adds, e.g. a word in your document might match an existing term, but have the wrong context for the meaning of the term (e.g. “Features” is a taxonomy term here on the Cocomore Drupal site, but if I simply talk about the features of a module, I’m not going to tag the article with that term). This looks pretty simple and very useful, especially if your site uses the standard autocomplete “tagging” widget, which is the only widget this module complements. See the project page for configuration tips.

Status: There is an alpha release available for Drupal 7.

Twitter Profile The Twitter Profile module in demo use.

The module, created by Rishikesh Bhatkar, provides a nice, very configurable, Twitter profile block which can show any or all of: your Twitter profile info, counts for Tweets, Favorites, Listed, Followers, and Following, and avatars for your Followers and Following, with a configurable size and number of avatars displayed. It also includes some theming presets for the block. This is much more configurable than many of the other Twitter blocks. What would be nice for community sites would be allowing each user to display their Twitter profile on their user profile page, but it looks like the block only supports one Twitter account.

Status: There is a stable release available for Drupal 7.

User Pic Kit

The module, written by Daniel Phin, allows your site’s users to choose a user image (avatar) to represent their account, from any of a number of providers, while still supporting a Drupal core image upload option. Each user can choose which provider they wish to use. The included third-party image host providers include Gravatar (which requires the Gravatar integration module) and Robohash, but with the add-on User Pic Kit Extras! module, you can add Twitter, Facebook, and other avatar hosts. You can also locally cache the remote pictures (such as Gravatar) and use Drupal image styles on the downloaded pictures! There is even a documented API which allows you to implement other image hosts. This looks like fun and can certainly improve the user experience for configuring a new user account profile for users who already have an established online persona.

Status: There is an alpha release available for Drupal 7.

User Search to People Administration

The module, developed by Benjamin Melançon of Agaric, removes the user search functionality from your site (for normal users) and moves it into /admin/people/search (a tab on the /admin/people). Most sites probably have no need for visitors to search user accounts, but administrators can still find such a search useful. By moving the user search tab into the “admin realm”, this also opens up the option of allowing people to view user profiles without also providing the “search users” functionality (since, by default in Drupal 7, if you want to block access to /user/search for a particular role, you need to leave the permission to “access user profiles” unchecked. So in addition to moving the user search functionality into a tab where it’s convenient for site administrators, it also breaks this unnecessary relationship between access to user profiles and to using the user search feature. This looks useful for many common use cases, perhaps even more ideal for most sites than the Drupal default.

Status: There is a stable release available for Drupal 7.

View mode per Role

The module, developed by Edouard Cunibil allows site administrators to set a view mode for content depending on the user role, with configuration in the content type edit form. This can be useful when you want your content to be displayed differently, to different user roles, but do note that this is not a content access module, so if you must prevent certain roles from being able to gain any kind of access to certain fields, you should consider the Field Permissions module.

Status: There is an alpha release available for Drupal 7.

Watchdog digest

Configuration for the Watchdog digest module.The module, created by Edgár Prunk-Éger, sends watchdog entries by email in a digested format, so you don’t get a separate email for each entry (of a type where you might want to send a message to a site administrator). This looks very useful, but the current project page is very lacking in detail and there is no link to the configuration, so it took looking at the code to figure out where to adjust settings for this. It adds a fieldset to the “Logging and errors” configuration page (/admin/config/development/logging), where you can configure the number of messages per e-mail, the e-mail address(es), and the severity level threshold, which can be set anywhere between “debug (all)” and “emergency”, although probably for anything that extreme you might want a Rules-triggered action to immediately email the site administrator.

Status: There is an alpha release available for Drupal 7.

WYSIWYG Configuration with TinyMCE and Shortcodes

The module, coded by Jurriaan Roelofs, is a Features-generated module which helps streamline a particular Wysiwyg configuration which is rather sophisticated. If it happens that you want all the features included here, it could be a nice way to get it all configured. But if you want something simpler or wish to use a different editor, etc, this is probably not for you. It includes Media integration and all kinds of things that a lot of sites won’t use, but which are notoriously tricky and time-consuming to work out, so if this kind of rich configuration is what you want, then all you need to do is download all the dependencies (see the project page, there are a ton!) and then simply enable this module to have it automatically enable and configure all its dependencies. This looks very useful if it happens to be exactly what you need; if not, it could be also be useful as a quick route to experimenting with a lot of modules and features that you might want to use.

Status: There is a beta release available for Drupal 7.

Oct 11 2012
Oct 11
Modules of the month story banner illustration.

Once again, I’ve surveyed the looong list of modules from the past month (September 2012). This article highlights and summarizes the features of some I found most notable. As usual, the selection and any opinions are my own and the order of appearance here is strictly alphabetical. Category terms are links to Drupal.org projects categorized with the terms. I’ve added terms for modules whose description lacked appropriate categories or might have been missing categories I thought were appropriate.

This month, while we didn’t get any new novelty modules which require bad judgment, there was one which I thought was funny and which otherwise serves no real purpose, other than perhaps to provide an example of object oriented PHP design with interfaces, etc: the module, written by Jess of University of Wisconsin-Madison and Drupal.org’s reigning IRC queen. Its very short (non)description is sure to make you smile:

Q: You’re a vegetarian; why do you get to have the blt project namespace?

A: The BLT is actually a base implementation; a properly architected interface does not mandate bacon.

Now let’s get on to the serious modules…

*/ Apache Solr Exclude Node

Categories: Search

The module, by Jens Beltofte of Propeople, helps to exclude individual nodes from Apache Solr, which can be useful when you have indexed a specific content type, and want to exclude a few nodes of that type. A checkbox, “Exclude from Apache Solr” is added to the node edit forms for selected content types. It requires Apache Solr Search.

Status: There are stable releases available for both Drupal 6 and Drupal 7.

Apache Solr Field Collection

Categories: Search

The module, created by David Rothstein of Advomatic, allows content stored within a Field Collection to be indexed by Apache Solr search as part of the entity that the field collection is attached to. Enabling the Facet API module allows fields attached to the field collection to be available to add as search facets.

Status: There is an alpha release available for Drupal 7.

Architecture

The module, by Sheldon Rampton of DrupalSquad, provides reports documenting how your Drupal site is architected. These reports include “Site Entities”, which lists all content types, taxonomies, and other Drupal entities that have been defined for your website with a list of all fields for each fieldable entity; “Site Taxonomies” lists all taxonomies and their associated terms; and “Site Variables” lists all variables and their values. The purpose of this module is to provide some easy-to-read documentation of how your site is put together.

It looks like there are a number of other interesting features in the development roadmap, but this already looks very useful for documenting the way a complex Drupal project is put together.

Status: There is a development release available for Drupal 7.

Attribution

The module, written by Marcus Deglos of Techito, adds configurable attribution text at the bottom of your site content’s body field, so that if it’s scraped, attribution will normally be included.

Status: There is a development release available for Drupal 7.

Better 404

The module, contributed by Yvan Marques, is based on an article from A List Apart. It aims to provide more useful information when a visitor reaches your 404 page.

Status: There is a stable release available for Drupal 6. This looks very promising, so I’m hopeful there will also be a Drupal 7 release and that perhaps functionality like this could be part of Drupal 8 “core”.

Commons Like

The module, by Ezra Barnett Gildesgame of Acquia, allows users to “like” content and comments using the Commons “Like” widget and the Rate module and VotingAPI and has a stated goal to be expanded to be useful on sites that are not on the Drupal Commons distribution.

Status: There is a development release available for Drupal 7.

Commons Radioactivity

The module, also contributed by Acquia’s Ezra Barnett Gildesgame provides integration with the Radioactivity module to help identify the most active content and includes Views displays to accelerate the site-building process.

Status: There is a development release available for Drupal 7.

Conditional Flags

The module, coded by Sebastian of Taller, provides additional API features for the Flag module, for custom conditions between flags, so that logically, if, when one flag is set, another flag should be unset, this can be done automatically. There are also plans to build a user interface for site builders.

Status: There is a beta release available for Drupal 7.

Content Tab

The module, coded by Ashish Thakur of Srijan Technologies, India, makes it easy for site administrators or other users with appropriate permissions to view the content written by a particular user; it provides a page with sub-tabs for each content type created by a given user and a tab on each user page which lists all content written by that user and eliminates the need to build up this kind of functionality with Views. It also provides a admin UI to configure various display options, among other features lacking in the core “Tracker” module.

Status: There is a stable release available for Drupal 7.

Context Get

The module, created by Peter Vanhee of Marzee Labs, provides a Context condition plugin for $_GET arguments. It allows you to activate contexts with arguments like local?context=home or local?context=pro and was created to fill a feature request for Context.

Status: There is a stable release available for Drupal 7.

Deploy Services Client

The module, by David Rothstein of Advomatic, provides a Services client which communicates with Deployment endpoints and helps perform other operations on the content which the Deployment module does not directly support such as deleting or unpublishing content on an endpoint. Note that this is an API for developers only; there is no user interface.

Status: There is a beta release available for Drupal 7.

Drush Permissions

Categories: Drush

The module, created by Klaas Van Waesberghe of dotProjects, enables Drupal site administrators to easily query user permissions from the command line. It can display reports of all permissions with module and role filters, identify if a user has a given permission, or list all roles a permission is assigned to. It is not actually a module (but I’ve included it here since, like Drush, it’s on Drupal.org as a module and looks pretty darn useful). It should not be installed as a module, but as a Drush plugin, i.e. use drush dl drush_permissions to install, but from outside a Drupal root directory.

Status: There is a development release available for Drupal 7.

eKaay - QR Code Login

The module, written by Daniel Wehner of erdfisch, allows users of a Drupal website to log into their accounts by scanning a QR code on the PC screen with a smartphone, thus streamlining the login process for users on devices where entering username and password tends to be less convenient.

Status: There is a development release available for Drupal 7.

Facetapi Multiselect

Categories: Search

The module, another contribution from David Rothstein, provides a multiselect widget plugin for the Facet API module which allows faceted searches to use a multiple select dropdown for drilling down into the search results. It’s primarily designed to help integrate faceted search with JavaScript plugins such as the jQuery UI MultiSelect Widget (where this module has primarily been tested), jQuery UI Multiselect, and Chosen.

Status: There is a beta release available for Drupal 7.

Field Orbit

The module, coded by Elliott Foster of Four Kitchens, provides an Orbit slideshow display mode for image fields and field collections with images and much of it is a Drupal 7 port of the Field Slideshow module.

Status: There is a stable release available for Drupal 7.

Field UI permissions

The module is yet another coded by David Rothstein. It provides independent permissions for managing fields attached to each type of entity so that you could, for example, give an “administrator” role permissions like “administer users” and “administer taxonomy” but reserve the rights to modify the underlying field structure for a “developer” role. This could certainly be handy for complex use cases.

Status: There is a beta release available for Drupal 7.

Godwin's Law

The module, by Tobby Hagler of Phase2 Technology, is helpful for managing online forums and allows you to automatically moderate threads and close the discussion when certain keywords are found. By default, the module is set to close comments when Godwin’s law is invoked, but other keywords can also be used as triggers.

Status: There is a stable release available for Drupal 7.

Hide Site

The module, developed by Barry Fisher of Real Life Design, provides a way to practically hide a particular version of a site from search engines even though it’s on a publicly-available development server without needing to patch your .htaccess or robots.txt files. Getting into the particulars of how it works is beyond the scope of this article, but it’s fairly simple to configure and should help keep a site out of the public eye until you are ready to officially release it.

Status: There is a beta release available for Drupal 7.

highlight js

The module, contributed by Juned Kazi of ICF International, integrates the highlight.js library to provide language-appropriate syntax highlighting for code examples on your site. It automatically detects the language, but you can also set the language for any block of code to ensure correct behavior. Of course it depends on the Libraries API highlight.js library, installed per the directions in this module’s README.txt file.

Status: There is a development release available for Drupal 7.

Image Field Cross Slide Slideshow

The module, created by David Whitchurch-Bennett of Drupology allows images uploaded into an image field to be displayed with the jQuery Cross Slide plugin as a display formatter for the image field within the “Manage Display” settings of your content type.

Status: There is a development release available for Drupal 7.

Image link to preset

The module, written by Gabor Szanto extends on the two core-provided options for setting link for an image field (i.e. “link to content” and “link to file”) to also allow you to link to any image preset for the image. It requires the Field formatter settings API module and definitely looks useful for many use cases involving sites with images.

Status: There is a development release available for Drupal 7.

Image or Video field formatter

The module, developed by Chris Cohen of Tigerfish Interactive, adds a field formatter for a media field that can either be an image or a video and allows for separate thumbnails depending on whether an image or a video is displayed, e.g. so that you can show a “play icon” over thumbnails for video. The shadowbox Javascript library is used to display the full image or video when the thumbnail is clicked. The media module is normally used in conjunction with this, but other configurations are possible. Setting this up is non-trivial and the full details from the module description and README file should be consulted.

Status: There is a stable release available for Drupal 7.

Live Feedback

The module, written by J. Renée Beach of Acquia, is similar to Google+’s feedback system; it leverages the html2canvas library to allow users to quickly report issues to site maintainers from within the context of the page where the issue occurred. By making it easier for users to report issues with all the detail needed for developers to replicate and resolve them, this module helps ensure that issues do get reported and resolved.

Status: There is a development release available for Drupal 7 and given that Acquia is behind this work, we can hope that Drupal 8 might actually include such functionality in core.

Masonry

Masonry is a dynamic grid layout plugin for jQuery. Think of it as the flip-side of CSS floats. Whereas floating arranges elements horizontally then vertically, Masonry arranges elements vertically, positioning each element in the next open spot in the grid. The result minimizes vertical gaps between elements of varying height, just like a mason fitting stones in a wall.

The module, written by Peter Anderson of PackWeb, makes the jQuery Masonry plugin available to Drupal as a library. It contains sub-modules for integrating with fields and Views; its field formatter allows you to display multi-value fields in a Masonry grid layout and integrates with existing formatters so existing formatter-specific options, e.g. Colorbox settings, are retained. It currently supports the field types: image, “long text” and “long text with summary”, and like most modules which integrate a Javascript library, it relies on the Libraries module. The Field formatter settings module is also required for the Masonry field formatter and of course Views is required for Masonry views. Add the Masonry javascript and configure according to the directions on the project page.

Status: There is a development release available for Drupal 7.

Memory profiler

The module, written by Tim Hilliard of Acquia, logs peak PHP memory usage to the Drupal watchdog and is light-weight enough it shouldn’t add to the memory errors you would be trying to resolve when you activate it. It can be used in a production environment, where enabling Devel would not be appropriate. Knowing this is available when we need it will make all Drupal developers sleep easier.

Status: There is a stable release available for Drupal 7.

Mobile Switch Block

The module, coded by Siegfried Neumann, extends the Mobile Switch module with a theme switch block with links to manually switch between your mobile or desktop theme and is compatible with Mobile jQuery. Of course it requires Mobile Switch (version 7.x-1.4+) and Respond.js is recommended. The block could be especially useful for people testing the site, but can also provide better options for users of mobile devices who might, for whatever reason, prefer to use your site’s desktop theme rather than the automatically-selected mobile theme.

Status: There is a beta release available for Drupal 7.

Mozilla Persona

The module, coded by Daniel Pepin of Digital Bungalow, adds Mozilla Persona functionality to your site so users with a Persona account can authenticate without need for a site-specific password; you can still require registration. It should nicely enhance the usability of most sites which require login. It depends on the Session API module.

Status: There is a beta release available for Drupal 7.

Panels Ajax Tabs

The module, developed by Patrick Hayes of HighWire Press / Stanford University, provides the ability to have a tabbed panel-pane that displays mini-panels within it and allows you to pass context from the “master” panel to the mini-panels via AJAX.

Status: There is a development release available for Drupal 7.

Password Field

Categories: Fields

The module, created by James Sinclair of OPC IT, provides for creating fields that store passwords, stored in encrypted format and (by default) will not display them on the website. This is useful, for example, if you are creating a website that integrates with other services and you would like users to be able to store their password more securely than using a text field, so could certainly be useful in unusual use cases. That said, the module description also bears a strong reminder not to use this module if you have any alternative.

Status: There is a beta release available for Drupal 7.

Passwordless This is still an experimental module, and using it on production sites is not recommended.

The module, written by Antonio Savorelli of Communikitchen, provides a replacement for the standard Drupal login form to allow logging in without using a password. Instead, every login is done via a “one-time login” link, as if the user had forgotten their password. This could be useful on sites where users are not expected to log in very often, but there are still a few things about the way this works that makes me nervous; e.g., currently you need to confirm a change of email address at the new address, but not at the old address, which would make it simple for someone who jumps on your computer, while you are logged in and your back is turned, to take over your (Drupal site) account. That said, as it’s still considered experimental and not for use on production sites, we can hope such issues are addressed by the time this module is released as “stable”. Once that’s true, I can certainly imagine using this for some sites.

Status: There is a development release available for Drupal 7.

PDF Archive

The module, authored by Brian Gilbert of Realityloop, allows you to generate PDF archives of any entity; generation is triggered by Rules actions and you can configure the entity view mode and role of the simulated user for each rule. It includes a Feature as an example for configuration and otherwise requires the Libraries API module, with TCPDF library installed, and the Rules module.

Status: There is an RC release available for Drupal 7.

Permissions per Webform

The module, written by Daniel Imhoff of UW-Platteville, lets you set standard (normally global) Webform permissions for each individual Webform, e.g. “Access webform results”, “Edit all webform submissions”, “Delete all webform submissions”, “Access own webform submissions ”, etc. It adds a “Permission settings” fieldset tab to each Webform node.

Status: There is a development release available for Drupal 7.

PixGather

The module, developed by Mike Kadin of Merlin Education, is a Drupal Module and PhoneGap application that allows users to easily upload photos to your Drupal site. It was developed so that guests at a wedding could share their pictures, but it’s suitable for a variety of use cases. Currently, the mobile app part of this is only for Android, but an iOS version is planned.

Status: There is an alpha release available for Drupal 7.

Plugin tools

The module, written by Chris Skene of PreviousNext, allows developers to browse the various plugins provided by different modules, information normally hidden in the code. The Drupal 7 versions supports Chaos Tools plugins, but it’s possible that a Drupal 8 version will work with “core” plugins. See the project page for more details, but this definitely looks useful for developers working with cTools.

Status: There is a beta release available for Drupal 7.

Render As

The module, by Stuart Clark of Realityloop, allows you to see page elements as they will be displayed to various users or roles without needing to switch users. Using it is not easy to succinctly summarize, so you should check the project page for directions, but this definitely looks like a useful project for developers and site builders.

Status: There is a beta release available for Drupal 7.

Resumable Download

The module, authored by Sina Salek adds support in Drupal for resuming incomplete downloads, which could be very useful for users on slower connections or for larger downloads and provides a number of useful configuration options.

Status: There are beta releases available for both Drupal 6 and Drupal 7.

Session Cache API If you are not a Drupal programmer, then you may stop reading now. Just enable this module if another module tells you to.

The module, written by Rik de Boer of flink, is a simple two-function API for programmers to cache and retrieve pieces of user/session -specific information, and works well even with anonymous users in a cached environment. It is not for caching large amounts of information or content, nor should it be used for anything sensitive, but definitely looks interesting as a replacement for the $_SESSION variable, which may not an option with Varnish or similar caching engines. Developers who find this short summary of interest should definitely read the directions on the project page because using this is not exactly trivial.

Status: There is an alpha release available for Drupal 7.

Session cookie lifetime

The module, created by Kornel Lugosi of Pronovix, provides an admin interface for setting the lifetime of the session cookie. This could definitely be useful for sites where convenience is more important than absolute security.

Status: There is a stable release available for Drupal 7.

StatsD

The module, developed by Owen Loy of Acquia, provides Drupal integration for StatsD and is intended for sites that have an existing StatsD / Graphite setup. It’s preconfigured to send statistics for Watchdog entries, user logins, page views, and active user sessions, but developers can also configure it to send custom statistics. It definitely looks useful.

Status: There are beta releases available for both Drupal 6 and Drupal 7.

Suggested Modules

The module, written by Kevin Quillen of Inclind allows module maintainers to enter a “suggests” property to their module info file, with a link to a relevant module project page. This is a step down from “required” modules; it simply suggests other modules one might normally wish to use in conjunction with your module. Of course, for this to work, modules both need to have “suggests” entries on their .info pages, and users need to have this module installed and enabled. I think this is a great idea and could well be an improvement in “core”; otherwise, until it’s widely used by both site builders and coders, it won’t be very useful. Actually, combining this with Module supports (which still needs a Drupal 7 release) is a more likely future development; in any case it would be helpful if we got such functionality into Drupal core.

Status: There is a stable release available for Drupal 7.

System Status AJAX

The module, contributed by Chris Pliakas of Acquia, a small module which loads the system status check via AJAX so that the admin/config page is rendered more quickly, even when some of the status checks are delayed. Nice! I’m hoping this functionality is going into the System module in Drupal 8; in the meantime, this should definitely improve the user experience for Drupal 7 site administrators.

Status: There is a stable release available for Drupal 7.

Textbook

The module, coded by the prolific Bryan Ollendyke, of Penn State University as part of the ELMS Initiative, provides Features which include CSS styles, WYSIWYG settings, and CSS3 page templates to help any theme provide consistent textbook styling for the production of online course materials. Users don’t need to be expert in CSS / HTML, but even experts should find this helps streamline their development. If you are producing an online learning site, this module, along with many others by this fine contributor, should be very useful.

Status: There is a beta release available for Drupal 7.

Timezone Picker The timezone picker module from Nate Haug.

The module, written by Nathan Haug of Lullabot, provides a JavaScript-based timezone picker to replace the default Drupal timezone list with a clickable world map to select a user’s timezone and Geolocation support for compatible browsers, so setting a timezone is greatly simplified. Enabling it replaces the default timezone list on the site’s “Regional settings” page and user profile pages. All Javascript is included; no libraries need to be downloaded and quicksketch also wrote this to be mobile-friendly. Very cool!

Status: There is a stable release available for Drupal 7.

Typo The Typo module’s user interface

The module, developed by Roman Arkharov, provides a simple way for site visitors to report typographical errors in your site content; all they need to do is select text which includes a typo and press Ctrl + Enter to automatically notify the site administrator. It includes preset Rules events you can use, as well as Views for administrators to see a list of reported typos, among other useful integrations. This could definitely be worth checking out.

Status: There is a development release available for Drupal 7.

Views fields combine

The module, contributed by Stefan Borchert of undpaul, allows you to combine the output of Views fields, separated by any desired custom text. Normally you would do this with "Global: Custom text", however if one field is optional, your output would include an unwanted separator. Once this module is enabled, you’ll have access to a new field type, "Global: Combined fields", where you can select the fields you would like to combine.

Development on Views fields combine is sponsored by undpaul.

Status: There is a stable release available for Drupal 7.

Weather block

The module, developed by Antti Alamäki of Soprano Brain Alliance, provides blocks and pages in which you can display forecasts from Yahoo Weather, World Weather Online, or weather.com and may include additional future service integrations. Drupal 7 needed more support for weather forecast integration, so it’s good to see this and I’ll certainly be giving this a try on sites where I might want a Weather block.

Status: There is a stable release available for Drupal 7.

Sep 12 2012
Sep 12
Modules of the month story banner illustration.

There are tons of new Drupal modules that got released in August; almost 200 module project pages were created. Some of them aren’t listed here because they currently have no release; some don’t even have code (yet). But a lot of very promising modules were released in August, perhaps due to the extra community involvement around DrupalCon Munich. There were even a couple novelty modules, good for a laugh if not much else: the Honey Badger module (“Honey badger don't care. Honey badger always clears cache.”), contributed by Camilla Krag Jensen of the Danish news site, Dagbladet Information, is one such module worth looking at if you need something to make you smile. The module, by Sally Young of Lullabot, “randomly swaps values of the variable table around.” Well, maybe it would if there were actually any code behind the project. Both require Bad Judgement. I suppose the latter project page could have been created for a new Lullabot training, but I’m curious what inspired Ms Jensen. Anyway, the women of Drupal came through with some laughs.

A more useful looking set of modules was also released in August by French developer, Guillaume Viguier-Just: The module is required for any of its related modules, which include Base Page, Base Article, Base Link, Base Media, and Base Apps. These modules are “… meant to be a set of features that will provide the "lowest common denominator" for building Drupal apps and distributions.” The Base modules depend on Apps Compatible, another new module from August which I think will be in very wide use before long (Apps Compatible is covered below). There are also a couple new modules for the Spark distribution (listed below), several new Drush extensions, and a number of other modules which look good for boosting developer/themer productivity.

As with previous editions of this article, all modules are listed in alphabetical order. If categories were missing on the Drupal.org project page, I’ve added appropriate categories. Additional caveat: I have not tested all of these modules and have not fully tested any of them. They are new modules and some come with new bugs, so beware.

*/ Anonymous login

The module, authored by Mike Stefanello and sponsored by Workout Spots, provides a login page with redirect to the originally requested page if an anonymous visitor to your site follows a link which requires higher privileges. The example use case is your site sends out emails with links which require a user is logged in; but subscribers to your email list get an “Access denied” when following the links (if not already logged in); a usability nightmare. Anonymous login to the rescue! Very nice.

Status: There is a stable release available for Drupal 7.

Apps compatible As well as providing methods for shared components, Apps compatible includes a collection of methods handy for developing interoperable features and apps.

The module, by Nedjo Rogers, is already reported in use on 278 sites, which shows there must be a use case for this module that was only released a month ago; I anticipate a lot more sites will be using it shortly. It helps alleviate compatibility issues between different Apps and Features caused by conflicting dependencies, etc.

Status: There is an alpha release available for Drupal 7.

Backup and Migrate SFTP

The module, by Chad Robinson, extends the very popular Backup & Migrate module with SFTP, instead of simply FTP when setting up “Destinations”. This is a GoodThing™ for security. I’ll definitely be keeping an eye on this.

Status: There are dev releases available for both Drupal 6 and Drupal 7.

Better Statistics

The module, authored by Eric Peterson of Tableau Software, extends the core Statistics module and collects additional data such as cache status and user agent without adding a lot of extra performance overhead. This could certainly be useful.

Status: There are stable releases available for Drupal 6 and 7.

Block Upload

The module, created by Alexander of ADCI, LLC, provides a simple block with an uploader for the node being viewed, so users who don’t have full “edit” permissions for the content can still upload files and images (or if all you want to do is upload a new attachment, you don’t need to open the content in edit mode). Cool!

Status: There are stable releases available for both Drupal 6 and Drupal 7.

Book Title Override

The module, written by Bryan Ollendyke of Penn State University, allows you to change the titles displayed in Drupal’s “Book” navigation so they don’t have to be an exact match to the constituent node titles. This eliminates one limitation that many might have been frustrated by.

Status: There are beta releases available for both Drupal 6 and Drupal 7.

Chamfer defaults

The module, also by Bryan Ollendyke maintains the default settings for the Chamfer theme, an Omega sub-theme with full HTML5 adaptive theme originally used for presenting online courses on the Penn State site (and another contribution from Ollendyke). It allows you to easily move defaults or your settings from one site to another.

Status: There is a beta release available for Drupal 7 and a development release available for Drupal 6.

Close Block

Categories: Content

The module, is another contribution by Alexander of ADCI, LLC. It allows users to close any block configured to be user-closable. Blocks can be configured to stay closed or reopen the next time a page with that block is displayed, be displayed a certain number of times before closing is permanent, or re-appear after a period of time. There are global settings, per-theme settings, and settings in the configuration for each block.

Status: There are stable releases available for both Drupal 6 and Drupal 7.

Configuration Interchange and Management

The module, coded by Thomas Fini Hansen of Reload!, is the first module I’ve seen which works with the new Drupal 8 Configuration Management system. Of course it’s still early for Drupal 8, so it goes without saying that all features are experimental, but this is intended to provide a simple way to save snapshots of configuration settings, roll back to snapshots, and deploy snapshots from one site to another. This could find a place in core by the time of “feature freeze”.

Status: There is a development release available for Drupal 8.

Cron Cache

The module, written by Will Vincent of Marker Seven, allows individual caches to be cleared at configurable intervals.

Status: There is a development release available for Drupal 7.

CSS Flipper

The module, written by Tsachi Shlidor, can automatically create and maintain a “flipped version” of any RTL or LTR CSS code, which can greatly streamline developing and maintaining themes. Nice!

Status: There is a beta release available for Drupal 7.

Dev Tools

The module, produced by Yuriy Babenko of Suite101, is “a collection of PHP classes and functions which help with and simplify Drupal module development”. From the looks of things, this could well be useful, perhaps especially for debugging.

Status: There is a development release available for Drupal 7.

Disable "Language neutral"

The module, written by rysmax, allows you to show only a sub-set of otherwise-allowable language options for each content-type, which means you can remove such nonsense as “language neutral” from the selectable languages for a Blog entry… Nice and simple, and most content types on most multilingual sites would probably benefit from this.

Status: There is a stable release available for Drupal 7.

Dismiss

The module, produced by Chris Ruppel of Four Kitchens, allows you to “click away” Drupal messages so that they are out of your way without a page refresh. It’s a simple module with no configuration, but it could be handy for when you are documenting the steps of a process and end up with Drupal messages displayed that might distract from a screenshot.

Status: There is a stable release available for Drupal 7.

Drupal-up

The module, written by Kosta Harlan of DesignHammer, is “a Drush extension that facilitates building virtual machines for local development of Drupal sites.” It includes blueprints for virtual machines for hosting Drupal 6–8 -based sites. Looks interesting.

Status: There is a beta release available “for Drupal 7” (presumably, like Drush, the Drupal version is not really applicable).

Drush Hosts

The module, written by Christopher Gervais of Koumbit.org, provides Drush commands for managing /etc/hosts, so you can easily add and remove entries. This definitely looks useful.

Status: There is a stable release available for Drupal 7.

Drush Issue Queue Commands

The module, produced by Greg Anderson, is a Drush extension which includes commands which help manage a Drupal project issue queue, making things simpler for beginners and faster for everyone. I’m sold!

Status: There is a stable release available for Drupal 7.

Entity RDF

The module, developed by Stéphane Corlosquet, the primary maintainer of Drupal’s core RDF, is a replacement for Drupal core RDF, which provides tight integration between the RDF mappings and Entity API and attempts to solve shortcomings of the Drupal 7 core RDF module. This is worth keeping an eye on.

Status: There is a development release available for Drupal 7.

Feeds YouTube Fetcher

The module, contributed by Travis Tidwell of AllPlayers.com and sponsored by Anglican TV, is a YouTube feeds fetcher which is able to overcome the situation where feeds are paginated, thus getting all of the videos in a feed rather than just the first 50. This could well be useful.

Status: There is a development release available for Drupal 7.

Flag expire

The module, by Joachim Noreiko, can use either the Date or Time period module to create flags which can be active for a preset period of time or which begin/end at specified times.

Status: There is a beta release available for Drupal 7.

Flatfish

The module, developed by Mike Crittenden of Drupal Connect, uses the Ruby gem, Flatfish, to help scrape HTML data and import it into a Drupal site, useful, for instance when migrating an older website into Drupal. It includes other code to help with the migration of the data. I know there are other popular modules for this kind of task, but this could also be worth keeping in mind.

Status: There is a beta release available for Drupal 7.

Icon fonts Icon Fonts can easily be changed for color, size, drop-shadows and other effects

The module, created by Gábor Hojtsy of Acquia as part of the Spark distribution definitely looks interesting. Icon fonts allow you to easily change size, shape, color, strokes and other attributes. See this CSS Tricks post about icon fonts for an example of how useful they can be as a replacement for standard icons.

Status: There is an alpha release available for Drupal 7.

Image CAPTCHA Refresh

The module, produced by Dmitry Drozdik of VolcanoIdeas, helps with one of the problems of Captcha; if the image is “too easy”, bots can parse the Captcha—too hard and humans have a hard time and might need to refresh the page a few times, which can be a real hassle if they have completely filled out a form. This brings in a feature that is missing in some Captcha plugins: the ability to get a new Captcha without refreshing the whole page and should result in less frustration for users and a lighter load on your server.

Status: There is a stable release available for Drupal 7.

Leaflet More Maps The Stamen watercolor effect and Thunderforest cycling maps are both options with Leaflet Maps

The module, created by Rik de Boer of flink, expands your mapping horizons beyond Google maps, allowing you to include maps from a variety of alternative map providers, such as the watercolor-effect maps from Stamen or the trail and cycling maps from Thunderforest. As its name implies, it also depends on the Leaflet Javascript library.

Status: There is a beta release available for Drupal 7.

LGP

The module, which stands for “Lazy Guinea Pig”, created by develCuy and sponsored by dilygent, is another developer toolset which will help you debug your Drupal code. It can write to a temporary log file, works in places where Devel’s dsm() won’t, and has a number of other features that make me think this is worth knowing about. It also includes a number of Drush commands.

Status: There are development releases available for Drupal 7 and Drupal 8.

Logic Block

The module, produced by Pat Lockley, provides a number of configuration options for blocks to allow site administrators to easily perform such actions as merging blocks, replacing one block with another in particular circumstances (e.g. if one block is empty or based on language, role, user ID, etc), and other nifty tricks. I’ve only just experimented with it a bit, but it definitely looks useful.

Status: There is a stable release available for Drupal 7.

Mobile friendly navigation toolbar

Categories: Mobile

The module, produced by Gábor Hojtsy of Acquia, is another module developed and released as part of the Spark distribution. As the name implies, it provides a better toolbar for mobile navigation. Like the rest of Spark, it provides a way for us to test and use awesome new Drupal 8 features in our Drupal 7 projects. Very nice!

Status: There is an alpha release available for Drupal 7.

Module configure links Module configure links opens the config page for a newly enabled module

The module, by Brad Erickson of ChapterThree, helps solve a typical Drupal problem, especially common when working on sites with a lot of modules: you enable a new module, but then need to search around to find its configuration page. This module presents obvious links for configuring any modules activated, for a smoother Drupal site-building workflow. If only one module is activated, it automatically redirects you to the configuration page for that module. I’ve tried it, I like it, and I’ll definitely be using it on more than just my local “module testing” site.

Status: There are stable releases available for both Drupal 6 and Drupal 7.

OpenFolio Features OpenFolio is a distribution for photographers or other visual artists who want to create a web portfolio of their work.

The module, developed by Ted Bowman of Six Mile Tech, was released as part of the OpenFolio distribution, also released by Mr Bowman in August. it contains no custom code, but handy exported content types, Views displays, Panels, and other useful bits to help streamline the process of creating an online portfolio site to display visual art. Of course it depends on Features.

Status: There is a development release available for Drupal 7.

OpenLayers Filters

The module, by Pol Dell'Aiera, provides a text filter which replaces a token representing any OpenLayers map preset with the map, right within your content.

Status: There is a stable release available for Drupal 7.

Override css

The module, authored by Wim De Craene of Jeugdwerknet vzw, provides a simpler alternative to Sweaver or Livethemer which allows a client/administrator to make simple changes to site CSS, e.g. changing the color of H1 and H2 headings, through a simple UI, without even having to know any HTML or CSS.

Status: There is a development release available for Drupal 7.

Panels Extra Styles

The module, coded by Sean Dunaway provides additional region and pane styles for Panels with full HTML5 support. Since users are also encouraged to contribute their own styles, the options should increase with time. This looks well worth trying out if you are using Panels.

Status: There is a stable release available for Drupal 7.

Pathinfo

The module, authored by Cameron Tod of NBC Universal, is a Devel plugin which displays useful information about which module and function is responsible for the page you are viewing. It links the appropriate Drupal API pages, where applicable, and displays full Krumo output for page arguments. This looks handy for those times you need to fix some issues in a Drupal site, but have no idea where things are coming from.

Status: There are beta releases available for both Drupal 6 and Drupal 7.

Required by role Required By Role checkboxes on the Tags field configuration

The module, written by Alejandro Tabares, simply adds some extra checkboxes to each field configuration form so that you can not only specify that a field is required (for all roles), but can instead specify that a field is required only for particular roles. I suppose the use cases for this are not so common, but I’m sure I’ve had at least one situation where this would have been useful.

Status: There is a stable release available for Drupal 7.

Resolve IP

The module, by Yannis Karampelas of Netstudio, is simple, but very useful for understanding what’s going on in the system log (Watchdog) entries: it resolves the hostname for each IP address so you see (for example) crawl-66-249-66-212.googlebot.com alongside the IP address.

Status: There is a beta release available for Drupal 7.

Responsive Background Images

The module, is yet another contribution in the same vein as other modules recently released by Daniel Honrade of Promet Solutions. It provides a range of rules for background image sizes, which it loads based on the size of the browser window. Phones get a smaller background image than iPads, which get a smaller image size than a full-size browser window on an HD monitor. This, of course, helps conserve mobile bandwidth which helps make your whole site more “responsive”.

Status: There is a development release available for Drupal 7.

Search API Extended String Filter Did you ever want to be able to search partial string using the search API from within views, now you can, supports all the regular (exposed) filters and also 'Starts with', 'Contains', …

The module, contributed by Jelle Sebreghts of Attiks, enables searching for partial strings with the full Views search filters.

Status: There is a stable release available for Drupal 7.

Search API stats

The module, authored by Brandon Stone of ImageX Media, provides a block which allows users to see your site’s top search phrases. Of course there is a bit more to getting this working than simply adding and enabling the module, but for a search-related module, this looks relatively easy to get working.

Status: There is a stable release available for Drupal 7.

Searchcloud Block

The module, developed by Fabian de Rijk of Finalist, is similar to Search API Stats (above). Instead of a block with a simple list of most-searched terms, it provides a block with a “cloud” of those search terms.

Status: There is a development release available for Drupal 7.

Services Entity API

The module, created by Pedro Cambra of Commerce Guys, provides integration of Services and Entity API. It was developed with the needs of Drupal Commerce users in mind, but can be used for any Drupal entities.

Status: There is a development release available for Drupal 7.

Setup

Categories: Utility

The module, developed by Stuart Clark of Realityloop, gives developers and “adventurous site builders” a way to create a script for a client with a series of steps to enter their personal data (e.g. social networking accounts, Google Analytics tracking codes, etc); information which might not have been available during the development process.

Status: There is a beta release available for Drupal 7.

Simple Editor

The module, contributed by Ki H. Kim of Urban Insight, provides an almost-completely pre-configured WYSIWYG editor, based on TinyMCE. The aim is to give users a Wordpress-like, “ready-to-use”, editor, and not to be super-flexible, but if the common use case assumed applies to you, this could be a great time-saver.

Status: There is an alpha release available for Drupal 7.

Simple oEmbed

Categories: Media

The module, also by Ki H. Kim, integrates a simple setup of oEmbed with the Simple Editor, to make it easy to add videos and other rich media to content. Like the Simple Editor, it assumes a lot of the configuration, so for less typical use cases, you might want to use the full oEmbed project, which provides additional configuration options.

Status: There is a beta release available for Drupal 7.

Taxonomy Group Fields

, by Chris Albrecht of the National Renewable Energy Lab, is a taxonomy selection “widget” intended for larger vocabularies, currently those with two levels of hierarchy (parents and children, but no “grandparents” or “grandchildren”), however the project page indicates that there is an interest in expanding to multiple hierarchy levels, among a number of other useful features. Currently, if a parent is selected, all of its children are automatically included (parent acts as “select all” for children), but the developer also indicates he would like to provide this behavior as an option, rather than as the “only way”. This module is similar to one of my favorite, not-yet-for-D7 taxonomy selection/management tools, Taxonomy Super Select. What TGF lacks (a feature in TSS) is the ability to add new terms; I think it would be cool if it supported adding a new term into any group (with role-based limits on adding new terms). But there are so many use cases for Taxonomy widgets that it’s probably best to just create a limited module that does one thing well rather than trying to be everything for everyone.

Status: There is a development release available for Drupal 7.

Taxonomy Orphanage

The module, coded by Elliott Foster of Four Kitchens, is a module that helps resolve a rather painful bug in Drupal core. If you delete a taxonomy term, references to it still are retained in entities which used it. Taxonomy Orphanage provides interfaces for cleaning up such references. Nice work, Elliott!

Status: There is a stable release available for Drupal 7.

Theme Hider

The module, authored by Victor Quinn, provides a method for site administrators to hide particular themes on sites where users are allowed to select their preferred theme. Some enabled themes might only be for admin or for special purposes, so this is a good thing to have if you want your site to be displayed nicely for everyone.

Status: There is a stable release available for Drupal 6.

tinynav.js

The module is another contribution from Bryan Ollendyke. It integrates the tinynav.js jQuery library, which converts a typical list-based menu into a select-list drop-down if the browser window is narrow (e.g. on smaller displays). It’s extremely light-weight at only 362 bytes (minimized and gzipped). This module provides a number of configuration options and was designed for use with the Chamfer theme, but also should work well with other Omega-based themes (what it’s been tested with) and possibly other themes. Looks good!

Status: There is a beta release available for Drupal 7.

URL Alias Permissions

The module, written by Justin Phelan of Blackwood Media Group, “allows site administrators to set permissions to create and edit url path settings by content type”. This is certainly useful for particular use cases.

Status: There is a stable release available for Drupal 7.

User Import Framework Plus

The module, written by Deji Akala of JB Global, extends the User Import Framework to allow importing more than just the basic three fields (email, username, password) the UIF supports. This certainly looks like it could be useful.

Status: There is a development release available for Drupal 7.

Visual select file

The module, coded by Rudie Dirkx of ezCompany, is simpler than Media and easier to extend, plus it includes visuals (thumbnails) to help you select files. It uses Views and FileField Sources to help it work its magic. Nicely done!

Status: There is a beta release available for Drupal 7.

Webform Email Raw Emailing raw, unfiltered (filter_xss) data from a Webform submission can be risky, so only use this module if you absolutely require this behavior and understand the risks.

Categories: Mail

The module, contributed by Robert Bates of Phase2 Technology, provides a solution for sending raw, unfiltered XML from Webform submissions.

Status: There is an alpha release available for Drupal 7.

Webform Serial

Categories: Content

The module, developed by Peter Lieverdink of Creative Contingencies, simply “provides an auto-incrementing number field for webforms.”

Status: There is a development release available for Drupal 7.

WireDocs … a large legacy of documents in proprietary formats, such as MS Word or Excel, may discourage from moving to an online editor. Additionally, legal issues might arise if confidential files are hosted by a third party service provider.

The module, from Gottfried Nindl of OSCE, allows your Drupal site to host files in various office formats which can be opened (seamlessly downloaded and opened by a native, local application), edited, and saved (seamlessly uploaded back to the server) with a Java applet that bridges the gap between Drupal and the client operating systems. This looks like a pretty cool alternative to third-party document-hosting systems.

Status: There is a beta release available for Drupal 7.

Sep 07 2012
Sep 07

Drupal 8 Multilingual Initiative Code Sprint weekend

I took a train from Frankfurt (Germany) down to Munich the Saturday before the DrupalCon. When I joined the Multilingual Sprint on Sunday morning, many of them had already been sprinting for a full day and a number of issues were ready for review, so I dived in, observing the behavior of Drupal 8 before and after applying patches, proof-reading the patches for anything odd (e.g. typos in the documentation), discussing the issues in comments and in IRC with people who were sitting just across the room (other times actually speaking in person). By the end of the day, instead of the dozen or so people that Gábor Hojtsy, the Multilingual Initiative team lead, had expected, there were close to 50 people at the location, some joining us in the work on Multilingual issues, some working on other Drupal 8 tasks, and some who were just arriving in Munich and followed the Tweets to where we were. Luckily, the location rented for the Saturdays and Sundays before and after the DrupalCon week was big enough to accommodate all the extra arrivals.

While on the topic of the venue we used for those weekends, I’d like to personally thank Stephan Luckow and Florian (“Floh”) Klare of the Drupal-Initiative e.V. for all that they did to find a nice place that would still leave us with a budget for food and for their valiant work on stretching the food budget while still serving up excellent fare, in keeping with the fantastic meals we enjoyed the rest of the week. Instead of ordering delivery, they prepared almost everything themselves, including beautiful open-face sandwiches, fruit platters, and lovely grilled specialties at a club we went to where you can barbecue in the Biergarten.

…thanks for the huge help to the local organizers, especially Florian Klare and Stephan Luckow. They helped us manage collecting and spending sponsor money wisely with the Drupal Initiative e.V, prepared great sandwiches and fruit plates for us and even organized a sprinter party night with grill food. It was amazing to work with such helpful and flexible local organizers.
Gábor Hojtsy, September 5, 2012

Luckow and SirFiChi of the Drupal Initiative, organized the location and made us great food!

Since people were “fresh”, I think a lot of work got done on the first weekend and the Monday before the conference (more than 50 people joined us and worked on various core initiatives on Monday in the room we later used for core most conversations at the Sheraton), which also meant that issues were still fresh in our minds while we had days of sessions and conversations, so when we started sprinting again on Friday we had lots of new ideas for the tasks we were still working on. Friday’s sprints were at the Westin Grand, where there was great attendance both upstairs in the main room as well as a large room downstairs from it, where Drupalize.me hosted a core contribution workshop to ease people into the process of contributing to core. I decided to go to that workshop since I’m still pretty new to it all and found a few people sitting nearby who were I was also able to interest in some Multilingual tasks, so while the main group sprinted upstairs, we also worked downstairs. Later on, I came upstairs, and since there were not a lot of simpler tasks for “core newbies”, like myself, I took some time to sprint on a module I contributed some time back, before there was much of anything for Drupal 7 in the area of “multilingual”… and tried to make my module more multilingual-friendly. I got a few good commits and a new release out for Internal Links and also recruited a colleague to look at the code with me, provide some ideas, and become another maintainer. So I personally found Friday quite productive.

*/ First off, a sprint on this scale would not be possible without sponsors and significant on-site help. DrupalCon provided us with space on Monday and Friday, and some great food on Friday. The rest of the days would not have been doable without comm-press, dotProjects.be, Open8.se, OSINet and Acquia. The [ … ] financial sponsorships they provided paid for our weekend venue [ … ].

I continued sprinting with the Multilingual initiative at the Film Coop Saturday and Sunday, leaving mid-afternoon on Sunday to get back to the train station. When I left the other sprinters, Webchick was only finally getting some rest after her trip home and we had about 20 issues that were marked “RTBC”. In all, there were dozens of issues tackled over the weekend. For a complete overview of all the issues we made progress on, see Gábor’s post about the sprints, where you can also check out his excellent DrupalCon core conversation presentation, “Drupal 8’s Multilingual Wonderland”. There is still a lot to do in the time between now and the “feature freeze” deadline, but we made good progress in the DrupalCon sprints, so hopefully we can push on and get the rest of the critical tasks done in the time remaining.

One of the less trivial tasks I took on during the final sprint weekend was documenting the new language_select field type, which involved checking out the Drupal API (documentation) project, updating the Form API table to include a new Element column (language_select) and Property row (#languages), as well as information about these (below the table) and linking them in all the appropriate places. Currently, updating this page is a bit of a pain, but hopefully we will move to a better system for maintaining this information, perhaps even automated generation. While I’d worked on other Drupal documentation pages before, this was the first time I’d actually contributed patches to update the API, so it was a good learning experience.

If you’d like to help out with the Multilingual initiative or other core contribution, you might first want to take a look at the Drupal 8 Initiatives page, where announcements about coming IRC meeting can be seen. This page also has links to the news, roadmaps, filtered issues, and other pertinent information. Drupalladder.org is also a great place to go for lessons to help you work through the steps of being ready to contribute to Drupal core.

I look forward to seeing you all in IRC and in coming code sprints.

Jul 11 2012
Jul 11
Modules of the month story banner illustration.

In June 2012, there were over 160 new Drupal modules released. This article provides some coverage for the most noteworthy of those modules, at least from our point of view. As in the past editions of this article, we generally ignore modules which are only for limited use cases or which simply provide integration of commercial third-party services. We also have not tried out many of these modules and have not thoroughly tested any of them. We normally don’t list modules that seem to be far from “ready” (e.g. no actual release yet), but we can make no claims as to the stability of the modules covered. Be sure to back up your database before testing new modules that might cause pain and suffering.

I think that many might agree that some of the most significant new modules from June were Author, Edit, and Layout—released by Angie Byron and Wim Leers as part of the Acquia-sponsored Spark distribution, which aims to improve the content-authoring user experience for Drupal 8 (the current distribution and modules allows us to use these improvements in Drupal 7 and help improve them). This work is still not ready for use on production sites (“dev” releases at most), but the progress is exciting, nonetheless. And despite the fact that Acquia is sponsoring development, we can all contribute to this awesome project by experimenting and reporting our experience (bug reports or ideas about ways to further improve the user experience) and/or submitting patches. We are definitely excited about Spark!

Thanks to Sascha Grossenbacher and Miro Dietiker of MD Systems there are a number of new support plugins for the Translation Management Tools (TMGMT) which they have recently released, now providing support for translation services available from Google, Microsoft, MyGengo, Nativy, and Supertext. Each of these new modules that extend the main Translation management module are currently available as dev releases for Drupal 7.

Matt Cheney of Pantheon Systems has also recently released a number of exciting “apps” (modules which depend on the Apps module) to flesh out the feature-set of their popular Panopoly distribution; these include: Panopoly Admin , Panopoly Core , Panopoly Demo , Panopoly Images , Panopoly Magic , Panopoly Pages , Panopoly Search , Panopoly Theme , Panopoly Users , Panopoly Widgets , and Panopoly WYSIWYG. All of these new modules are still considered to be in “beta” for Drupal 7, and while some of these may work without the Panopoly distribution, I won’t cover their functionality in detail. They do appear to provide some useful enhancements to Drupal’s standard installation and what their distribution could formerly offer, so this is some significant progress and worth taking a look at if you want to provide a friendly user experience or want to keep up with the latest and greatest in development for distributions.

The rest of the most noteworthy modules are listed in alphabetical order with brief descriptions of their functionality, development status, and module categories on Drupal.org (in some cases, we selected appropriate categories if none were provided on the project page. A couple are not actual modules, but are included as Drupal “projects” also worthy of mention.)

*/ Bean Panels

The module, authored by Lee Rowlands of PreviousNext, allows Beans to be used within Panels. Very cool!

Status: There is a stable release available for Drupal 7.

Booking.com API

The module, written by Rafal W., is an API for Drupal developers to allow us to build Booking.com (hotel booking) features into our sites.

Status: There is a dev release available for Drupal 7.

Clean Comments

The module, written by Manuel Garcia, adds a bit of JavaScript to each page which hides the comment links (edit/delete/reply) so that they only appear when hovering over a comment.

Status: There is a dev release available for Drupal 7.

Community Media Header

The module, written by Kevin Reynen of makedatamakesense.com, allows you to provide header images which can vary based on site section or context.

Status: There is a dev release available for Drupal 7.

Conditional Rules

The module, from Jason Zhang of the Australian National University, allows you to provide branched conditions for Rules using “if / else” and “switch / case” so that you don’t need to create multiple similar rules just to manage basic differences in conditions. This functionality is a long time coming, in my opinion, so I’ll definitely be giving this one a whirl.

Status: There is a dev release available for Drupal 7.

Contentment

The module, written by Peter Anderson of Alma Technology, gets its name as a contraction of “content management”, which might seem odd since one might say that Drupal, itself, is for for content management. So what does it do? It provides a nicer overview of site content with tabs for each content type, links and overview of numbers of comments, etc. From what I’ve seen, these are sweet improvements for site administrators. It would be nice to see such enhancements to the content overview pages in Drupal 8.

Status: There is a release candidate available for Drupal 7.

Cryptolog

The module, from Mark Burdett of the Electronic Frontier Foundation, enhances user privacy by replacing IP addresses in site logs with randomized identifiers. Each identifier is unique to an IP address for each day, so you can still analyze site statistics (such as visitors per day). This would be useful for certain kinds of sites where user privacy might be more important, but it might also make it harder to track longer term patterns of spam posting or repeat visitors.

Status: There is a dev release available for Drupal 7.

Dropdown Checkboxes

The module, by arijit dutta of Faichi Solutions, integrates the DDCL library, to replace normal HTML select lists with a drop-down checkbox list for better usability. It would be nice to see this kind of functionality natively provided by browsers.

Status: There is a release candidate available for Drupal 7.

DrupalPro

The project, contributed by Mike Stewart of Media Done Right, is not a module at all, but definitely an interesting project for people who want to get up and running with a new Drupal development environment. It’s an Ubuntu-based VirtualBox disk image which can be run right off of a USB3 stick. It has loads of great utilities already installed, as well, of course, as a full DAMP stack. Assuming your production server is Linux-based, this Virtual box should provide a much more compatible testing environment than a MAMP/WAMP development environment. The disk image includes Drush 5, Git, Netbeans, Compass, Sass, Dreditor, and a number of other very useful utilities that can take time to set up.

Status: There is a beta release available for Drupal 7.

Drush live

Categories: Drush

The module, produced by James Silver of ComputerMinds, provides some nice enhancements for Drush. Explaining it here is outside the scope of this article, but it does look like it could be useful.

Status: There is a stable release available for Drupal 7.

Entity Property Field

The module, by Erik Summerfield of Phase2 Technology, provides a simple display field with format widgets to display entity properties as if they were normal fields (e.g. to provide a field with formatters to show the date/time updated information for a node or other entity.)

Status: There is a beta release available for Drupal 7.

Felix

The module, by Maurits Lawende of Dutch Open Projects, provides a simplified way for site editors to add a preset selection of blocks to pre-defined page regions without any need to use block administration. Cool stuff!

Status: There is a beta release available for Drupal 7.

GMap3 Tools

The module, contributed by Ivica Puljic of MontenaSoft, is a developer API for integrating Google Maps (version 3) into a Drupal site.

Status: There is a dev release available for Drupal 7.

Handy Block

The module, developed by Jeremy Epstein, helps eliminate the need for custom modules just to provide a block which relates to the current entity. It’s considered a “convenience module” for developers and themers.

Status: There is a stable release available for Drupal 7.

Image Annotator

Categories: Fields

The module, written by Peter Droogmans, helps add annotation markers to images.

Status: There is a dev release available for Drupal 7.

Image Autosize filter

The module, written by Hai-Nam Nguyen of Open Web Solutions, keeps content consistent and streamlines the editorial workflow by forcing a preset image size based on the selected image “alignment” (left/right/center/none).

Status: There are stable releases available for both Drupal 6 and Drupal 7.

Image Preset

The module, by Yuriy Babenko of Suite101, allows you to simply select an ImageCache preset for Views, DisplaySuite or other places where you might set up an image to be displayed.

Status: There is a stable release available for Drupal 7.

jQuery File Upload and jQuery Kaltura Uploader

The and modules, both coded by John Youssef of JesoX, are similar modules which provide enhanced file upload functionality and a “multi-uploader”. Both modules depend on the jQuery Update module and look similar. Differences include that the jQuery File Upload module supports non-image/video documents (e.g. .doc and .pdf files, etc), whereas the Kaltura uploader supports only images and video file-types, requires the Kaltura module, and uploads files to your configured Kaltura account.

Status: There are dev releases available (for both modules) for Drupal 7.

jQuery LocalScroll

The module, written by Gabor Szanto, uses the jQuery LocalScroll library (installed separately using the Libraries API module) and allows you to build sites with links to anchor points on a page which smoothly scroll to those anchor point links, when clicked. This can look pretty cool and is ideal for mini-sites or to minimize page requests. See the project page for links to example sites.

Status: There is a dev release available for Drupal 7.

JSON 2

The module, is also produced by Peter Droogmans and provides integration of the JSON 2 JavaScript library. This could definitely be useful.

Status: There is a stable release available for Drupal 7.

Link API

Categories: Content

The module, by Chris Skene of PreviousNext, provides some nice tools for developers to manage links on a Drupal site. This can include validation of links, maintaining a list of all links, etc. This definitely looks handy!

Status: There is a beta release available for Drupal 6 (and we are hoping this will get ported to D7.).

Link Badges and Menu Badges

The and modules, both developed by Wayne Eaker of Zengenuity, work together (Link badges is a developer API which is used by Menu badges and can be used by developers for other modules) to provide iOS-style “badges” next to links, e.g. to indicate the number of unread messages, items in a cart, etc. Very nice!

Status: There are stable releases available for Drupal 7.

Microsites

The module, also contributed by Chris Skene of PreviousNext, helps simplify using Drupal to produce “Microsites” within a Drupal installation, so they can have their own menus, etc. This looks very cool!

Status: There is a beta release available for Drupal 6.

Ming

is yet another module by Chris Skene of PreviousNext. Ming allows site developers to work with data stored in MongoDB databases and provides a number of nice features, including maintaining multiple persistent connections to MongoDB databases, shortcuts for MongoDB tasks and for accessing stored objects without need for creating full MongoID classes, etc. This looks very interesting.

Status: There is an alpha release available for Drupal 7.

Postal Code Validation

The module, produced by Liam Morland of University of Waterloo, is a developer API which helps provide postal code validation for a number of different countries. It has no user interface of its own, but allows developers to utilize its functions in their own modules.

Status: There is a release candidate available for Drupal 7.

Promo node

The module, created by Mikke Schirén of NodeOne, provides a system for promoting various Drupal nodes on your site, thus eliminating the need for creating a special “promo” content type.

Status: There is a dev release available for Drupal 7.

Publish button

The module, also created by Mikke Schirén, provides a simple “publish” button next to the “Save” button so you don’t need to force your site’s content creators to check the “publish” box, then click on “Save”. This provides a more natural workflow and helps prevent accidentally creating nodes without publishing them (or vice-versa, depending on how you might create your content type defaults.) Very simple… but very nifty!

Status: There is a beta release available for Drupal 7.

Reverse Proxy Check

The module, written by Justin Emond, helps verify that nothing has broken your reverse proxy caching for anonymous site visitors (e.g. Varnish). It provides an extra line in your site’s status report (admin/reports/status)

Status: There are stable releases available for both Drupal 6 and Drupal 7.

Rules URL Argument

The module, written by Tadej Baša, allows you to check for and get the value of arguments used in the URL and use them in Rules.

Status: There is a stable release available for Drupal 7.

SAML Service Provider

The module, by Marcus Deglos of Acquia, is pretty cool… it allows users to verify their identity with a SAML IDP (Identitity Provider) server to streamline registration and login.

Status: There is a dev release available for Drupal 7.

Scheduler Workbench Integration

The module, produced by William Hurley of Forum One Communications, allows you to set dates for Workbench-moderated content to be published and/or unpublished. This is definitely useful for managing the scheduled release of editor-moderated content.

Status: There is an alpha release available for Drupal 7.

Search synonyms

Categories: Search

The module, produced by Aidan Lister, allows you to add synonyms for search terms to the index so that, for example, people searching for “Holland” will see full search results which also include the (usually-synonymous term), “The Netherlands”.

Status: There are stable releases available for both Drupal 6 and Drupal 7.

Taxonomy add previous

The module, created by Joachim Noreiko, helps streamline the process of adding related or similar taxonomy terms by automatically populating the new term fields with the values used for the previous taxonomy term and provides a second link for this functionality next to the normal “add term” link. This could definitely be useful for certain use cases.

Status: There is an alpha release available for Drupal 7.

Views Dataviz

The module, developed by Jurriaan Roelofs, is a modern, HTML5-based data visualization system for providing charts from Views data, etc. Nicely done!

Status: There is an alpha release available for Drupal 7.

Views Rules

The module, is another contribution (like the Conditional Rules, above) by Jason Zhang of the Australian National University, which provides integration between Rules and Views. Getting into the particulars of using this module would be a separate article on its own, but it definitely looks cool!

Status: There is an alpha release available for Drupal 7.

Views Slideshow Liquid Carousel

The module, written by Jonathan DeLaigle of Advomatic, integrates the Liquid Carousel Javascript library into Views Slideshow, allowing you to provide fluid layout to a Views Slideshow, e.g. fluidly alter the number of thumbnail links visible as the window’s width changes. This looks slick!

Status: There is a beta release available for Drupal 7.

Jul 05 2012
Jul 05
New Spammer Registered

Rules is an especially useful Drupal module for all kinds of tasks. One use you might want to put it to is providing admin notifications of certain events on your site, e.g. user registrations and the creation of new comments and content by these “untrusted” users (assuming your use case allows them to create any content at all). I recently created such rules to help monitor the creation of users, content, and comments on drupal.cocomore.com/.de. Since we use the Project module (and supporting code) to host and track issues on some Drupal modules, we allow users to create accounts and “Issue” nodes. But there hasn’t been much recent change to the modules we host, so most of the “users” turn out to be spamming scumbags who post “issues” with links to questionable sites (you know the type). Since we allow anonymous users to comment on our blog posts, we also get our fair share of comment spam, but a tricky Captcha (we’re using Riddler, these days, to filter out visitors who don’t know or can’t take the time to search the answers to simple Drupal trivia questions) helps keep comment spam to a minimum. Keeping vigilant about stomping out spam is important since leaving spam published looks unprofessional and is bad for SEO… and since it also attracts more spam (spammers see that your site leaves spammy links in place); but of course it’s also important to keep an eye on the valid posts, too, and to respond to them in a timely fashion.

So we will assume that you have a site without a massive flow of new user registrations or new content and that you want to be alerted with some useful information whenever these events occur so that you can take appropriate action (block users and clean out the spam… or respond to valid content/comments). This article will lead you, step-by-step, through the creation of three different rules on both Drupal 6 and Drupal 7 -based sites, identifying particular set-up differences between these versions of Drupal/Rules. The three events we want to create Rules for are:

  1. New user registered
  2. New comment posted (by non-staff user or “untrusted” user)
  3. New content posted (again, by some kind of “untrusted” user)
In each case, we simply want to send an HTML email* to notify at least one member of staff (anyone with the admin role and, in the case of comments on blog posts, we want to also email the article’s author.) This article does not get into the various particulars of configuring your server to be able to send mail; there are a number of factors which might differ from server to server and it’s not really within the scope of a Drupal-related article.
*Note: This article also does not cover setting up HTML mail, but some modules, such as Mime Mail help make this a relatively pain-free process and provide a “send HTML mail” action for Rules. Adding specialized modules is probably not justifiable if you don’t plan to use HTML mail for anything more than admin notifications, but if you want to email users, such modules can help you create much more attractive and useful emails.

In every case, creating a new rule starts by going to the “add rule” page:
D6: admin/rules/trigger/add
D7: admin/config/workflow/rules/reaction/add

Notify admin when a new user registers

This is a simple rule which sends an HTML email with a link to a new user’s profile, along with their username. If you allow users to register themselves on your site, you will likely notice patterns that persistent spammers follow and be alert enough to just block the most suspicious user accounts before they even start spamming your site. I won’t specify the suspicious patterns I’ve been reacting to here (I don’t want to teach spammers how to be sneakier or more effective), but if you have a spam problem, you probably already know the patterns or will quickly recognize them.

*/

Adding a new rule to react to user registrations

The first step is virtually the same on both Drupal 6 and Drupal 7. Pick a name for the rule that you will not be confused by later, add tags (categories) if you have lots of rules, or plan to make lots, and select the event, “After saving a new user account” (“User account has been created” on Drupal 6).

Drupal 6 - Rules Event is a “new user account”Drupal 7 - Rules Event is a “new user account”

Click “Add action”

The “Add action” pre-step is also almost identical in Drupal 6 and Drupal 7 and we will skip over illustrating this in the following rules:

Drupal 6 - Rules “Add Action” buttonDrupal 7 - Rules “Add Action” button

Add action “Send mail” or “Send HTML mail”

In Drupal 6, the options for sending an HTML mail (provided you have Mime Mail installed) are separate from the rest of the “Send mail…” options. In Drupal 7 they all appear together in the “System” options. Either way, you can choose to send an email to an appropriate person or group of people. The “arbitrary email address” options can be useful if you want to send email to more than one person, regardless of their site roles. You could, for example, send a mail to the author of content that received a comment (using a “replacement pattern”, i.e. “token”) and/or to a particular person. More than one email address (or token substitute) can be added to recipient fields as long as the addresses are comma-separated.

drupal6-rules-send_html_mail.pngDrupal 7 option - Send HTML mail with Rules

Complete the email subject and body

The email “subject” and “body” fields can accept a variety of tokens or “replacement patterns”. In Drupal 7, these are apparently separate from “Tokens” provided by the Drupal contrib module, Token, which of course you also have installed; the Rules replacement patterns are available even if Token is missing or disabled, but in Drupal 6, you need the Token module enabled in order to have “replacement patterns” available for use.

Drupal 6 - Configure Rules message for new user registrations drupal7-configure-message-new-user-4.png

Download import code for this rule

Rules allows you to export and import rules from saved code, so I have attached an export of this rule. Even if you don’t want exactly the same action, this could be useful as a starting point for a new rule on your site. There are four versions of the import code attached, two each for Drupal 6 and Drupal 7 (for each version of Drupal, there is one version of the rule which uses HTML mail for the admin notification email, and one which just sends a plain mail.)

Troubleshooting

I suggest initially triggering a very simple rule to send a very simple email (to test that you get your message) and then build up the complexity a small step at a time, testing as you go.

AttachmentSize 1 KB 666 bytes 1.99 KB 2.76 KB
Jun 19 2012
Jun 19

It’s been a busy past several days in Barcelona (for the Drupal Developer Days) and most of us who’d been sprinting during the week before seemed to be in the same condition by Sunday—rapidly running out of energy from progressive sleep deprivation from an increasingly later return to our hotels. But it’s been an exciting week for Drupal core (and contrib) development and significant work has been completed on the Drupal core (mostly building up Drupal 8, but also some for added features in Drupal 7) while a lot of important decisions have been made which will likely shape development in a number of initiatives for the coming months until the sprints at DrupalCon Munich.

In addition to the Sprint I was primarily involved in (I was just trying to get my feet wet with assisting the Drupal 8 core development process by joining the multilingual sprint, but I did write my first committed core patch—admittedly this was a very basic patch), there were also sprints running for “Views in core”, Entity API, Media initiative, Mapping in Drupal 7, configuration management, abstracting social networking, search-related sprints, the Drupal.org upgrade… and possibly more still. I’ll cover some of the highlights of the week that I’m most knowledgeable about.

Multilingual Initiative

The multilingual initiative sprinted all week before the Developer Days sessions, and even continued through the weekend. And a lot of key decisions were made and important code changes committed and pushed to the central Drupal 8.x repository.

New user interface translation improvements in Drupal 8

This is something I got to do a bit with, but Swiss developer, Michael Schmid (Schnitzel on d.o), of Amazee Labs, was the primary developer working on this task during the Sprint. He and his colleague, Vasi Chindris, were among the stars of the week. It was a real privilege to get to look over their shoulders and to get Michael’s support when it came to using Git to manage code in the sandbox we were using for the issue. (Thank you, once again, Michael!) Once everyone was happy with the work, it got committed to core. This new sandbox workflow, used for larger issues, helps avoid a lot of bugs creeping into the main branch, as has happened during previous periods of intense core development. Of course the tests and test bots catch a lot of issues which could otherwise be major headaches for all concerned (automated testing was also a part of Drupal 7 development). If you recall, the long wait for Drupal 7’s release was due to hundreds of critical bugs. Now this should be a thing of the past since we have an established threshold for critical issues; and the core team only commit new patches to the central repository when we are below that threshold (15 “critical” bugs, 100 “major” bugs… among other thresholds specified).

New system for translating Drupal’s user interface

The new user interface translation system allows you to keep imported (community contributed) translations separate from customized translations and search for a particular translation within either or both categories as well as filter by translated strings, untranslated strings, or both. If you have any unsaved translations, they are highlighted to help remind you not to leave the page without saving them and there discussion about providing a dialogue to prevent a site admin from accidentally leaving the page with unsaved changes, too. There is also an issue to allow the string search to be non-case-sensitive (checkbox) to find more strings that contain a particular word or phrase, regardless of text case. Since this feature came up in discussion after the rest of the user-interface changes had already been made, we elected to put the discussion about adding this feature in a separate issue. If you have ideas for what might further improve the Drupal 8 user-interface translation workflow, your input is valued.Customized and imported (community) translations are stored separately

*/

New content language options

Drupal 8 has new language settings per content typeYou can enable translation for a particular content type and also choose to hide the language selector (automatically selecting the language for a new piece of content by any of a number of contextual rules). The automatically selected language for a new piece of content can be any particular language enabled on your site, “not specified”, “not applicable”, “multiple”, the “site’s default language”, the “current interface language”, or the “author’s preferred language”. While all these settings might arguably be a bit confusing for new users, they should help smooth the content creation and translation workflow for most sites. Of course the option to “enable translation” is hidden if the default language for the content type cannot be resolved to a single language (i.e. for “not specified”, “not applicable”, or “multiple”), since translation does not make sense here.

Translate the English UI to… English!

Drupal 8 — Enable English UI translationIn the edit preferences for the English language, you can enable translation to English and then it’s easy to change, for instance, the “Log out” link to “Sign out” (or “Disembark”, “Abandon ship”, “Terminate session” or anything else you might want on a particular site). Of course this could also be useful for fixing any oddities you find in the UI strings provided by contributed modules if you find a mistake in a field description, for instance, you don’t need to wait for a module developer to commit your patch or add a “site English” custom language just to modify a few strings.

Configuration Management related to Multilingual sites

Drupal core team leads and other sprinters discussed multilanguage configuration

One of the biggest issues of the week was determining how multilingual configuration would be handled in Drupal 8. The core team knew that they wanted to store language configuration in files rather than in the database, so that it’s easy to “push” new language configurations to an established site that already has content, among other benefits of this approach. But this brought with it a number of challenges which the Multilingual Initiative team, Configuration Management Initiative team, and other interested parties discussed in several sprint discussions through the week. Many of the standard configurations for a site might also differ, depending on the language: you might, for example, want a different site name or site slogan or logo for each language. There were three different proposals for how to handle multilingual configuration, and to keep a long story short, the final decision was to go with “Plan B” (or a minor variant, thereof). You can still lend your voice to the “review” process in the main issue for the language configuration system in Drupal 8. If you would like an overview of the plans, there is a nice graphic by Gábor Hojtsy (the Multilingual Team lead) which outlines the differences between the three proposals and some variants.

Drupal 8 Configuration Management

Greg Dunlap (“heyrocker” on drupal.org) presented the new configuration management

Angie Byron, aka “webchick” gave a quick overview of the configuration management initiatives goals, tooOne great session from the weekend was the Introduction to the Drupal 8 Configuration Managment System by Greg Dunlap (“heyrocker” on Drupal.org), the Configuration Management Initiative team lead. There has been some good progress in determining what this is going to look like, some of which took place during the sprints in Barcelona. Basically, this will be a bunch of smaller files stored within a logical directory structure in the sites/[…]/files directory. The new configuration system is currently planned to be YAML-based (rather than PHP or XML, which were used in earlier visualizations of the system). And the goal, as described by a slide in Angie Byron’s Sunday-morning keynote, “Drupal 8: What you need to know” is to be like “Features in core, only better”. The aim is to help us remove the complications involved in pushing configuration changes, modified in a development or staging environment, to a site that already has user-created content that we don’t want to lose. The main problem with the current system is that there is no consistent system: configuration settings are scattered across multiple tables, variables, files, and other locations and there is no consistent structure in any case. The idea is now to have a contexts, which Drupal responds to, when determining which configurations files to use.

Angela Byron (“webchick”) talks about the problems the new configuration management system aims to solve

What it should look like when loading a configuration from module code, is something like this:

  $config = config('image.style.large.yml';
  $config->get('effects.image_scale_480_480_1.data');

And when setting and saving configuration data:

  $config = config('system.performance');
  $config->set('cache', $form_state['values']['cache']);
  $config->save();

The YAML code for the image example, which saves configuration for the “large” image style would look something like this:

  name: large
  effects:
    image_scale_480_480_1:
      name: image_scale
      data:
          width: '480'
          height: '480'
          upscale: '1'
      weight: '0'
      ieid: image_scale_480_480_1

This should be pretty easy for developers and site builders to learn to work with and of course an interface is planned which should automatically build the configuration files, when edited by site builders. Configurations will be loaded into the “active store”. Changes are saved back to the active store and back to the YAML files so they can easily be moved between sites (staging and production sites, or completely different sites if they should have some settings in common). Building up an ideal import/export system for configurations is one of the major remaining hurdles. Update: heyrocker’s presentation slides are now available for download, so you can see other examples of Drupal 8 configuration.

Other Drupal 8 news

Twig library committed to core!

Drupal 8 now has Twig in the core/vendor directoryOne of the new developments which has received some press is that Twig, the templating system designed by Fabien Potencier, the innovator behind Symfony, which also bundles Twig, has now been added to the Drupal core repository.

However, the fact that the Twig library is in the repository does not mean that it’s ready for any kind of use yet, except for those who are working to build a new templating engine for Drupal, which uses it. How this works is still open to discussion; according to webchick, it may be that we keep both PHP-based and Twig-based templating engines to ease the pain of this change. On the other hand, while there is a learning curve involved, there are many advantages to Twig, especially in terms of security (removing PHP vulnerabilities from themes, altogether), and the saying that “the drop is always moving” applies here. It may be that Twig is the only templating engine which will be supported by Drupal 8, but if you feel strongly about this or have ideas for how to do this “right”, it’s a good time to get involved.Twig vs PHP template syntax

Context-based layout and blocks

Angela Byron lays out the plan for Drupal 8 layout with contexts

Everything in Drupal 8 will be a block or a layout area and blocks can have multiple contexts which determine their behavior (and whether or not they are displayed). This is going to be a major change which should produce much more flexible layouts and site designs. Of course this will touch on every major Drupal initiative: configuration, HTML5, mobile, multilingual… all are involved.

Drupal 8 will have clean, semantic HTML5 (and will abandon IE)!

Say goodbye to the messy nested div hell! Drupal 8 code is going to be much smaller and cleaner which will make designer/themer types love Drupal and make it possible to produce code that renders nicely, regardless of display size. Oh, and don’t worry about trying to support older versions of Internet Explorer; the community has decided it’s time to put that tiresome task to rest. Yay!

Drupal 8 development needs you!

Webchick, heyrocker, Gábor Hojtsy… all made the same point: As a community effort that’s still underway, the Drupal 8 effort needs more of the community at large to get involved and find ways to help out. There is a lot of complexity, but there will be smaller tasks that anyone could work on, so there’s going to be something for everyone. Even non-coders can help by testing, filing bug reports, helping manage the issue queues, making suggestions, documenting finished features and APIs. There are several places where you can get involved:

  • The core initiatives overview page provides information about when the different teams meet in IRC and in which channels among other information which can help people who want to find ways to get involved.
  • Drupal Ladder is a project aimed at helping more people learn how to contribute to Drupal
  • [ … ] (Comment below if you have other tips for where to get involved)

Big thanks to the organizers, sprint leads, and session speakers

The Drupal Developer Days in Barcelona were a big success because of all of you pulling together to make things happen. The local organizers made us all feel welcome and provided a lovely venue and took us out on the town just about every night. The sprint leaders helped find ways for everyone to play a part in building Drupal 8 or contributing in other ways, and the sessions were awesome.

Jun 11 2012
Jun 11
Modules of the month story banner illustration.

In May 2012, 150 new Drupal modules were released; this post provides an overview of some of the most promising modules including developer APIs, theming tools, configuration assistants, useful enhancements to other modules and much more.

Going through the list of new modules, I found it difficult, this time, to select the “most useful”. Of course what seems “useful” depends largely on ones use case, so what you find indispensable, I might I find useless today, and tomorrow I might decide it’s a vital part of my new project. With one exception, the selected modules should all be reasonably “ready for use” (i.e. they at least have a release of some kind) and are mostly modules I could imagine using, myself, even if I don’t have an immediate need for many of them. Some modules which were not included in this selection include several "third-party integration” modules, especially those for “commercial” services. And in contrast to the post made for the April’s “modules-of-the-month”, I have not attempted to sort the selection of modules by category, but instead have the list sorted alphabetically, by project name—the summaries include the categories used on the modules’ Drupal.org project descriptions (and reasonable categories have been added for a few modules which currently haven’t got any categories selected on drupal.org).

As with last time, I have not been able to personally test all of the modules, so don’t blame me if you enable one that looks promising… and it hoses your database.

*/ Addressfield Tokens

The module, by Andrew Marcus of New Signature, has already got over a hundred sites using it, so clearly this was an innovation that people had been waiting for. It’s a nifty extension to the Address Field module (so obviously depends on that) which also requires the Entity Token sub-module (part of the Entity API module). A token such as [addressfield:full] can be used to insert (in this example) a full, formatted address. It integrates well with MailChimp and Webform.

Status: There is a stable release available for Drupal 7.

Apache log4php integration

The module, by Erik Webb of Acquia, like most modules from Acquia, is complex enough that it’s not easy to summarize; that said, this module provides integration with the Apache log4php™ library to simplify the process of logging errors. It’s a “better watchdog” that uses a common-purpose library to log messages to a wide variety of backend logging systems with improved control compared to Drupal’s standard message logging (Watchdog) system. You obviously need to install the log4php library (using PEAR or the Libraries module)

Status: There is a dev release available for Drupal 7.

Article Templater

Categories: Content

The module, by John Youssef (JesoX), sounds like a great idea (caveat: I’ve yet to actually experiment with this). It provides savable structure for any content type body, including snippets, etc, so if you have a particular article format it can be easily inserted into your body field. It supports CKEditor and Wysiwyg.

Status: There is a dev release available for Drupal 7.

Block Conditional Visibility by URI Query Parameters

The module, written by Solomon Gifford, extends the normal controls for where a block is displayed to allow blocks to be shown (or hidden) if a particular query string is appended to the URL, e.g. https://example.com?referrer=google. Tres cool!

Status: There is a stable release available for Drupal 7.

Colorbox Node

The module, produced by Dennis Blake, allows you to display any page (minus header and footer) within a Colorbox modal. Despite the word “node” in the module name, it supports user pages, Views pages, Webforms, and more.

Status: There is a stable release available for Drupal 7.

Commerce Fancy Attributes The example color selector for Commerce Fancy Attributes

The module, developed by Julien Dubois and Bojan Živanović of Commerce Guys, provides a Javascript-enabled way to change the boring, ugly radio button set into a prettier selector. The example use case is a color selector used on a product’s “add to cart” form with nice color swatches to click rather than labeled radio buttons. But if Javascript is disabled, it gracefully degrades to normal radio buttons. Nice!

Status: There is a beta release available for Drupal 7.

Compass: Commerce Dashboard & Analytics Compass is my effort to turn Drupal Commerce data into comprehensible information.

The module, authored by Jurriaan Roelofs, provides nice visualizations in the form of graphs and charts of your Drupal commerce data using interactive HTML5/VML Google Charts with views integration. It has a long list of dependencies, but most of these will already be in use on a complex Drupal Commerce-enabled site.

Status: There is a alpha release available for Drupal 7.

Cookie Log

The module, produced by PK Vaish of Livelink New Media, provides a simple record of all cookies set by your site so that you can better audit cookies for compliance with the new EU “cookie law”.

Status: There is a stable release available for Drupal 7.

Corresponding Entity References As this is the next evolution of Corresponding Node References, I would like to say thanks for all the work done over on Corresponding Node References. This is almost a direct upgrade from CNR to include handling of entities.

The module, by Chris Hertzog of CODEwork Designs, allows two entity types to have references to each other which are automatically automatically updated if changed in one of the entity instances.

Status: There is a dev release available for Drupal 7.

Create-editor The development has just started and the module is not yet usable, we are just testing the concept and a complete rewrite will probably occur once we know how to deal with everything. All help is welcome.

The module, written by Finish developers Roni Kantis of Soprano Brain Alliance and Riku Virta, the front-end developer of the actual Create library, is the only project listed here which does not yet have any kind of usable release. Despite not yet being usable and being in the early stages of development, the goals of this project are so impressive and worthy of continued interest, that I felt it deserved mention. Create, from the Midgard Project allows you to integrate the browsing and content editing user experience to allow editing without going into a “content administration” form. So you can easily change content directly on a page and submit changes back to the server. I’ll certainly be keeping an eye on this.

Status: There is no real release available yet (but you can download the current state of the project as a development snapshot or check out the project with Git).

Data Visualization Wizard

The module, written by Jason Hoekstra of the U.S. Department of Education, has a goal to simplify and streamline the process of creating complex data visualizations in Drupal.

[…]Views, OpenLayers, Charts and Graphs and others provided a quick way to show data online without custom programming, but became a maintenance burden in the long run, often taking 8-32 hours to create a new visualization. For this reason, we distilled the best practices from these patterns into a single module. The end goal is to lower the technical complexity required to create new visualizations and decrease the time required to do so.

Status: There is a beta release available for Drupal 6.

Entity Reference Count

The module, written by Pablo Cerda of BlueSpark Labs, is an entity-based adaptation of the Nodereference Count module, which allows you to add an automatically-calculated field to any entity which will display a value for the number of other entities which reference it.

Status: There is a dev release available for Drupal 7.

Exclusive Value

The module, by Robert Castelo of Code Positive, is a module which provides a basic checkbox field (boolean setting) which can be enabled for any one node to make it the featured node. When the checkbox is set on one node, it is unset for all others (only one node is featured with this setting). While this might not be useful on every Drupal site, I can certainly think of situations where I would definitely make use of this simple module.

Status: There are stable releases available for both Drupal 6 and Drupal 7.

Fallback language negotiation Change the Default language without changing the default language by using a other language as fallback.

The module, coded by German Drupal developers, Florian Weber of [di] digitale informationssysteme gmbh and Dennis Brücke, has a funny description (see quote to right). I’ve not had a need for it yet, but I’m sure it’s useful for some situations.

Status: There is a dev release available for Drupal 7.

Google Viewer file formatter

The module, by Janez Urevc of Delo, integrates the Google doc viewer to display a number of different document types (.pdf, .doc, .docx, .xls, .xlsx, .ppt, etc). It requires enabling the File entity module.

Status: There is a stable release available for Drupal 7.

LimeSurvey Sync

The module, contributed by Julien Duteil , provides integration of LimeSurvey results into a Drupal site.

Status: There are stable releases available for both Drupal 6 and Drupal 7.

Log Em Out

The module, from Minnur Yunusov of Urban Insight, prevents multiple concurrent sessions from different IPs on the same user account by automatically logging out any previous connection if a user logs in from a different IP. For membership sites this could help prevent sharing of accounts and it should also help ensure security. In permissions, you can select which roles this behavior is applied to.

Status: There is a stable release available for Drupal 7.

Lorempixel

The module, contributed by Fredric Bergström of NodeOne, brings improved “placeholder image” creation to Drupal by accessing free images on lorempixel.com, which can be “generated” at any image size needed. It integrates with Devel generate, but can also be used to add an image as a file entity.

Status: There is a dev release available for Drupal 7.

Node Field

Categories: Fields

The module, contributed by Alexander of ADCI, LLC, allows you to add unique extra fields to individual Drupal nodes without needing to add the fields to the content type. This provides a lot of flexibility and helps prevent excessive “field clutter” or the need for more content types.

Status: There is a stable release available for Drupal 7.

Node View Permissions

The module, was (like Node Field) also developed by Alexander of ADCI, LLC, provides Drupal 7 with the permissions: "View own content" and "View any content" for each content type, just as it was in Drupal 6. This could be especially useful for D6 sites which made special use of these permissions and now need to be upgraded to Drupal 7.

Status: There is a stable release available for Drupal 7.

OG Extras

The module, contributed by one of the Drupal community’s superstars, Karen Stevenson, is a set of “extras” for Organic Groups. It’s especially useful for sites which don’t use Panels since it provides Views and Blocks for Organic Groups which don’t depend on Panels.

Status: There is a stable release available for Drupal 7.

Panels Frame

The module, written by Helior Colorado of Commerce Guys, gives Panels users a simpler way to build new complex layouts by stacking existing Panels layouts. Cool!

Status: There is a alpha release available for Drupal 7.

Pathauto i18n Taxonomy

The module, by Marco Kleine-Albers, provides i18n tokens for taxonomy paths in Pathauto so users get paths in their own language. Of course this is also good for SEO.

Status: There is a beta release available for Drupal 7.

Popcorn.js

The module, written by Kevin Reynen of makedatamakesense, integrates the cool media viewer, Popcorn.js, which includes support for YouTube and Vimeo as well as other interesting HTML5 applications.

Status: There is a dev release available for Drupal 7.

Portable path

is a module, from the great Jim Berry, which helps make it easier to move a site from a development/staging domain to “production”.

After a review of existing input filters and related modules, none seemed to do this. Some remove the domain portion of the path, making the path portable in certain contexts but not across all use cases. But none finished the job by replacing the file structure path. If someone is aware of a module doing what this does, let me know.

Status: There is a dev release available for Drupal 7.

Reviews

The module, written by Scot Hubbard of Base One Ltd, simplifies adding reviews to site content. Reviews can be configured per content type. For those of us who have had to jump through hoops using the Voting API paired with node references and creation of a “review” content type, this is definitely a breath of fresh air and I am betting the Reviews modules will quickly grow in popularity!

Status: There is a stable release available for Drupal 7.

Role Delay

The module, created by World Fallz, allows a Drupal site to automatically promote a user from a basic “Authenticated user” role (which might not have many permissions at all) to a more trusted role after a period of time and then further promote their permissions (role) after another period of time.

Status: There are stable releases available for both Drupal 6 and Drupal 7.

Save Form State

Categories: Content

The module, coded by John Youssef of JesoX, provides “autosave” functionality in Drupal forms. Woohoo! You’ll need to add some additional jQuery libraries and do a bit of configuration, but this definitely does look promising.

Status: There are dev releases available for both Drupal 6 and Drupal 7.

TagCanvas tagcanvas.png

The module, written by Chin Kiong Ng of MyFineJob.com, integrates the TagCanvas library, which uses the HTML5 Canvas to build one of those fancy new 3D animated tag clouds, similar to what Cumulus does, but without using Flash (thank God!). It depends on the Tagadelic module, used by over 30,000 Drupal sites and I can only imagine that TagCanvas could quickly gain thousands of installations.

Status: There is a stable release available for Drupal 7.

Template Field Variables This is a utility module for themers. Its only purpose is to make Drupal template development less painful. It has no front-end. It stores no data. It implements no hooks.

Categories:

The module, by Jeremy Epstein, is a nifty new theming tool which takes the pain out of theming fieldable entities. Variables hidden in the massive nested arrays are moved into simple variables. It works on all core content types and fields as well as many fields and content types provided by the most popular contributed modules (link, email, date, reference, etc). This should make theming a bit less headache and a bit more fun. Yay!

Status: There is a stable release available for Drupal 7.

Tooltip Field Formatter

Categories:

The module, developed by Marc van Gend, uses BeautyTips to provide a nice display of field contents when you mouse over an appropriate icon or other trigger. Nicely done, Marc!

Status: There is a beta release available for Drupal 7.

Users Export

The module, created by Aaron Klump of In the Loft Studios, is a lean module with basic features for exporting common fields from the user table into common formats (e.g. CSV). It has an API which developers can use to extend the set of fields that it can export.

Status: There is a stable release available for Drupal 7.

Views iCal

The module, developed by Max Rakhimov, allows you to create iCal feeds of events from Views, simply and easily.

Status: There is a beta release available for Drupal 7.

Workbench Moderation Notes

Categories: Utility

The module, by Kevin Miller of Cal State Monterey Bay, provides a “Notes” field to display comments attached to changes in the moderation state of content revisions managed by Workbench Moderation; it improves communication in the editorial workflow process.

Status: There is a dev release available for Drupal 7.

Xtools

The module, by Bart Feenstra, is yet another module for to help developers test the modules they are writing. It allows developers to create “blueprints” against which input and output is checked. I look forward to see how this develops and to giving it a go.

Status: There is a dev release available for Drupal 7.

Jun 04 2012
Jun 04

It’s considered “best practice”, if a module creates any variables, to delete those variables in the module’s uninstall function. Before Drupal 7, this was done in a call to db_query(). But with the “new” DBTNG (Drupal 7 Database API), using db_query() is no longer recommended. See the documentation for db_query():

Do not use this function for INSERT, UPDATE, or DELETE queries. Those should be handled via db_insert(), db_update() and db_delete() respectively.

However, browsing through (a relatively small set of) Drupal modules I have for my local Drupal 7 installations, I still see a number of modules which are using db_query to delete variables, typically something like this:

<?php
  db_query
("DELETE FROM {variable} WHERE name LIKE 'some_module_%'");
?>

Let’s rewrite this fictional module’s call to db_query() to instead use db_delete():

<?php
  db_delete
('variable')
    ->
condition('name', "some_module_%", "LIKE")
    ->
execute();
?>

But there is another problem with this code. Which is? That’s right… it uses a wildcard that might apply to another module’s variables. What if someone else writes a “some_module_extended”, “some_module_plus”, or “some_module_rethunk”*? Then our db_delete() function call will delete variables from those modules, too. This is not at all a stretch of the imagination with modules that provide an API or which are widely used and might get forked. So what is better practice? Well, of course if your code is aware of the names of all your variables, you could easily loop through an array to remove them. Or, if your module dynamically creates variables based on user input, you could store the names of these user-created variables in another variable, then do the looping. Or, of course, you could also create your own table to store your module’s “variables” and that table would automatically be dropped whenever your module is uninstalled.

Another point worth bearing in mind—I don’t see all modules taking care of this—is that when you delete variables it is good to also clear the variable cache. Only some of the modules which delete variables using db_delete() seem to remember this:

<?php
  cache_clear_all
('variables', 'cache_bootstrap');
?>

But the best practice is to use variable_del()

Of course you would be best off looping through all your variable names using variable_del(), which also automatically clears the variable cache. If you know the names of all your variables (or can store them as dynamic variables are created), this would most certainly be “best practice”. It will also remove the deleted variable from the global $conf array.

Updated:

To clarify and correct code, as suggested in comments, below.

* The former English (as a foreign language) trainer in me requires me to add the following caveat: 'thunk' is not a word in proper English (nor is 'rethunk'), but Oxford English Dictionary defines it: “informal or humorous past and past participle of think” : : who would've thunk it? (Just so's yah knows I ain't totally illegiterate. ;-) )

May 02 2012
May 02

April 2012 delivered a fresh batch of promising and useful-looking new contributed modules to the Drupal world. Perhaps because the immediately-preceding DrupalCon gave developers some time to collaborate and work on their contributions more than they normally might, this month seems to have a notable number of interesting new projects, especially considering the relatively “mature” state of Drupal 7 at this point. To help keep abreast of some of the most interesting new developments we have planned a monthly article to showcase these new modules; this is the first edition of our “Modules of the Month”. At this point in the release cycle, newly released modules are mostly only being released for Drupal 7, but a few have also been released for Drupal 6 as well; where Drupal versions are not mentioned, you should assume the module is only for Drupal 7.

Caveat: I have tested some, but not all of these modules. Be especially careful if you choose to use any of the “pre-stable” releases on production sites. I should also note that some other awesome modules released in April may not be included—I did my best to select the modules I’d be most likely to use, but there are some “special use case” modules which were not covered, but which might be very useful for some sites. The 30-something modules included here have been sorted into very loose categories.

3rd Party Integration / Social Media

Twitter Follow Block

The Twitter follow block

The Twitter Follow Block module, by Pradeep Saran, provides a nicely styled box to show your Twitter link and followers in a jQuery-loaded block that can be placed in any region of your theme. You can configure the dimensions of the block (and thus, the number of “follower thumbnails” displayed) and you can choose from different color schemes to better match your current theme. It currently only displays the Twitter feed for one Twitter user, but what might be an interesting development would be a way to dynamically load the Twitter username (e.g. from a Profile field) so that the Twitter follow block would link to different users (based on the author of content currently viewed or the profile page being viewed, if applicable). The module is currently available as a “stable” 7.x-1.0 release and I look forward to seeing this get further developed.

Social Buttons

The Social Buttons module by Linnovate’s Raz Konforti, provides a field that can be added and configured for any content type (or any fieldable entity) and includes default button code for Facebook, LinkedIn, Twitter and Google+, but you can also easily add new buttons. Since it’s a field, you can also determine where and whether it is shown for each display (node view, teaser, RSS, etc). It has a 7.x-1.0-beta2 release as well as more recent commits to the developer branch.

Content Access Control

Hidden Nodes

The Hidden Nodes module, created by Bryan Ollendyke of Penn State University, helps allow staff to hide nodes from regular visitors while still allowing users with “staff” permissions (admin or author/editor -type roles) to see the content in the menu as it will appear when the content is finished. This helps get around the issues caused by the “black-and-white” absoluteness of published/unpublished status (and only being able to access content through the “administer content” system). It was created to integrate well with the Outline Designer module, another project sponsored by Penn State. Hidden Nodes has recently had its fourth beta release and is certainly an interesting project for streamlining team-based content workflows.

Restrict node page view

The Restrict node page view module, authored by Christian Johansson of Sweden’s Kodamera AB, helps prevent users from viewing content outside of its intended context. The example use case for this module involves a requirement to prevent users from directly viewing Views slideshow nodes (via their node/xxx paths), but of course there could be other content you want to restrict access to but still have its information available in a Views display, so direct access to the node by most roles can easily be blocked with this module. The initial release is shown as “stable”, and it’s simple enough, so may never require any fixes or updates. That said, I do hope that they modify the module so that full-node access is only restricted to selected node types (i.e. blacklist). It currently adds a set of permissions for all node types, which defaults to no view access for all roles and content types, which would be a pain on sites with lots of roles and content types, especially if the goal is only to restrict non-staff access to one limited node type out of many.

The permissions created by the Restrict Node Page Access module.

Node access book

The Node access book module, by the prolific danielb, is a content access module which allows access settings placed on a parent “book” page to apply to all child pages of that book; or, similarly, if content includes a reference to another node to which they have access. It makes it easy to change access to a whole Drupal “book”, according to roles. The module is still new and very experimental, so you should use it with caution; at this time the only release is a development snapshot.

Theme Enhancements

Content Theme Code

The Content Theme Code module, developed by Josh Lind, helps with performance by only delivering JS and CSS from your theme if you are on a content type or node which requires it. This makes absolute sense to me as I was originally baffled when looking at the code of Drupal-delivered pages, wondering why so much CSS and Javascript that was only used on limited parts of a site was part of what was loaded for any other page. Streamlining content delivery is especially important in these days of increasing need for mobile support, with slower and more expensive bandwidth. I understand this functionality is planned for Drupal 8, but until then, we should consider modules like this to help lighten the load on the server and improve the for users on lower-bandwidth devices. There is currently a stable release for Drupal 6 and a release candidate for Drupal 7.

Autoload JS

The Autoload JS module, authored by Justin Dodge, provides for particular JS files to be loaded according to their filenames. Labels added to the Javascript filenames or used in the path (directory names within your theme folder) can determine JS to be loaded on blog pages, your site’s front page, all pages, etc. For example, the file found at sites/all/mytheme/js/nodetype--blog.js would automatically be loaded only for page loads for the “blog” content type. A “stable” 7.x-1.0 version was released in mid-April.

Twig template engine

The Drupal Twig template engine module, by Steve Mokris integrates the Twig PHP template engine, an exciting, new-generation template system for PHP which is faster, more secure, extensible, and uses compact code which is easy to read and to learn. Twig is another awesome innovation from Fabien Potencier, the creator of the Symfony framework (of particular interest since Drupal 8 will incorporate a number of key Symfony components). It has a stable 7.x-1.0 release and should be worth experimenting with and keeping an eye on.

Fields

Field Extractor

The Field Extractor module, by Commerce Guys’ Bojan Živanović, allows you to easily get information from a referenced entity (e.g. within a Views display). This looks very useful and I look forward to seeing a “stable” release (the module is currently only available as a “developer snapshot”).

Hierarchical Term Formatter

The Hierarchical Term Formatter module, by Hannes Lilljequist, provides additional formatting options for a term reference so that you can display its hierarchy (on, for example, a node display), with “parent > child” rather than simply “child”. It provides a number of options to control the levels of hierarchy displayed, the markup used for display, and whether or not the terms are linked to “term pages” and at this time is available in with an “alpha” release for Drupal 7.

Token formatters

The Token formatters module, by super-contributor Dave Reid, enhances your control over how fields are output, by providing token support for field display formatting. This module has a beta release available for Drupal 7.

Google Map Field

The Google Map field module, by Scot Hubbard, provides a simple way to add maps to any fieldable entity with a relatively light-weight system compared to Location/GMap -type implementations. The location and zoom level for each map is independently selectable, directly from a map. It also provides an option to add the map within your Wysiwyg content by providing a simple map selection button (which inserts a custom token) that can be enabled for your editor; so you could potentially have several maps displayed within, e.g., a blog post. There are a few rough edges, but this looks like a promising way to embed maps, directly within content, without all the overhead of using other methods.

Search

Defacto

The Defacto module, by Acquia’s Christian Yates, extends ApacheSolr search to provide biasing on content which has been tagged (using a specific taxonomy reference field) with a particular term, e.g. searches for that term will be biased in favor of content tagged with the term. You can also mark specific content as the “canonical” (default) result for a search on a particular term to push the content to the top of the search results. This is a very new module, which currently only has a developer snapshot available, but it does look promising.

Administration and Content Management

Content Menu

The Content Menu module, by Wunderkraut’s Daniel Nolde (also the local “sitebuilding” track chair for the upcoming DrupalCon Munich), provides a system to streamline the process of working on menus and the associated content in one simple interface to make “building a structure-oriented website [ … ] effortless and intuitive”. Getting into the specifics of how this works is outside the scope of this article and since it’s also currently only available as a developer snapshot I will only say that this module looks very worthy of notice.

UUID Redirect

The UUID Redirect module, by David Rothstein, sounds like a very useful module for a rather complex use case: If you use the Deployment module to stage content to your production site, and use the Universally Unique ID module, UUID Redirect allows you to configure administrative “edit” links on the “production” site to link to your “content staging” site’s edit page so that certain content types (or any other entities) are only ever edited on the non-public-facing server. This module currently only has a 7.x-1.0-alpha1 release.

UUID Entity Autocomplete, Context UUID, and UUID Link (three related modules)

The UUID Entity Autocomplete module, by Dave Hall, provides a simple autocomplete/lookup field for Universally Unique IDs. It is a dependency of Context UUID, also recently released by Dave Hall, a module that “provides a context condition so reactions can be based on a collection of entity UUID—so they remain consistent between environments” (of course it also depends on Context and UUID and would normally be used in a situation where the Deployment module is used to stage content between “administrative” and “live” servers.) Finally, the UUID Link module, also by Dave Hall, provides a link field based on a UUID, which means that links won’t break when content is deployed to a “live” server. At present, all three of these modules have 7.x-1.0-beta1 releases.

Views

Views arg parent term

The Views arg parent term module, by David Langarica Lorenzo, provides a simple Views plugin which allows you to access a parent taxonomy term in order to display more “related content” than might be shown through the child term. It currently has a “stable” 1.0 release for Drupal 7.

Views argument cache

The Views argument cache module, by Mike Stefanello, allows administrators to configure individual caches for each argument in a Views display so that you only need to clear a particular argument’s sub-cache when relevant content has been added. This should help boost your site’s performance, especially for sites with a lot of content displayed with argument-enabled Views.

Content/Filters/Editors/Multilingual

Link Title

The Link Title module, by Rolf Meijer, is a text filter which can be enabled to add a “title attribute” to any link created which does not include a title, e.g. those automatically generated by the “convert URLs” filter. The added title attribute is taken from the HTML header of the linked resource. It currently has a “stable” 7.x-1.1 release.

Context Set Message

The Context set message module, by RJ Pittman of Phase2, allows your site to display a user message based on the current context. It supports a variety of tokens for more dynamic messages and depends on the Context module. The current release is only in an “alpha” stage, but this looks like a promising and useful module.

Media Gallery Extra

The Media Gallery Extra module, by Sergio Martín Morillas, extends the Media Gallery module (surprise, surprise!) to provide a number of extra useful features. There is only a development snapshot available at this time, but the features which have already been implemented look like a great start and we can only hope to see the planned features and roadmap implemented without issue. If you are planning to use the Media Gallery module to display images or videos on a new website, you might want to keep an eye on development here.

Internationalization contributions

The Internationalization contributions module, by Jose Reyero (who also happens to be the primary committer to the Internationization module) provides additional sub-modules which can be enabled to provide extra i18n functionality, e.g. synchronizing node references across different translations of content and adding "hreflang" attributes. It’s still a development module and likely will remain that way (presumably this module is a place to experiment with new features before rolling them into the main i18n module.) But if you have urgent need for these features, the new submodules could be stable enough for use, provided you carefully check them out, beforehand.

Performance

pjax for Drupal

The pjax for Drupal module, by Hannes Lilljequist, uses jQuery’s pjax library to load new content into a browser window without fully redrawing the page. It correctly updates the page title and URL path and loads any new content with a smooth process, lessening load on the server and lowering bandwidth that need be transferred, so is especially useful for delivery to limited-bandwidth mobile devices. The module is still only in a “development” state, and has a number of limitations which you should examine before use, but I think you will agree that there are some cool ideas going into this development and it is worth watching.

Variables that suck less

The Variables that suck less module, by beejeebus, is partially described with the caveat: “This module requires a core patch, and can break your site and eat your lunch.” That said, if you need to resolve some site-crashing variable cache-clearing behavior and boost performance, and don’t mind “killing kittens” in the process, this module might be helpful. It’s currently got a 7.x-1.0-beta3 release.

Fast Private Downloads

The Fast Private Downloads module, by beejeebus, provides a Node.js -enabled method to improve the performance of private downloads in Drupal. It’s still in an “alpha” development state for Drupal 7, but looks interesting, especially if you already have Node.js set up on your server for other features.

Other

jReject

The jReject module, by Domenic Santangelo, allows a site to present a “your browser is out of date” message with download links for recommended browser versions if a user visits using an older browser version. Most such modules simply target Internet Explorer, but this module allows you to recommend a newer version of any browser which has older versions that might not support the cool features your site includes. It has a stable 7.x-1.0 release.

env

The env project (not actually a “module”, per se), sponsored by NPR and authored by Irakli Nadareishvili, improves the ease of creating a portable environment-dependent set of configurations for Drupal so that you can easily have multiple configurations for dev, staging, and production sites, etc. Be sure to read the installation instructions, since this is not installed the same as “other modules” and requires changes to your settings.php file and additions to your sites/default directory.

Genova

The Genova project, by blueMinds, is not an actual module; it’s a Drush utility which helps developers provide a “stub” for the creation of new modules, creating basic files, implementing hooks, database schemas, etc. The aim is to streamline all the boring, repetitive aspects of creating a new module to allow developers to focus on the important logic. It’s still only available as a development snapshot, but what’s been implemented and what’s planned provide enough hints of coming awesomeness that we should plan to keep an eye on this.

Subs

The Subs module, by Alex Weber, helps create subscription services to a website’s “premium content” with a broad range of features (e.g. useful subscription duration preset defaults, integration with Devel, Drush, Features, Rules and Views, automatic expiration of subscriptions, grace periods, etc.) Its only dependency is the Entity API (integration with aforementioned modules would obviously require having those available and active, too). If you are planning to build a paid-subscription service-based site this module could be exactly what you are looking for to streamline some of the involved business logic. The current version is a 7.x-1.0-beta2 release.

Apr 20 2012
Apr 20

How do I allow a user to create other users?

It’s a pretty common use case which requires a non-admin user role that can create other users for a Drupal site and I’ve frequently seen questions about how to best implement this. I recently also saw the suggestion to simply create a role with the 'Administer users' permission. At first blush, it might seem to work; if that’s the only “administer” permission they have, users with this role can only create basic users with the role “Authenticated user”, they cannot edit the user to add any other roles or upgrade their own role directly. In limited situations, this might even be appropriate.

Drupal’s “administer users” permissionUsers with the administer users permission can edit any other user on admin/people

What might not be immediately apparent, however, is that a user with this permission can edit any other user’s account… and I do mean any. This means that, if their intentions are not pure, a user with this role could easily change the password (or any other fields) on a more privileged user, even user/1, and then log into that account. Once they’ve done that, there is really no limit to what they could do to your site. Even if they have no means to add modules, ones which might be used for particularly nefarious purposes, if you have a module like Backup and migrate available, they could download your database with all sensitive user data; and even if this module is not available to them, you most likely have Views, which they could also use to harvest all user email addresses or other private data fields. And then they could easily cover their tracks, too. If they don’t do anything obvious (like deface your site or start sending spam from it), and only change the password on the admin account, you might be puzzled by why you cannot log in with your normal password, and follow the normal procedure to reset your forgotten password, then forget all about it. Meanwhile, your “user moderator” has collected lots of sensitive data from your site and still has the means to do it again one day.

There’s a module (or a few) for that!

Depending on your actual use case, which might include requirements a bit more complex than just creation of a basic “Authenticated user”, there are a number of modules which might be useful for a “user moderator” role. Some of these modules do nothing about actual creation of users, after all, probably most Drupal sites allow users to just register themselves, but deal with the related need to delegate the responsibility of giving some users additional roles beyond the “Authenticated user” role. But for sites which don’t provide self-registration, there are a couple of modules which allow non-Administrators to create new users, as well.

  • Role Delegation is one of the most popular such modules, used by over 8000 sites with stable releases for both Drupal 6 and Drupal 7, but it’s limited to role assignment and does not allow users without additional permissions to actually create new users.
  • Administer Users by Role has stable releases for Drupal 5 and Drupal 6 and allows users of a particular role to create, edit, and delete other users. In theory, it should provide limits to the “administer users” permission by allowing them to administer users with roles that you select. There is no version for Drupal 7 yet available, but a port is in progress. It’s a fairly popular module with about 2,500 users.
  • RoleAssign is a module with a stable release for Drupal 6 and a “release candidate” for Drupal 7 and is used by about 2,800 sites. It allows users with appropriate permissions to assign pre-defined roles to other users.
  • Subuser is a module available for Drupal 6 (stable) and Drupal 7 (currently in -alpha2). It is, perhaps, the most advanced and interesting of these modules, although it is not used by the most sites (currently only 282 sites). It allows for a user to be given permission to create users which that user then has permission to manage. Users not created by this “parent” user are not available for management. “Child” users can be given any of the roles which the “parent” is allowed to assign, and the role assignment can be automatic. In other words, an “editor” might create “author” users or a primary “site moderator” might create “forum moderator” users, etc. I think this module shows a lot of promise, especially since it’s written and maintained by the highly esteemed boombatower, a true “Drupal rockstar”.
  • User Creator is a module which will not be ported to Drupal 7 (they suggest using the aforementioned Subuser module). It allows users with particular roles to create other users with particular role limitations. The example is provided that, for a school website, a “Principal” could create other users with the roles “Teacher” or “Student” and a Teacher could create only “Student” accounts. Site administrators can determine which roles are allowed to create accounts for which other roles.
  • Control Access to User Settings is a module which seeks to increase the granularity for the “administer users” permission, so that user settings and user administration are separated under this permission and a site administrator can assign just a part of this permission. It has a “stable” release for Drupal 6 and a development snapshot for Drupal 7.

In short: Beware of granting excessive permissions

Be very careful (and generally avoid) granting any kind of “administer” permissions to non-Admin-role users. This article should make it clear that the “administer users” permission is one that could lead to disastrous results if given to the wrong user. While it might even be appropriate to give this permission to a very trusted “admin helper” (e.g. if you want to hide some of Drupal’s administration complexity from your partner—so want to give them some admin permissions—to avoid having them be overwhelmed by the full admin interface), you must absolutely trust such a user not to do anything to abuse the power. And then, it’s probably still best to use one of the appropriate modules, just in case you might forget and grant the same role to someone you trust less than your partner, just to allow this other person to add some new user accounts.

Hopes for the future of Drupal

As I see it, something like the Subuser modules could well be a part of Drupal core. There is almost no reason for any non-admin user to be granted the full power of “administer users”, but there are many reasons you might want to allow for a role that can at least create users and provide limited management of other users (with fewer permissions than their own). I believe some degree of this functionality would be a good thing to include in Drupal core and hope to see that in the future.

Mar 30 2012
Ela
Mar 30

We have a major upcoming project here at Cocomore which is in the initial planning phase. It’s too early to provide the finer details of the project, but it involves creating a product database for a large publishing house and Drupal 7 has been chosen as the project framework. By mid-June, we will likely have four developers working on it, full-time. Of course, anyone who deals with software development almost certainly knows the problems that tend to occur during the planning of large-scale, long-term projects like this one: in the beginning, the client is often not yet 100% certain of their needs or desired end results, so new requirements and ideas arise in the middle of project development. This means that projects built to the initial specifications often fail to completely meet the client’s needs, which can be disappointing for everyone involved.

Hoping to avoid this scenario, we (our software development team, and project and senior management) proposed implementing the project using Scrum. This allows us to flexibly respond to changes in requirements and keeps the customer closely tied to the project development process so we can avoid unpleasant surprises at the end of development. At a recent Cocomore “KnowledgeLab”, I presented a brief overview of Scrum methodology, a topic which is certainly too broad to cover, in-depth, in an hour-long presentation. So I limited the scope of my presentation to the most essential elements of the Scrum process: roles, events, and artifacts; then used Lego Scrum to try to better illustrate the model. This article provides an overview of the same basic concepts covered in our workshop session and describes how I helped immerse team members who had not previously worked with Scrum in the concepts and processes. We have been using Scrum for other “ambitious” Drupal projects and plan to provide in-depth case studies for some of them, with details about more specifics related to Drupal; this article provides a general foundation for understanding these upcoming case studies.

Scrum: a process model for agile software development

Agile software development is characterized primarily by an iterative procedure with alternating planning and development phases. The advantage this provides is that parts of the system are developed early on and can be tested before implementation of other parts. This reduces the risk that project development heads in the wrong direction. Rather, responding quickly and flexibly to changes in the requirements, the components of a system can be redefined to best meet a client’s real needs.

agile_workflow_with-url_03.png

The background of Scrum

The term “Scrum” originally comes from the sport of rugby and means “crowd”. Team-members work closely in a circular pack while their opponents try to prevent them from gaining ground. To the casual viewer, this may look merely like a disorganized shoving match, but it is based on a strict set of tactical rules and involves strategy and planning. The comparison is quite appropriate, because, as in rugby, in this form of development there is a team of players who stick together and adhere strictly to a few, well-defined rules. In general, the team plays the main role in Scrum. Unlike the classical approach to software development defined in the waterfall model, the team estimates how long it will take to implement the tasks requested by the product owner and decides which tasks can be accomplished during the timeframe of a sprint.

“Roles” in the Scrum process

Similar roles exist in Scrum. In addition to external roles such as “customer”, “manager”, and “user”, there are three primary roles involved in Scrum: the “Product Owner”, “ScrumMaster”, and “Development Team”:

  • The “Product Owner” provides the team with a vision for the product that must be developed. She is in close contact with the customer. This role defines the product’s features and prioritizes them. After each sprint, she is responsible for accepting or rejecting the functionality delivered by the Team.
  • The “Development Team” builds the product’s functionality, as requested by the Product Owner. It is responsible for compliance with an agreed set of quality standards for each component and jointly determines the required duration needed to implement each task. The Team also determines how many features it can deliver in a sprint.
  • The “ScrumMaster” assists in the implementation of the Sprint’s goals. In order to do so, the ScrumMaster does not actually participate in the development process, nor does she influence the team’s decisions. Rather, she helps eliminate problems which hinder the team’s productivity and aids in guiding the sprint to ensure that the Scrum process is followed.

Meetings & “Artifacts” in the Scrum process

Before development begins, the Scrum Team commits the Definition of Done (DoD), in short, they decide, in advance, what will determine whether a feature has been completed, to specification. The Product Owner defines the tasks necessary to achieve the desired objective. These tasks are included in the “product backlog”. Ideally, these backlog items are defined with the help of “user stories”, with requirements which are are user-oriented rather than technology-oriented. For each user story, there should be at least one “user-acceptance test”. This not only helps during the development process, but also during the sprint review for accepting delivered functionality.

Backlog items in a Drupal-based project might typically involve tasks to assess which goals will entail new content types, whether existing “contrib” modules will satisfy elements of the use case, etc. The acceptance criteria might contain what fields these content types will need, how forms have to be validated, what happens after a submission, etc. The DOD might then involve adding modules to the project repository, configuring modules and content types with a Feature or installation profile, following the Drupal Coding standards, applying tests, etc. Of course some backlog items will often require custom modules, some of which might be ideal candidates for a Product Owner to sponsor as a new contribution to the Drupal community, the benefits to the Product Owner including likelihood of community involvement leading to functional improvements over time as well as building “good will” in the Drupal community—taking from it and giving something back.

In Sprint Planning Meeting 1, the Product Owner identifies individual backlog items and explains them. The Team is encouraged to question ambiguities and thus to get an accurate idea of​what the Product Owner expects of them. Subsequently, the Team estimates how long they will need for the implementation of an item in the backlog, a step which commonly involves the technique. According to these estimates, the Product Owner re-prioritizes the backlog items and determines the goals for the first sprint.

In the following Sprint Planning Meeting 2, items are again chosen for the sprint backlog. If the individual tasks are too large, the Team attempts to break them down into smaller sub-tasks, with the aim to ensure that all tasks on the backlog can be managed in a day or less. The Sprint Backlog is used during the Sprint to document which team member has been assigned to which tasks and what the status of each task is. For this purpose, a “Scrum Wall” or “task board” is often used, with columns for sprint members to quickly see the status of each task: columns or sections are created for “To-do”, “In progress”, and “Done”, allowing tasks to easily be sorted.

A sprint is always the same length, which should be between 14 and 30 days. Every day there is a “Daily Scrum”; this is a short meeting which attendees try to keep to a maximum of 15 minutes: each team member says what they accomplished the day before and what they plan to do during the current day; problems and obstacles are addressed. If determining a solution to an obstacle will take longer than the allotted time-frame, the ScrumMaster documents this in her “Impediment Backlog”—a list of obstacles impeding the accomplishment of the sprint goals—and works to find a way to resolve them (outside of the daily scrum meeting).

Each sprint ends with a “Sprint Review”. This is a meeting in which the team presents their work. The Product Owner verifies that the tasks fulfill her requirements. The review accepts only those tasks that are truly ready; unstable or untested items migrate back into the product backlog. Work progress is recorded in a “Burndown Chart” where time is on the x-axis and the y-axis includes outstanding tasks. The Burndown Chart helps to provide an overview of progress in working through the project backlog. But, as already mentioned, the issue is relatively complex and not really suited to a brief explanation. Now for the fun part…

LEGO Scrum

As the acting Product Owner in our Scrum workshop, I established a project to build a “city”. Having dug out my old Legos from the cupboard (I hope nobody resented that they were a little dusty), I considered what I’d like to have built in my Lego town. I wanted: houses, a school, a bus stop, a Simpsons statue, and a few other things. I wrote these objectives on slips of paper and put them on our backlog “task board”. During the Team’s Planning Poker session, there was much debate about the size of each item, e.g. whether an elementary school is “bigger” than a church. The Team then considered what could be implemented in a sprint and the sprint backlog items were transferred to the backlog.

Our Scrum task board

During our mini-model of the sprint process, each sprint was set at 3 minutes and we had three sprints to complete the project. After each sprint, I was allowed to mercilessly tear down built elements which did not meet my acceptance criteria. Of course there were heated discussions at these times about whether a building was not yet ready and there was haggling about windows, doors and church crosses. But in the end, the decision to accept or reject features was left to me, as the Product Owner, so some “completed” tasks migrated back into the product backlog. And so we continued to the next sprint planning, the next sprint, and so on. In the end, only the church and primary school were left with small defects, which I accepted; the rest of the city was just as I’d desired.

The whole process was certainly fun for everyone involved and I believe it contributed to an improved understanding of the steps in the Scrum development process, too.

And here’s the result, our beautiful, colorful Lego city!

scrum-3.jpeg

scrum-4.jpeg

scrum-6.jpeg

scrum-5.jpeg

Feb 21 2012
Feb 21

Story header graphic logos associated with the Drupal 8 initiatives

I was already planning to provide an overview of what’s been going on in the various Drupal 8 initiatives even before last week, when Dries announced the timeline for Drupal 8, which includes a “feature freeze” for Drupal 8 in only a little more than nine months from now, and planned release at the DrupalCon Europe, in late August 2013.

Drupal 7’s Plateau of Productivity?

I think we reached the Plateau of Productivity for Drupal 6 sometime in late 2009, about 18 months after its release. At that point there was no advantage to developing in Drupal 5, and Drupal 7 was still a long way off. --Dries Buytaert, June 8, 2011 (about 5 months after Drupal 7’s release)While most of the top Drupal 6 modules are now available, in some state or another, for Drupal 7, and I would certainly choose Drupal 7 for a large Drupal-based project that is not expected to be deployed for some time, from the outcry of protests I think there are a lot of people who would not agree that Drupal 7 is yet at its Plateau of Productivity. I would choose development in Drupal 7 for most projects, but there is still plenty of reason for site builders to work with Drupal 6, especially if they need particular features (e.g Nodewords / Metatag functioning properly, among others) and if they need to deploy the site now, with those features ready for use. Dries indicated that he thought Drupal 6 reached its Plateau of Productivity in late 2009, about 18 months after its initial release. At that point, there were fewer than 20,000 sites using Drupal 5 and more than 200,000 sites using Drupal 6. While this order-of-magnitude-greater-usage is not likely to ever be seen comparing Drupal 7 vs Drupal 6 usage (at least not before Drupal 8 is released), I do think that it’s significant that Drupal 7 usage has finally overtaken Drupal 6. That said, I don’t think we are truly at Drupal 7’s Plateau of Productivity, the point where building a new site on Drupal 6 would be “pointless”. Both in terms of time-after-release and usage statistics, it is arguably premature to say we are quite to that point yet.

Quibbling aside, I also don’t think it matters whether we believe we have reached the Plateau of Productivity for Drupal 7, or not — and it certainly doesn’t matter whether we are all in agreement about that. I do think Drupal 7 is very “ready for use”, though and I do think we are ready to see core development for Drupal 8 get kicked into high gear and I don’t think it will significantly delay the development of certain lagging contrib modules or resolving core issues in Drupal 7 which are the final barrier, in my view, to truly reaching its Plateau of Productivity. Additionally, many of the fixes and features going into Drupal 8 are regularly being back-ported to Drupal 7, and there is increased discussion of relaxing the criteria for what can be back-ported to Drupal 7, so I see the increased attention to Drupal 8 core development as exciting: a win-win for the whole Drupal community. We now have a release date for Drupal 8, which is important for business decisions, and a better timeline to facilitate a roadmap for the final stages of determining feature inclusion.

Drupal 8 Core Initiatives

Currently there are 6 official Drupal 8 Core Initiatives which are working on various aspects of desired improvements to core. There are others likely to be added to the list as soon as a bit more progress has been made on the current list and/or as qualified individuals step up to take on some of the other “top 10” desired improvements we had on our collective community wishlist. Some of the improvements require fixes to issues plaguing Drupal 7 and 6 and have been backported. Most of the others involve dozens, if not hundreds, of related issues. Following is a brief summary of each of the current core initiatives and what their priority goals are for Drupal 8. In the interest of brevity, the explanations leave out a lot of juicy details, but for those who haven’t been paying close attention and who might like to get involved, I hope this summary is useful:

Web Services and Context Core Initiative

The Web Services and Context Core Initiative (WSCCI, pronounced “Whiskey”), formerly referred to as the “Butler” project, is a core initiative led by Larry Garfield of Palantir.net, aka “Crell” on Drupal.org. While the traditionally typical HTTP request has been for HTML pages, the modern Web has brought with it the need for HTTP services which deliver information which is not necessarily in the form of HTML. This is especially true for mobile applications, but also applies to feeds and other communications via HTTP. The goal is to “take Drupal from being a first-class Web CMS to being a first-class REST server which includes a first-class Web CMS”. Really, this initiative spans a huge range of related issues and without writing an article many times the length of this one, I could not possibly cover everything, but…

Symfony2 logoUsing Symfony2 components is a big part of this effort; Symfony2 is an open-source application framework with a lot of nicely abstracted and discrete components, several of which are being integrated into Drupal to build on its strengths as a CMS. The HttpFoundation and ClassLoader elements have already been added to Drupal 8, but the latest WSCCI Sprint, attended by almost all of the Drupal core developers most of us can probably name, along with Fabien Potencier, the Symfony lead developer, determined that several other Symfony2 components would also be included. While these changes may sound daunting to many long-time Drupal developers, it should actually make the core much more approachable for developers new to Drupal, while also making Drupal inviting to experienced Symfony developers. Additional benefits include reducing a the heavy load of Drupal requests, making it more “lean and mean” and providing partial page caching for example, while also delivering a number of powerful features for Panels-like applications, better blocks, and much, much more. Some of the work related to the WSCCI project has been underway for some time now and was encapsulated in a Drupal 7 development module called “Butler”. [Update: I had linked in the Butler project, but Larry Garfield has indicated it is “vestigial” and there is no way that any of the final WSCCI changes will be back-portable or functional as a D7 module.]

If you want to learn more about WSCCI, Daniel Kudwien (aka ‘sun’ on Drupal.org) has recently posted an excellent article which, similar to Dries’s post about the Sprint, also focuses largely on what was covered at the recent WSCCI Sprint and goes into greater technical depth about what it all means. Update: There is also a new post from Larry Garfied which also explains some of the latest developments in WSCCI. Again, this is a huge and crucial initiative for Drupal 8 to live up to the envisioned dreams, and there are ways for community members of all experience levels to dive in and contribute to its success. There is a ton to do in the months remaining.

Multilingual Initiative

Multilingual InitiativeThe Multilingual Initiative, led by Gábor Hojtsy of Acquia, covers a wide range of issues related to improving Drupal 8’s support for multilingual support (internationalization and localization issues). The issue queue is daunting, but there are a lot of experienced developers pitching in. If you’ve worked with non-English sites in Drupal or sites with more than one language, or have written and contributed a module and then realized you had to sort out how to deal with all the issues related to multilingual support, this work should be of interest. I’m not going to go into all the pain points you might be aware of in Drupal 6 and Drupal 7 or which of the improvements have been or might be backported, but we can only hope that many of them will be. Issues related to language negotiation, translation, and associated APIs are a particularly confusing area of Drupal and the more they can be improved, the better. There was a Multilingual Sprint which was just held in Budapest (with participants in other areas communicating via IRC) and a multi-day Sprint is planned to follow the Denver DrupalCon.

Since a primary reason for the existence of the Cocomore Drupal Core and other related Cocomore-maintained contrib module forks has been issues related to multilingual support, this is of particular interest to the Cocomore development staff, as it should be to anyone working with non-English or multilingual Drupal sites or who cares about making their modules and themes properly locale-aware. So jump in and help out if you can!

Mobile Initiative

Mobile InitiativeThe primary goal of the Drupal 8 Mobile Initiative, led by John Albin Wilkins of Palantir.net, is to make Drupal the leading mobile CMS. While there are naturally overlaps between the goals of the Mobile Initiative and the WSCCI (web services needed for native mobile applications) and HTML5 initiatives, there are still a wide range of goals left for the Mobile Initiative to work on, including (but not limited to):

  • Getting Drupal’s administrative forms mobile-device-ready
  • Converting Drupal 8 themes to be “responsive”
  • Performance improvements (e.g. “responsive” images)
You can read more about the strategy for the Drupal 8 Mobile Initiative and John Albin’s more detailed blog post about the initiative to get further information.

For the Mobile Initiative to be truly successful, the team will need a great deal of community support, not only from the obvious PHP and Javascript coders, but also people with design and usability knowledge and ideas, people knowledgeable about accessibility issues, HTML and CSS gurus, people to help with documentation, and testers… lots and lots of testers with every kind of mobile device.

I should mention, for readers who are new to Drupal, that mobile support is not something new to Drupal 8; you don’t need to wait for it since there are already ways to produce mobile content in Drupal 6 and Drupal 7. But the mobile initiative will hopefully take a lot of the current pain out of working with all the inter-related modules, themes and other technologies required to have anything approaching an ideal solution to mobile issues in current versions of Drupal. You should still do a search to find the right solution for your use case, but some of the popular mobile-related modules include: Mobile Tools, the Mobile Theme module, Browscap, SMS Framework, WURFL, and Mobile Codes, Phonegap, among other common modules which are not specifically for mobile development, but can be helpful. And DrupalGap is another promising module which is still in the developer’s “sandbox” at this time. There are a number of themes which are well suited to Drupal development, including the Mobile theme, which can be used as-is or as a basis for a custom mobile theme, AdaptiveTheme (as well as all of the themes based on it, such as Pixture Reloaded, Sky, and Corolla), and Boilerplate. You’ll find numerous blog articles, recorded DrupalCon sessions, and resources. There is also a new book which is expected soon and which you can already pre-order and start reading (RAW): Drupal 7 Mobile Web Development Beginner’s Guide.

HTML5 Initiative

Drupal html5 logoThe HTML5 Initiative, headed by Jacine Luisi, is another of the major initiatives for Drupal 8, which (as mentioned, above) has strong ties to the success of the Mobile Initiative, as well. You probably saw the announcement a few months back that Drupal 8 already has HTML5 as its default “doctype”, but that was just the first step toward getting Drupal 8 fully HTML5-ready. Templates, theme functions, markup… everything needs to be ready and there are still plenty of open issues related to HTML5 in Drupal 8 if you’d like to join the effort.

The HTML5 Initiative also has close connection to the web services and mobile initiatives, of course, so getting this all working is a vital part of the effort.

Configuration Management Initiative

The Configuration Management Initiative (CMI), led by Greg Dunlap (aka heyrocker on drupal.org), aims to sort out the issues related to maintaining, storing, and deploying configuration of a Drupal site. Currently, all the configuration for a Drupal site (except, of course, for the basic database access settings stored in settings.php) is stored in the database, and deploying it is a pain. Furthermore, if someone changes settings and it breaks site functionality, there is no simple way to “roll back” just those changes. The CMI moves all configuration from database to disk in a standard format which can be more easily deployed, can be stored in a version control system, and can be used in multiple sites more easily. This provides a much better development workflow to easily take configuration used on one site to another, and to modify it, as needed. Of course it should provide for much more useful distributions and installation profiles.

You can read more technical details about the CMI, at least as it was initially conceptualized, in Webchick’s summary of the first CMI Sprint held in June 2011 and there is ongoing discussion of the initiative in this Drupal Groups thread. Needless to say, this should be a big improvement over what’s currently possible to do with Drupal’s Features module, but if you need to package configurations to use them on multiple sites, the Features module is currently your best friend.

Design Initiative and Usability/UX

Design Initiative PseudologoLast, but certainly not least, the Design Initiative, led by Jeff Burnz of AdaptiveThemes, aims to give Drupal a new look for Drupal 8 Of course the theme design will also be fully mobile-ready. Part of the effort involved designers collaborating about the new look before the coding phase for the theme was begun. According to the official timeline set out by the initiative team, we are now in the middle of the development phase. If you are a theming expert and want to help, contact the initiative team and see what you can do. Currently all work is in the initiative development sandbox, so you won’s see it committed to the “current” (Git) version of Drupal 8 until it’s pretty well done.

I know, I know... my graphic for this section has more to do with UX than “Design”, per se, although they are closely related. Good designs should be user-friendly. Anyway, strictly speaking, Usability is a completely different initiative which is not currently on the “hot-plate”, at least not for Drupal 8. Why? I guess there is always time to improve the UX of a product as long as it does not break (too much) and does more good than harm, so improvement to UX can continue even after product release. And of course we still have 18 months before Drupal 8’s release, so getting the core features right, first, is of most importance. If you are interested in Usability issues, however, there are regular meetings held in IRC. You can connect with the Drupal Usability group here. You might be particularly interested in the discussion of the recent Drupal 7 Usability Study at Google. The videos videos from usability study are particularly useful for identifying current “sticky points” in Drupal 7’s usability. Presumably all of these usability issues will be fixed in Drupal 8 and hopefully most can be backported to Drupal 7 without causing more harm than good.

The “Current” State of Drupal 8 Core Initiatives is in the initiative sandboxes

As a point of reminder, don’t expect to see much of the progress in Drupal 8 if you check out the project from Git. Not a lot has been pushed to the central repository and is, instead, on individual developers’ repositories and/or in shared initiative “sandbox” repositories. By keeping experimental code out of the “master” repository, the hope is to keep the issue count down and prevent issues caused by incomplete code in one area of the product from wreaking havoc (or masking issues) in other parts. This is the benefit of a distributed VCS like Git, but it also means that in order to test the latest, most experimental features, you will need to work with the sandbox versions.

So many initiatives, so little time!

If you are like me, you are now inspired but you might be having trouble picking where to best apply your talents. Check out the issue queues for each initiative if that’s the case. You might find something you can take on and help lay a few stones in the foundation of what’s sure to be the most awesome version of Drupal yet!

Dec 09 2011
Dec 09

Beginner's Guide to Drupal 7 Fields

Posted on: Friday, December 9th 2011 by Ben

As someone new to Drupal I was given a book to read and review from the team at Appnovation. The title is Drupal 7 Fields/CCK by Dave Poon, and with this post I will cover some initial impressions as I read through the first few chapters.

This book is a beginners guide to Drupal 7 and is aimed at an audience who doesn't have too much experience working with Drupal or code, although some experience is recommended. What I really liked about it is that the author thoroughly explains how the book is structured and what the end results of the project are. This helps to orient the reader and reinforce how the author intends to teach the material.

The first step is a set of instructions, with specific references, such as adding a custom field type. Following that is a a plain language explanation of what happens when you add a field. This is a great technique to explain what happens behind the scenes when you are working with the GUI. The next step is a quick quiz based on the steps just completed. Finally, there is a challenge to apply those steps on your own and experiment with the wide variety of options.

Throughout the book, the reader is working up to a complete site built with Fields. The example used is a cooking site and this provides a fun background as you work your way through it. So far, I have gone through the first quarter and I can already see the benefits of the instructions. While it is basic, it does a great job explaining how Drupal works with custom content types and how they can be used to build a wide variety of sites. This is all important knowledge for a beginner and with my next post I will share some of the more advanced techniques covered.

Nov 11 2011
Nov 11

Disclaimer: This post is about a very basic example of a drupal module that works in both Drupal 6 and Drupal 7. The purpose is to present a general idea of how to write custom drupal modules, use and find drupal hooks, and to show how to take advantage of drupal's Devel module. This tutorial assumes you know how to create and upload files to your server using FTP.

1. Creating a module

First, let's make a module that only exist in the module system. Follow these steps exactly.

  1. Download and install the devel modules on your drupal site.
  2. Create/Upload a new folder in you drupal's sites/all/modules/ folder named custom_example
  3. Create/Upload two new files in that folder: the first named custom_example.info, and the second named custom_example.module
  4. Take a moment to notice that the module's folder name and file names are the same.

Now edit the custom_example.info file, and make its contents the following:

name = Custom Example description = Just a simple example module version = 0.1 core = 6.x package = Alpha Custom Modules

Save/Upload that file.
Drupal 7 note: If you're doing this is Drupal 7, change the 'core' number to 7.x

Next, edit the custom_example.module file and make its contents the following:

<?php

Thats it! Save/Upload that file and then visit your site's module page.

On your site's module page, you should now be able to see and enable the module. Do so.

2. Creating a hook

Hooks in Drupal are just ways of modifying the website page's results.
Let's create one in our new module.

The hook we are going to use is the all-fabulous hook_form_alter. That link will take you to a drupal api page that describes the hook.

New let's edit the custom_example.module, and make its contents the following: <?php /* * Implementation of hook_form_alter() */ function custom_example_form_alter(&$form, &$form_state, $form_id){ }

Now here is the important part about using a hook.
Copy the hook function from Drupal's API page, and replace the word hook with your module's name.
Your module is now hook's into all of Drupal's forms.

3. Using the Devel module to figure out what to do next

Now that we're hooked into all Drupal forms, let's use a Devel module function to target a specific form, and figure out what the form looks like.
The Devel php function we'll be using is dsm();, which sets a drupal message with the value of the given parameter.

Edit the module file again to make its content the following: <?php /* * Implementation of hook_form_alter() */ function custom_example_form_alter(&$form, &$form_state, $form_id){ dsm($form_id); }

Using the dsm(); function we are going to output the ID of every form a page loads.
You can prove this by visiting a Page node creation form. Visit http://example.com/node/add/page on your website.
You should see a list of form ids at the top of the page.

Now let's use one of those listed form_ids to target this form.

Edit the module file again to make its content the following: <?php /* * Implementation of hook_form_alter() */ function custom_example_form_alter(&$form, &$form_state, $form_id){ // target a single form if($form_id == "page_node_form"){ dsm($form); } }

On saving the module and refreshing the page, this will provide you with a pretty output of the entire $form array.
Now let's modify the $form array to change the label for the form's title field.

4. Modifying the form

Edit the module file again to make its content the following: <?php /* * Implementation of hook_form_alter() */ function custom_example_form_alter(&$form, &$form_state, $form_id){ // target a single form if($form_id == "page_node_form"){ $form['title']['#title'] = t('New Form Title'); } }

Save that module and refresh your page edit form and you'll see that the Title: label has been changed to New Form Title.
And there you have it. Your first module that uses hook_form_alter() and the devel module.

For more information on Drupal's Form Api, check out the following references.
Drupal 6 Form Api Reference
Drupal 7 Form Api Reference

Oct 28 2011
Oct 28

Some time back, I promised another short article in the WYSIWYG set-up series for Drupal 7, one which covers BUEditor. First, we should note that the BUEditor is not actually “WYSIWYG”, but it offers some nice features which might make it a bit better than the WYSIWYG options, depending on your use case. It also does not integrate with the Wysiwyg module. You add it separately (and instead of Wysiwyg), but it does have some great supporting modules and code libraries. This article covers some of the basics about use and installation of the BUEditor on a Drupal 7 site (most of the information applies equally to Drupal 6, where the BUEditor module is also available). I’ve also got some good tips for some ways to extend the default button-set. (And you can download my modified button code here to easily import the buttons into a new editor profile.)

The BUEditor is now used on Drupal.org

The BUEditor is now in use on Drupal.org. Nice!

Since the time I planned to write this post, BUEditor has surely got some additional attention; it’s now what you’ll use if you leave a comment on an issue or forum post on Drupal.org. It’s refreshing to have more than just a plain text area for HTML entry; I think this is a great step for the Drupal community’s official site. In addition to basic set-up of the BUEditor, as it’s used on Drupal.org, I’d like to cover some nice features of the BUEditor which are not being used on Drupal.org.

The BUEditor integrates nicely with IMCE

The default BUEditor Insert/edit image pop-up dialog is very limited but can be modified.The most recent article in this series covered the set-up of IMCE and supporting modules for inserting images. You’ll be glad to know that the BUEditor supports adding images with IMCE. I’m sure you could also simply “attach” images and add them to content with the Insert module. The BUEditor’s default image popup is very limited, which was at first a deal-breaker for me to suggest using it on this website, however I learned it’s not so difficult to adjust the pop-up dialog to add more fields; by default it only has the URL, dimensions, and alt text fields. I also wanted fields for title text, class, and style (though it is probably best to avoid using inline styling, it’s sometimes handy and nice to have a GUI for adding this to your tag when you create it).

Remaining downsides to the image dialogue

At first it wasn’t obvious how to add new fields to BUEditor Image dialogue for Title, Class, and Style…Proportional dimension calculations: It would be nice if there were support for automatic adjustment of the “Width” and “Height” fields to adjust one automatically (by ratio) if the other is modified. I tend to place images that are often wider than 600 pixels, which means they would not display nicely in the layout of this site. The Image Resize Filter automatically creates a smaller image, to be displayed in the content, if I adjust the size when placing the image. And it’s easy to link the full-size original image to appear in either a Lightbox2 or Colorbox overlay. If I have an image which is 938 pixels wide by 529 pixels high, and I change “Width” to 600 in the BUEditor image popup, I’d like a default option for the “Height” to automatically be proportionally re-scaled, as it works in CKEditor and TinyMCE. It’s not hard to calculate what the height should be, but I’d rather not have to, and I’m not the only one who would have to. The easy solution to this is to just leave the height field empty and the Image Resize Filter will still proportionally resize the image, but if the image doesn’t load, for some reason, the page layout will be affected.

Longer fields: Even after working out how to add the new fields, I couldn't figure out how to make the whole dialogue larger (assuming physical display size is large enough) so that these fields could all be a bit wider. The default size of the text fields is pretty darn short, but my initial attempts to modify this just ended up breaking the whole editor. Well, it’s not a big deal, but perhaps I'll figure out how to further customize the image pop-up. (If anyone knows how to make such modifications through simple button code (or an add-on module), please share your tips.)

Quibbles aside, the BUEditor really is awesome!

BUEditor has a great preview function available with the Ajax markup moduleThe BUEditor provides a nice, clean user interface with what could be a perfect balance between simplicity and usefulness, provided users are comfortable with working directly with HTML code. It’s easy to apply formatting to selected text and it’s also simple to modify the values of the editor buttons or add your own. Converting unstyled lines of text into lists (ordered or unordered), blockquote, or heading, is as simple as the click of a button and if anything gets mucked up, you have the code right there to adjust, but it’s less likely to get messy than with a WYSIWYG editor since you have complete control over what you select before you click the button. This might be a good time to mention that there is also a Drupal-free version of the BUEditor, though the BUEditor was first created specially for Drupal, unlike so many of those other (“WYSIWYG”) editors.

It’s especially awesome with the Ajax Preview option enabled

The Ajax markup module, also written by the author of the BUEditor, allows you to simply modify the “Preview” button to provide a display which closely matches the end result (taking the text format settings into consideration). Awesome! I’d like to see them add this integration on Drupal.org, too, since it’s much faster and nicer than reloading the page with the main “Preview” button. It would be great to also have this functionality in a Wysiwyg-integrated editor. Bear in mind, once you have this configured and working, clicking the “Preview” button displays the preview and by dragging on the handle at the bottom of the editor pane, you can see the corresponding code… but you won't be able to edit that code till you click the “Preview” button again.

BUEditor keyboard shortcut support

Not all browsers support the shortcuts equally, but when you are actively using the text editor, you should be able to use keyboard shortcuts to add tags, snippets you’ve configured, or perform other editor functions. In Safari, I found that I had to use the control and option keys in combination with the configured key. In Firefox it was just the control key. More than one editor in a page can mess this up and the shortcuts may not work at all in some browsers, but they can certainly be useful. You can also remove the key codes if you think it might cause more problems for your users than it’s worth.

Keep in mind: The button-set is based on role

One potential issue is that the editor button set is based on the user role, not on the Text format. So it’s still easy to create content (as a privileged user) in the “Filtered HTML” format, and include images or other tags… that are then stripped on output. With Wysiwyg-integrated editors, the button sets are per text format. There are pros and cons to this, but I’d prefer to have a default editor configuration for each text format. There is a BUEditor Plus add-on module which aims to take care of this issue, but it’s still in beta (actually still in the developer’s “sandbox”). Since it’s likely to be released soon as a full project, I won’t link to the sandbox. Instead look for the module on HollyIT’s user page on Drupal.org. Caveat: I can not confirm that the sandbox beta is ready for production use. Use or experiment at your own risk.

Another cool feature: BUEditor supports BBCode output

Many forums and sites support BBCode, which is easier for users to enter, a bit simpler than HTML, and removes many of the potential hazards of allowing users to enter HTML. If you want to have commenters post using BBCode, it’s as simple as configuring the button-set for the included BBCode editor. The defaults might already be everything you need. Of course you’ll also have to add and enable a BBCode text filter.

Are you ready to install and configure the BUEditor?

Add and activate the modules

Add and activate the BUEditor module (plus optional modules if you like)admin/modules
You will want to download the appropriate modules. The BUEditor module is required, of course, and I also recommend the Ajax markup module. Add them both to your sites/all/modules folder, then activate them, as usual. If you want to use IMCE, IMCE Mkdir, and/or the Image Resize Filter, be sure to add and activate them, too (see previous lesson about using IMCE with images in a Wysiwyg-integrated module and just follow the steps for configuring IMCE and the Image Resize Filter.)

Note: The BUEditor Plus module is also shown here, but may not yet be ready for production use. And, in case you were wondering, Internal links is a module I’m working on in my free time, so you see an “unversioned” copy in the screenshot from my D7 development installation. I will be committing some improvements to that in the near future.

Configure the BUEditor

admin/config/content/bueditor
Click the “Import editor” link to easily start from exported button code, like the modified button-set I’ve attached here. By the way, I’ve tested this button code in both BUEditor 6.x-2.x and 7.x versions. The same button definitions work in both.

To import a previously exported button-set, paste the code in the “Editor code” text area

You can simply paste the code from the file I attached if you have the Ajax markup moduleYou can create a new editor based on the Default profile (as I did originally) or you can import the code I’ve already modified to provide what might be a better starting point. Simply add a name for your new editor and paste the code from that file into the text area labeled “Editor code (PHP)

If you choose to start from the “Default” set, and want to enable Ajax preview, look for the “Preview” button in the “Buttons” rows and paste over the existing “Content” for that button with the following code:
js: E.prvAjax();

Note: This is already done in the attached version of the button-code.

You might want to remove the H1 tag from the “Headings” selector button. Another change I made was to remove the “Heading1” selector from the default Headings button code. Why? A page should really only have one <h1> tag, and it’s already provided by the node’s Title field, so except in unusual use cases, you’d never want to have this in your editor. That tag can be removed from the button very simply by dragging the “Content” text area for Headings open to see the full contents and selecting the second line for deletion. I also added a few new text buttons for <p>, <br />, and <?php tags; adding or customizing such tags is super-easy, especially if you simply add a plain text “Icon” to represent the button in the editor, as I did. If you want to add custom icons, you can supply the path to find your custom icons (e.g. a copy of the default icons, plus a few more that you create yourself; or you could replace the original icons with ones you like better. The original icons are all 20 pixels high, so match the height and your icons should look fine; for my paragraph and line-break buttons, a plain-text button suits me, but I’ve created a few alternate icons, included with the attached code.) If you choose to use alternate or extra icons, be sure to follow the directions included in the readme.txt file within the BUEditor module’s “icons” subfolder and copy all default and custom icons that you want to use to a new sub-directory under your files path.

Additional simple toolbar configurations

Export your modified button code.You can drag rows up and down to adjust the order of icons in the BUEditor toolbar. You can also modify the keyboard shortcuts linked to the buttons and make other simple modifications before saving. I would suggest that you actually save periodically and make sure that everything is still working in the “Demo” text area, especially if you are editing button code or adding new buttons.

It’s a good idea to periodically select all buttons and export your button set. To export all buttons, simply select the checkbox at the top right of the “Buttons” configuration table, which will select all checkboxes, then at the bottom of the list, select the “Export” action and click “Go”. You can also use this action selector to remove buttons with the “Delete”, copy selected buttons to another configuration of BUEditor, etc. If you don't do this, you might not notice when your custom code gets broken until you just have no icons showing up above the Demo textarea after clicking Save configuration. If you’ve got the buttons backed up, you can easily revert to a working set.

Assign the new editor(s) to suitable role(s)

Don’t forget to assign your editors to roles.admin/config/content/bueditor
Be sure to go back to the main BUEditor configuration page and select your new editor configuration to use for the appropriate roles. In this case, the “advanced” editor I set up for “Staff” needs to be assigned to all trusted roles who have access to “Full HTML”. You may also want to assign an editor for basic “Anonymous” and “Authenticated” users. Untrusted roles should probably not be allowed to add images, headings or other special tags. The included “Commenter” editor configuration is likely appropriate for your “Filtered HTML” needs, but if you add any additional buttons to be used by roles who only have access to “Filtered HTML”, be sure to make corresponding changes to the “Allowed HTML tags” in your “Text formats” configuration:
admin/config/content/formats/filtered_html
As mentioned before, you could also configure the BBCode editor or set up an editor for other special markup languages. Exploring these use cases is outside the scope of this article.

More advanced configuration

Super light-weight HTML syntax highlighting; how cool is that?!You can do a lot more with the BUEditor… this article might be a bit long, but the official documentation is even longer. There are loads of API functions for doing really cool stuff with BUEditor buttons; and don’t overlook all the pages of contributed button code. Before you spend a lot of time trying to figure out how to implement a particular button for your needs, take a look at what’s already tested and available; even if you don’t want the exact functionality offered by a contributed button, it may offer an example you can more easily adapt to achieve your particular needs.

Some of my favorite contributed buttons include the:

  • Special Characters button, which provides a nice pop-up panel for just about any “special character” a user might want to insert
  • Text Color button, which provides a pop-up selector with color swatches which can be applied to text or backgrounds
  • Class Attribute Library; allows easy addition of a particular class to selected HTML
  • Smileys Button, which provides reasonable integration with the Smileys module (unfortunately not yet officially available for Drupal 7, though it does look like the port is reasonably complete.)
  • Remove Formatting button (perhaps less risky than the one I created since it only strips designated tags, so won’t remove everything inside of IMG tags or between the php tagset used for longer blocks of syntax-highlighted code.)
  • BUEditor Imagecache button (similar to the standard insert image button, but also allows selection of a pre-set image style)
  • BUEditor Quick Table (okay, HTML tables are worth avoiding, but sometimes data content really is best displayed in a table; this makes it easy)

Good luck and have fun…

We wish you every success configuring your Drupal site for maximum productivity and a user experience to write home about. The BUEditor might not be for everyone or every use case, but its light-weight code-base is amazingly efficient and with the proper configuration it can be better than a WYSIWYG editor for offering a friendly way to add and edit content. If you come up with some interesting things to do with it or have comments about this article, or any of our others, we look forward to hearing from you. Please feel free to leave a comment, below.

Thank you for visiting us on the Cocomore Drupal blog.

Oct 06 2011
Oct 06

This article covers the configuration and use of IMCE (and related modules) to integrate uploading and inserting images within your Drupal content. We assume you are using either TinyMCE or CKEditor with the Wysiwyg integration module, but in a separate post we will cover using IMCE with the BUEditor, a simpler text editor which also works well with Drupal. Note: This article uses Drupal 7, but most of the tips should also be helpful if you are configuring a Drupal 6 site for the same functionality. Indeed, this site is still running on Drupal 6 and also uses a Wysiwyg-integrated CKEditor, IMCE, the Image resize filter, and Lightbox2.

Add necessary modules to sites/all/modules

Add necessary IMCE-related modules to your sites/all/modules directory

If you’ve been following along, you’ve already added the IMCE and IMCE-Wysiwyg Bridge modules; otherwise this is the first step you’ll want to take. In addition to these required modules, this post also covers using the Image Resize Filter and Lightbox2 modules, which work together with IMCE and Wysiwyg to allow you to automatically create smaller images embedded in your content, which are linked to the full-size images and can optionally be viewed in a Lightbox overlay. This is very cool, especially if your original images are wider than the content area and you wish to give users a closer look without actually opening a new window for the image or forcing the user to click the back arrow to return from a linked image to your Drupal content. The IMCE Mkdir module allows you to add directories to your file hierarchy so that you can keep uploaded media nicely sorted.

Activate the modules you’ve added

/admin/modules
Activate all the modules you’ve added

You’ll find the Image Resize Filter in the “Input filters” fieldset. IMCE and IMCE Mkdir should be in the “Media” fieldset. And the IMCE-Wysiwyg Bridge and Lightbox2 modules are activated in the “User interface” fieldset. Click on the “Save configuration” button and you’re ready to move on. Note: Using Drush to add and activate modules is outside the scope of this article, but is a nice time-saving trick.

Configure IMCE

/admin/config/media/imce
After saving your configuration, you can go through and click on the “Configure” links beside the modules which have additional configuration. If you only intend to allow your “User-1” (initial admin account) to upload and insert images into content, then the defaults for IMCE might already be suitable. But assuming you have other roles who you trust enough, you’ll probably want to adjust the default configuration and permissions.
/admin/config/media/imce/profile/edit/1

Start by taking a look at the IMCE configuration for your “User-1” profile (we have made no changes to this profile, so will not display a screenshot, but if you don’t have IMCE installed yet, you can see a screenshot of this configuration here).

For the sake of this example use case, we have created additional “staff” roles for “Editor” and “Author” users, who will be allowed to use the “Full HTML” text format (or a custom text format which allows image uploads) and will be allowed to upload images using IMCE and perform various levels of file administration. Our standard anonymous and authenticated users will not be allowed to use a text format with <img> tags at all, so we will not need corresponding IMCE profiles (allowing untrusted users to use <img> tags is a potential security issue which is best avoided; using BBCode or Markdown for these roles can help mitigate the risk if you really want to allow new users to display images on your site — but further discussion of this matter should be considered outside the scope of this article). If you do add new roles, be sure to give them appropriate permissions. For this use case, we’ve given our Author and Editor roles permission to “Use the Full HTML text format” and permissions to create and edit various content types. (admin/people/permissions/list)

Add a new IMCE profile

Import settings from User-1 profile then tweak a bit for our Staff profile.You will probably wish to add a new profile for any new roles. For my simple use case, I will create one “Staff” profile which will have almost the same defaults as the “User-1” profile. We can save time by clicking the “Import settings from other profiles:” link labeled “User-1” and then tweaking the profile a bit more. We might want to cap the directory quota a bit, but not nearly as much as the 2MB, which is the default for a new profile. We also want to allow our staff to create directories in the main files area rather than within a subdirectory with their user-ID. Be sure your settings are a good fit to your use case.

Make your Role-Profile assignments

Make sure appropriate roles are assigned to a profileAssign the “Staff” profile to appropriate roles and make sure the “weight” of each role has them in correct order of their importance (descending order). We aren’t going to allow authenticated or anonymous users to upload images, so we won’t assign any profile to them.

Make sure applicable Wysiwyg profiles include IMCE in “Buttons and plugins”

Make sure you check the IMCE checkbox in your Wysiwyg profile configuration.admin/config/content/wysiwyg/profile
Assuming you have followed the steps in the previous article in this series, you have already configured Wysiwyg profiles for your editor(s) of choice. The IMCE-Wysiwyg Bridge module which you've activated in this lesson adds another checkbox (to at least some of the editors which you can integrate via Wysiwyg, e.g. CKEditor and TinyMCE), labeled IMCE, which you'll probably see down in the bottom row of your “Buttons and plugins” section for each applicable profile. Check the IMCE box and the “Image” (and “Advanced image” for more features in TinyMCE) checkboxes. The IMCE checkbox does not actually add a button to the editor’s menu bar (you just see the normal image button). The pop-up box for adding images should now include a link to “Browse server”.

Configure the Image resize filter module and Lightbox for your text formats

Configure your Full HTML (and/or appropriate) text format(s) for Image resize filter and Lightbox filteradmin/config/content/formats
The only settings for the Image resize filter are found in Text formats. It is a filter which you can turn on and configure individually for each text format. What we want is to configure the Image resize filter to link a resized image to the original and display the full-sized original image in a Lightbox overlay. In my simple use case, I'm giving all “staff” roles access to Full HTML; you may wish to create and configure an additional text format, e.g. one somewhat more restrictive. We need to make sure the Lightbox filter is active, as well as the Image resize filter. I have had good success with the Filter processing order displayed (with the Image resize filter running before the Lightbox filter). Note: There are several other Lightbox-related filters available if you want to use Lightbox for other special purposes (e.g. video, slideshows, etc), but for the basic needs of our use case, we only need the “Lightbox filter”.

When the Image resize filter is active, there is a tab at the bottom of the Text format configuration screen to adjust its settings. Click on that tab and at least select the option to resize locally stored images. Check the box next to “If resized, add a link to the original image.” We can see, from looking at the help text for the Lightbox filter that “Image links with rel="lightbox" in the <a> tag will appear in a Lightbox when clicked on.” So we put if we put “lightbox” in the text field for adding a rel attribute, everything should work correctly. Note: The JavaScript degrades gracefully — even if JavaScript is unavailable or inactive, the link will still work; it just won’t open the full-size image in a Lightbox overlay, but in the current window.

There are additional settings available for Lightbox2

admin/config/user-interface/lightbox2
Assuming you only want Lightbox for the purpose of giving visitors a better look at images resized and embedded in your content, the default settings should suffice. Lightbox will even add captions to images if you add a title attribute to the images. This is default behavior. But if you want to use Lightbox to view galleries of images (e.g. a group of images attached to a node), adjust settings for displaying video content in a Lightbox, prevent Lightbox from being active on certain pages or sections of your site, or want to configure Lightbox for Flickr content, Gallery2, Image assist, or other possible integrations, there are some settings you may wish to adjust. Note: there are four tabs at the top of the Lightbox configuration page, so in addition to all the settings hiding in the individual collapsed fieldsets on the “General” tab, there are dozens more settings there for you to tweak. Digging into everything you can do with Lightbox2 is well outside the scope of this article, but may be covered at a later time.

You are now ready to start uploading and inserting images

There are a few steps to the process of adding an image into your content:

Click on the Image button in your editor…

Put your cursor at the beginning of a paragraph and click the “Image” buttonBe sure your cursor is at the beginning of the paragraph where you want your image to appear (especially if you want text to flow around your image). The “Insert/edit image” button is similar in both TinyMCE and CKEditor:

Click on the “Browse server” button…

Click on the “Browse server” button to select an image You should get a pop-up window for inserting an image, which should look something like this. Note: This illustration shows the basic Image popup option for TinyMCE, further below we also show what the popup looks like if you've selected the “Advanced image” option in TinyMCE (recommended, if using TinyMCE) or if you are using CKEditor (similar to TinyMCE with the “Advanced image” plugin option.)

Click on the “Upload” button in the IMCE window…

Click on the “Upload” button in the IMCE windowIn addition to the “Upload” button, which pops up a “browse” window to files on your local operating system, this window is where you can create a directory structure for your files. You may want to create directories for your content types and/or for individual nodes, if each article has many images. If you’ve set permissions in your IMCE profile for non-admin users (e.g. the “Staff” profile we created) to upload, create, and/or delete directories, you will see the corresponding buttons in this window. Note that if you use IMCE’s “Resize” function, this will create a resized version of your file as the “original” passed to your editor, which would be viewed in your Lightbox overlay. I do not usually use the “Resize” or “Crop” buttons in the IMCE window. Resizing an image, especially one in a stored in a file-type with “lossy” compression, e.g. JPEG, is best done as few times as possible, so we should preferably only upload files which are already cropped and sized the way we wish them to appear in the Lightbox overlay. That said, there may still be times when these functions are useful.

Click on the “Insert file” button…

Click the “Insert file” button to pass the file details to your editor’s image popup

After you select a file to upload (you can upload several and then just select them from your server directory as you insert them), click on the “Insert file” button.

Adjust options in your editor’s Image popup window

Selecting left or right alignment translates into inline CSS styling: style="float: left; ", for example. This is a good time to talk about some of the differences between the image popup panels provided by TinyMCE and CKEditor. The “Advanced image” plugin for TinyMCE provides a field for “class”, which can be a better way of styling image placement since the class can also include padding or margin settings, etc. It also allows you to resize an image, automatically adjusting the second dimension (width or height) to keep the same ratio, and provides a field for the image title, which is used by Lightbox2 to provide a caption below the image. To get the advanced options, select both the “Image” and “Advanced image” options when configuring “Buttons and plugins” for the applicable Wysiwyg text format(s). Be sure to enter something useful in the “Image description” field; this will be your alt text; it is displayed if the image does not load or if a visitor is using assistive technologies (i.e. alt tags are required for better accessibility); alt tags are also required if you want pages to pass HTML validation on W3C and are useful for providing search engines more information about an image (so are good for SEO). In CKEditor, the standard “Image” button yields a popup with all the features of the “Advanced image” version in TinyMCE. The fields and buttons are labeled somewhat differently, but each has three tabs which include fields which provide basically the same end result.

These are the most important two tabs in the TinyMCE Image popup

The “General” tab in TinyMCE’s advance image popup includes both “Image description” (alt) and “Title” fields.The TinyMCE “Advanced image” popup has a tab for “Appearance”, where you can set alignment, dimensions, and other styling.

The “General” tab in TinyMCE’s “Advanced image” popup includes both “Image description” (alt) and “Title” fields. The popup also has a tab for “Appearance”, where you can set alignment (i.e. “float” left or right), dimensions, and other styling.

The corresponding tabs and fields provided by CKEditor…

In CKEditor, the “Image Info” tab provides your basic Alt text and size options, as well as the “Alignment” for floating an image left or right in your content.The “Advanced” tab in CKEditor’s image popup provides a field for the HTML title attribute (labeled “Advisory title”) and allows you to tweak the inline CSS styling.

In CKEditor, the “Image Info” tab provides your basic alt text and size options, as well as the “Alignment” for “floating” an image left or right in your content. The “Advanced” tab provides a field for the HTML title attribute (labeled “Advisory title”) and allows you to tweak the inline CSS styling.

Resized images appear in the Lightbox overlay when clicked

And this is what your Lightbox overlay will look like (if you adjust the width and/or height in the editor's popup window or in the HTML source code, the original is displayed in the Lightbox overlay when you click on the resized version).

What your Lightbox overlay will look like

Sep 18 2011
Sep 18

In Drupal, there are actually a number of ways to add a WYSIWYG editor to a text area. The new “Drupal way”, used on over 150,000 Drupal sites and arguably not so “new” anymore, is to use the Wysiwyg integration module, which has support for several of the editor libraries. I would personally suggest using it, if your needs can be met by it, since it's becoming more and more powerful and offers a fair bit of flexibility to easily change the configuration or editor used. That said, there may still be reason, in Drupal 7, to use one of the single-library integration modules, such as the still-popular CKEditor project. The TinyMCE integration module development has already been abandoned in favor of Wysiwyg, but it's good to have alternatives. Note: In this post, we assume you already know your way around Text formats. Text format configuration can be one of the most tricky parts of properly setting up your WYSIWYG experience, so if you don't already feel you know your way around this common stumbling block, be sure to read our recent post about Text formats / Text filters, too. This article is a companion-post to that one, but it also includes some degree of overlap, since when we turn on the Lightbox and Image Resize Filter modules, we have new filters we'll want to use in some text formats and we will want to pay attention to the order in which they are applied, so we will briefly revisit this topic here.

If you happen to like the more “minimalist” editors, and your site's users won't be freaked out by having to see actual HTML code, you may wish to consider using BUEditor instead of any of those which integrate with Wysiwyg. We will cover using it in another post, since I've personally been convinced that it's maybe even more awesome than a “WYSIWYG” editor. This post will simply cover setting up TinyMCE or CKEditor with the Wysiwyg integration module.

First we'll add and activate the Wysiwyg module

Put all contributed modules in the sites/all/modules directory

Please start by downloading the latest stable release of the Wysiwyg module. Contributed modules like this are usually added to the sites/all/modules directory. It's activated on the Drupal admin/modules page in the “User interface” fieldset, which you should see near the bottom of the page. Since it's common to want images within posted content, we are also going to demonstrate using IMCE and the IMCE-Wysiwyg Bridge to upload and insert images and we'll also add Lightbox2 and the Image resize filter module for improved display of images. You can add all four of these image-related modules to your sites/all/modules directory and also activate them at admin/modules. This blog post will not delve deeply into configuring images or associated modules — this can be a rather complicated topic, so it should also be covered in a separate post. So, while we'll be integrating IMCE and Lightbox2 for display of embedded images in this tutorial post, the full configuration of these modules will be covered separately.

Add editor library(ies) to your sites/all/libraries directory

admin/config/content/wysiwyg/profile
If you aren't already sure that you want to use TinyMCE or CKEditor, it's a good idea to take a little time to experiment with at least some of the different alternatives to determine which you like the best for your use case. CKEditor and TinyMCE are the two editors which integrate best with the Wysiwyg module and IMCE (to allow uploading and adding images to text areas). You could try some of the others, but bear in mind that, at least at this stage, many of the editors are not very fully supported by the Wysiwyg integration and may not have support for the full button sets available, nor for integrated image upload, etc.

Editor code, once downloaded, is extracted in sites/all/librariesEditor libraries are added to Drupal by extracting their code files and putting them in the sites/all/libraries directory, which you should create if it doesn't already exist. In a few odd cases you may need to rename a directory or add/remove a level of hierarchy, so it's best to read the installation directions on the Wysiwyg profile page, which you'll find at the bottom in a collapsed field-set. Click it open and find the directions that apply to your editor of choice. For TinyMCE or CKEditor, you should be able to simply download the latest stable version of the Javascript libraries for the editor and extract the archive (.zip file) into the sites/all/libraries directory, as per the directions:Download and extract the TinyMCE javascript library in the sites/all/libraries directory

One of my long-time personal favorite editors for embedding in browsers is the Markitup editor. It's simple, light-weight, and technically is not truly “Wysiwyg”, but it offers some nice features you won't normally see in the really fancy-looking editors. If your target audience could be described as “HTML-savvy” (or BB-Code-savvy / Markdown-savvy, etc), they may prefer such an editor since they always have access both to editor buttons and to a view of the generated code. And where other editors may add a dozen lines of in-line CSS styling when you paste text from a styled document, Markitup will only copy the text, not the styling. Even better, you can wrap a tag-set around selected text with just a simple keyboard shortcut.

What the Markitup editor normally looks like

I like the nice combination of simplicity and power that Markitup offers, but you can't get it with Wysiwyg module and Drupal 7.

As you can see it offers most tags you'd want for any HTML content and you'd only need to hand-code a few tags, here and there. You can experiment with this configuration on the Markitup "examples" page.

This is Markitup integrated by Drupal 7's latest version of the Wysiwyg module

Markitup has very limited support with Wysiwyg integration in Drupal 7.And that's with ALL available buttons selected… so Wysiwyg integration supports only a fraction of Markitup's standard Filtered HTML button set. Most disappointing! Well, having read up on the topic, I believe that it's just some work, currently, to integrate each button, so some editors that many people use are much better supported while others may still be more of a “development stub” example that the community can build on. It may just be that those of us interested in Markitup will have to help complete its integration with Wysiwyg (or help complete the port of the Markitup module to Drupal 7). But the search for a better “non-WYSIWYG” editor (text editor) did lead me to the BUEditor, a nice alternative which can be used with Drupal 7.
 

The safest solution is to use one editor

It's probably best to adopt just one editor for all text formats. Otherwise if you have privileged users with access to more than one format, that will mean two different libraries of Javascript code are added to the text areas and you can start to run into weird conflicts… like no editor showing up for a text format which is assigned to an editor… or no ability to properly switch between “rich text” and “code” views. It also means a lot more Javascript is added to each page, so it can delay initial page loads. So we strongly suggest choosing one editor which is sufficient for all your needs. To my knowledge, since only TinyMCE and CKEditor are supported by the IMCE-Wysiwyg bridge (which you may want if you'd like to add images to posts), it might be worth trying out both, before selecting one. From this point on, in this article, we are assuming you have settled on TinyMCE (or CKEditor), so some steps will include tips or screenshots which apply only to TinyMCE (but CKEditor is very similar in terms of the configuration).

We'll start by configuring the Filtered HTML button-set

Select TinyMCE as editor for Filtered HTML and saveFirst we need to select an editor to use for “Filtered HTML”. Select “TinyMCE” (or CKEditor, or whatever) from the select list for “Editor” and then click “Save”.

But wait… you still have to select the buttons

If we stopped now, we would only have an empty editor, one with no buttons — which would be much like no editor at all. Don't make the mistake of stopping now and thinking the defaults are probably good enough. Unfortunately, they aren't. Be sure to click on the “Edit” link which is now active for Filtered HTML and TinyMCE in the “Operations” column.

Select appropriate buttons when configuring your editor for a "filtered" text format

Select appropriate buttons when configuring TinyMCE for the Filtered HTML text formatJust select buttons which will be useful and appropriate for the limits of the text format. In this image, you can see what should be an appropriate selection of buttons for a Filtered HTML text format. I would be sure to add the <p>, and to be safe, both <br> and <br /> tags to the allowed list of tags for your Filtered HTML text format. (See related article for more info about configuring text formats). Why? Now you can turn off the “turn line breaks into HTML” filter (which turns double line-breaks into <p> tags and single ones into <br />). You will probably find that any WYSIWYG editor is going to add those tags, anyway. And people will try to add them (in code view) and be annoyed by having them stripped out on output. Plus, you'll probably find that your code gets re-formatted, no matter what settings you use in configuring the editor.

Tweak the settings for “Cleanup and Output” (optional)

Adjust settings for Cleanup and Output of HTML code from TinyMCEI personally can normally accept all the other default settings, but change the Cleanup and Output settings, as shown. Verify HTML should be good, but I don't like the editor to add lots of styling when people paste. Let's try to keep that in the CSS files. I also don't like all the linebreaks removed, since I tend to look at the code, and I'm sure many others are like me and will also want to see or adjust the code. Assuming you don't have the “convert line breaks to HTML” turned on (you shouldn't if using a WYSIWYG editor), it’s safe to leave “Apply source formatting” on. It will give you some appropriate line breaks (hopefully) so that it’s easier to read through the code. The “Force cleanup on standard paste” option helps clear out some of the garbage that people might attempt to paste in. I’ve seen no reason to disable that feature.

Now your editor should look something like this

Your TinyMCE editor should now look something like this.

Provided you are configuring TinyMCE and selected the same buttons I did, your editor should look something like this, at least to your regular users who probably will only have a limited set of HTML tags they are using.

Make sure selected buttons correspond to allowed tags

To make sure that your editor and corresponding text formats are properly configured, you should test the different buttons and pay attention to the preview. Here, we can see that the <strike> tag is not allowed by the current format (Filtered HTML) and should be added to the list of allowed tags for Filtered HTML if we want to have that button available for use*. Nothing is much more confusing and annoying to users than when they add the proper code, can see it in the code view, but don't see the same result in the saved output. Look at what tags are output by the editor (for each button used) and either disable the button or add the corresponding tag to the text format's allowed tags. Use the node preview button (at the bottom of the page, next to the “Save” button) to check [*Note: Actually, in the current TinyMCE, the “strikethrough” text treatment is accomplished by wrapping text in <span> tags with a style attribute which achieves the same effect. In the current version of CKEditor, it's <strike> tags. In other editors, you may find the “same” button adds <del> tags. All three achieve the same effect and if you want to include the strike-through button, you may wish to add more than one of these tags to those allowed for your text format.]

Don't enable the “preview” button

Don't add the preview button to your editor for a filtered HTML text format. It will render tags that are removed by Drupal's filter system. There is a common issue across various editors integrated by Wysiwyg. If the editor provides a “preview” button, and most do, the preview will render any HTML, regardless of tag limitations imposed by the current text format. For example, this means that images and <strike> tags used for strikethrough text will work as expected in a preview, but since the tags are not part of the default “Filtered HTML” text format, the <strike> or <img> tags will actually be removed on output instead of displaying an image or the text between the <strike> tags with “strikethrough” styling. You can still preview by clicking on the “Preview” node button, before saving, but the “preview” provided by the editor can be misleading. Hopefully future development of the Wysiwyg module might implement something like Ajax markup, which integrates with BUEditor (but not with the Wysiwyg module) to display text with correct output, i.e., according to active text format filter settings, etc.

Repeat for other text formats, but keep it simple

It should be easier to set up your editor for Full HTML. You may also wish to create a filtered html text format for trusted users, e.g. a “Filtered+” HTML. Just follow the same steps. Add a few more tags to the allowed set (perhaps you trust these users to add images or sub-headings). My only advice is to follow the KISS principle and “keep it super simple”. It's easy to get carried away and add all buttons available for Full HTML. Resist the urge. You are more likely to run into bugs and you'll end up with an overwhelming user experience. I'd suggest keeping the button-set limited to the most useful tags.

This is what the button-set looks like if you select them all:
TinyMCE and CKEditor are overwhelming if all buttons are selected for Full HTML

My recommendation would be to add just a few more buttons to the set you created for Filtered HTML. If you want users to be able to simply add images within their text and you've turned on the IMCE module, be sure to select both the Image and IMCE checkboxes. Working with images and IMCE is complex enough that we'll cover that in the next post.

Make sure the text filters for the format make sense and are in logical order

Minimal filters for Drupal's FIltered HTML text format

admin/config/content/formats/filtered_html
Now you should check your filters. Make sure the appropriate filters are enabled and that text is processed by the filters in a reasonable order. The Filtered HTML Text format normally includes the “convert line breaks to HTML” filter, which doesn't make sense if you are using a WYSIWYG editor (just be sure to include the <p> and <br /> / <br> tags in your allowed set). For Full HTML or other text formats with images, you'll probably want to include other filters, such as the Image Resize Filter and/or Lightbox. Again, we'll cover image-related tips in the next post.

Congratulations, you now have a killer WYSIWYG editor configured!

Be sure to test that everything works the way you want it to. Be sure to test that all of your user roles have the expected access to the editors and text formats and that features are working as expected. If you are working on a local development environment, it can be helpful to turn on the Devel module's “switch users” block and give all user roles permissions to use it. This will allow you to easily switch between a user of one role and your user-1 admin to tweak permissions or other configuration.

Be sure to check back for our next post about working with images in a WYSIWYG editor, which should be posted in the next few days.

Apr 11 2011
Apr 11

Dear Chapter Three,

I'm looking for a job and I'm fairly tech savvy. I've considered taking classes for web design and media, but a friend told me that I should learn Drupal... but I've never heard of it before. What exactly is Drupal and where do I start?

Sincerely,
Jonny

Thanks for writing Jonny!

What is Drupal?

Getting started with drupal
Drupal is an open source system for building websites and it fits into the category of Content Management System. A CMS is, simply put, a system for managing content. There are a ton of free CMS out there like Drupal, as well as a number of proprietary CMSs which charge for the privilege of using their system. If you want to compare, there are countless articles outlining key differences (like Jen's post last week: Wordpress vs Drupal).

Drupal stores pieces of content (referred to as 'nodes') in a database and lets you call from that to display the content anywhere you need it. This could be a single page (ie. the about page) or a page that has a list of content (ie. latest news articles, blog posts from December - just about anything you can imagine). By trusting Drupal with your content, you're able to focus on what your visitors will see and how they will interact with your site.

Drupal lets you get 80 to 90% done without having to know a lick of code whatsoever. For beginners, if you don't mind using one of the hundreds of contributed 'themes', you may not have to touch code at all. This is largely because Drupal is made up of 'modules' which are bits of code written by thousands of other people in the Drupal community. These modules allow you enable just about any features you could want on your site just by downloading a module and configuring it for your site.

What is the Drupal community?

Drupal has a very strong and compassionate community, which means we take care of people willing to learn. There are tons of avenues for getting help in Drupal, not least of which are the forums and issue queues on Drupal.org. If you prefer chat, you can also get help via IRC. Once you're part of the Drupal community, you'll probably feel inclined to help out beginners - even if just because so many people helped you. I found this to be true and have heard it from many other people as well.

The second Monday of every month, we have a SF DUG (Drupal User Group) get-together where people share what they've been using Drupal for lately, walkthroughs and tutorials covering various topics or what's been happening in the community. There's also a job board through the DUG and an ever growing "Users Helping Users" sub-group.

Ways to learn Drupal

We at Chapter Three are all about giving back to the community. Many of us have contributed modules and themes back to the community. We're all about presenting at Drupal camps, cons and meet ups, and many of those listed on our website have slides or videos embedded. We even have trainers that we send all over the world to train and consult in both private and public venues. We have a list of recommended resources for beginners and pros alike. For those of you who are just starting out, I especially recommend the book Using Drupal. In fact, from that link you can find a great video and free sampler to download.

You'll have to check our training schedule, but it looks like we're leading a Drupal in a Day training workshop on May 9th. It's specifically for beginners and covers everything you need to know to get started. You leave with a booklet that covers everything we talk about and a website sandbox that you can play with (build, break, rebuild, whatever) with for at least 90 days after the class. The class lasts the whole day and quite honestly, it's the best way to get your feet wet in Drupal. You'll leave with a solid foundation in Drupal basics and be prepared so build your first solo site! We had a series of classes last week that were sold out, so if you're interested, act fast!

Hope this helps Jonny! If anyone has any questions, please reply to this post in the comments below.

Aug 24 2010
Aug 24

Play Video

Movie link (right-click to download) Problem with this video? Contact me

Drupal is a very powerful publishing system. In fact, it's pretty hard not to stumble across many modules which will help you create an awesomely powerful publishing platform. Drupal distribtions, such as Managing News, have already packaged a handful of modules which get you started right off the bat.

If your publishing needs are simple and straight forward, then you may just need a handful of uself modules.

One of the default features in Drupal is the baked in revision system, which allows you to track any and all changes to any given node (which is any given piece of content - if you're not familar with Drupal speak already).

Using this default system, you can easily track what changes have been made to your site's content. However, unless it's just yourself creating the content, you may need to facilitate a review process. This means you may go through many drafts before you're ready to release an updated node.

Creating an intermediate draft in Drupal is simply a matter of using the Save As Draft module. While its initially sparse interface is a bit confusing, the features it provides may be exactly what you're looking for if you'd like multiple people to contribute updates to a node and save the release process for a higher level of access.

Jul 09 2010
Jul 09

Play Video

Movie link (right-click to download) Problem with this video? Contact me

When most people consider Drupal hosting, they're looking for a reliable host they hope isn't going to shut down over night. It's typically your larger run-of-the-mill hosting provider running an install script that will simply load a basic Drupal install.

For myself, I've always opted to manage my own hosting. This meant taking care of setting up, securing and optimizing either a dedicated server box or the current trend of using a VPS (virtual private server) which uses virtualization technology to fully leverage all the resources of a really beefy server.

Recenly, however, while spending a fair amount of time becoming familiar with the Varnish reverse proxy server (which is very nice by the way), I decided I was spending too much time with my own "Drupal hosting". I wanted to create more videos and more valuable content - I enjoy doing it.

There are a good number of smart people and companies in the world of Drupal, many of them providing high quality services to some really BIG companies. My search for a Drupal hosting company was personally based out of frustration. While researching, I found a number of links about the latest "hot new web server" call nginx. I was intrigued.

My search brought me to a number of posts on Drupal.org by user Omega8cc. For every post I came across, it was evident that Omega8 was doing everything possible to be helpful.

This caused me to click on Omega8's signature, which took me to their home page for Drupal hosting. Based on my current level of frustration with having accidentally messed up network settings on a server box while adding a new IP (never lock yourself out of your own server if you can avoid it!), I contacted Omega8 and asked to test out their services.

Long story short, I couldn't be happier. Watch the video to get a real sense of why I'm so impressed with this Drupal hosting company. They exist in the world of Drupal so you know they're doing everything they can to make Drupal perform like it should.

And this is only the start of it. Wait until I make some videos about using Aegir and being able to quickly, and easily, create any number of Drupal sites your heart desires!

Pages

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web