Drupal Planet

Drupal-related blog posts pertaining to the community at large (code, advocacy, marketing, infrastructure etc.). These posts contribute to the aggregated content at the official Drupal Planet.

We work with Aegir and nginx a lot. Aegir's nginx configuration files have support for the robotstxt module out of the box, but this still requires you to remember to delete the robots.txt file from the root of the Drupal platform and install the module for it to work. To avoid these issues we swapped out the default robots.txt directives in nginx_simple_include.conf that ships with aegir for the following:

  1. ###
  2. ### Redirect requests for /robots.txt
  3. ### First we check for existance of site-specific robots.txt
  4. ### If none, we redirect to default drupal robots.
  5. ###

This weekend we were finishing off some work with our comments on our blog and we discovered that the current implementation of Livefyre Comments on Drupal.org left us having to hack the module since it provided no good way to alter the initialization settings for the module.

In Drupal 6 there is a version of the skinr module that allows using a tpl whenever a specific setting is chosen in the skin settings. We needed this feature in D7 as well. Here is what we did to accomplish it:

File: ./sites/[example.com]/themes/custom/[themename]/skins/styles/styles.inc

  1. /**
  2.  * Implements hook_skinr_skin_PLUGIN_info().
  3.  */
  4. function THEMENAME_skinr_skin_styles_info() {
  5.   $skins = array();
  6.  
  7.   $skins['style'] = array(
  8.     'title' => t('Style'),
  9.     'type' => 'select',

Yesterday we needed to hide some node titles on configured individual nodes. We found the great module Exclude Node Title but it didn't work when Display Suite is set to have the title rendered within the Display Suite view mode layout. Searched the Exclude Node Title issue queue and found a path, phew!

In a recent site we were working on we were encountering the error Undefined index in tao_textarea();. We were using tao as our base theme and we were creating a form under node/%node/path. It seemed as though it only occured when we followed documentation of the Drupal Form API by adding in some needed attributes under #attributes.

Syndicate content