Planet image

The articles on this page are ComputerMinds' contribution to the Planet Drupal aggregated article feed.  Planet Drupal is intended to collate interesting and useful Drupal content from around the web.

Article
Posted on 15th August 2008
Takes about 1 min to read

One of the joys of working with Drupal 6, and views 2, is that you have to relearn a lot of things you used to take for granted ... one trick we use in most projects is embedding views filters in blocks, nodes or custom code. There are plenty of scenarios this is useful, the classic being to create a flexible views based replacement for the normal Drupal search. Anyway, enough of the blurb -...

Article
Posted on 3rd May 2008
Takes about 1 min to read

Another quick one this, we recently had a small client experience issues with their Drupal site which was hosted on lycos webhosting. They hadn't changed anything on the site, but suddenly they were getting nothing but 500 (internal server) errors. The solution turned out to be the .htaccess file, and specifically the following 2 lines Options -Indexes Options +FollowSymLinks Commenting them out solved the problem and the site was back up and running.

Published in: #Drupal Planet
Article
Posted on 1st May 2008
Takes about 1 min to read

A quick post about the Drupal tinymce module and it's tendancy to display all it's buttons in one inflexible line. The following CSS will split the tinymce buttons onto several lines. .mceToolbarTop * { float:left; } .mceToolbarTop select { width:auto!important; } .mceToolbarTop option { float:none; }

Published in: #CSS #Drupal Planet #Theming
Article
Posted on 27th April 2008
Takes about 2 mins to read

Upgrading from Drupal 4.6 has always been complicated by issues of character sets, but the Drupal upgrade scripts normally solve most of these problems for us. But when your dealing with a complex upgrade you need a good understanding of how Drupal is dealing with character sets in Mysql. It all comes down to this - pre 4.7 Drupal stores utf8 encoded data in latin1 based tables (although this sounds a bit silly there were...

Article
Posted on 15th April 2008
Takes about 1 min to read

A rather obscure one this, but we found a problem today on one of our Drupal sites with the filter form on the node admin screen (admin/content/node). Changing the filter settings on the form had no effect, which prevented you from filtering the list of nodes. We tracked the solution down to the $_SESSION array being cleared between page reloads, and a quick google pointed the finger at the Remember me module. Disabling the module...

Published in: #Administration #Drupal Planet
Article
Posted on 12th April 2008
Takes about 1 min to read

We are in the process of putting together a large (20k products) store with ubercart and ran into some performance issues due to the hook_forms implementation. The problem obviously is that a form is being registered for each product regardless of if that product is being displayed or not. This is a bit unnecessary, so our solution was to do the following : comment out the hook_forms implementation in uc_product write a little module that...

Published in: #Drupal Planet #ecommerce #ubercart
Article
Posted on 12th April 2008
Takes about 1 min to read

The Drupal admin interface allows you to delete up to 50 nodes at one time, which is great - but there are times when you it's just not enough and you need to bulk delete many thousands of nodes. In this example we will delete all nodes of a particular type (page), a quick way to execute the code is to create a new node, set the input format to PHP, paste the code into...

Published in: #Drupal Planet #node
Article
Posted on 8th March 2008
Takes about 1 min to read

We make heavy use of the Drupal image assist module (or img_assist as its known) - but find that its handling of empty alt tags is quite poor. The problem being that if when inserting the image the user does not specify a caption or description then the alt (and title) attributes are both empty. This is clearly not ideal on a modern standards compliant site - luckily the solution to the image assist alt...

Published in: #Drupal #Drupal Planet
Article
Posted on 1st March 2008
Takes about 1 min to read

Building multilingual sites in Drupal using the i18n module always throws up a few fun problems to be solved. One of the most awkward being views. The i18n views integration module does an excellent job of allowing you to return only nodes matching a particular language, but it doesn't help when it comes to translating the view itself - and more importantly allowing a view to site nicely into multiple positions in the menu (one...

Published in: #Drupal #Drupal Planet #Drupal views
Article
Posted on 29th January 2008
Takes about 1 min to read

This little snippet lives in your phptemplate_variables function and will set a useful 'active' class alongside the not so useful menuid-active class which Drupal assigns to the active primary links foreach($vars['primary_links'] as $key=>$link){ if (strpos($key,'-active')){ $vars['primary_links'][$key]['attributes']['class']='active'; } }

Published in: #Drupal #Drupal Planet