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 26th January 2008
Takes about 1 min to read

Just flagging this as a bit of an issue - it appears there is fairly serious bug in the version of the filter module provided in Drupal 5.6 which prevents you from saving changes to the allowed HTML tags A patch is available on drupal.org but it's quite well hidden! Post number 7 in this thread contains a working patch http://drupal.org/node/208700 An alternative solution is to download the 5.x HEAD http://drupal.org/drupal-5.x-dev) and take the version...

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

Its a tricky Drupal taxonomy problem this one, imagine you have just set up your taxonomy to represent types of web sites: Drupal based Sites Drupal based ecommerce Standard CMS site Social Networking Site Joomla based Sites Simple one page site You set up your node type 'site', and set the vocabulary to apply to it. You create your first site and pop it into the 'Standard CMS site' category, you create another in the...

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

This was written in response to a post on drupal.org regarding query strings in drupal menu items. Currently if you create a drupal menu item linking to an external site with a querystring then this will render correctly. However if you try and use a relative URL (i.e. an internal link) then your querystring will be escaped and the URL won't work. This override lives in your template.php file and parses all your menu paths...

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

This small theme override will allow you to select which Drupal textareas the image assist icon will appear on /** * Theme for adding an image link underneath textareas */ function phptemplate_img_assist_textarea_link($element, $link) { if ($element['#id']=='edit-body'){ return theme_img_assist_textarea_link($element, $link); } } The above code will limit the icon to appearing on only the node edit body fields, you can add more ids as required

Published in: #Drupal #Drupal Planet
Article
Posted on 21st December 2007
Takes about 1 min to read

Just a quick one this, and not strictly Drupal related - but might save you some time when you are writing modrewrite rules to rewrite legacy URLs. The problem : We had a whole bunch of legacy URLs in the format index.php?Page=SomePageHere which we needed to rewrite to point at some shiny new Drupal URLs. A simple RewriteRule wasn't working, and after a bit of digging we discovered you can't reference the querystring within a...

Published in: #Drupal #Drupal Planet
Article
Posted on 16th December 2007
Takes about 1 min to read

You have to be a little careful with this one, but there are many times when in would be very handy to have HTML in your Drupal menu items. For example, you might want your Drupal menu to have a
to force a break, or perhaps insert a around some content to get a two-tone menu item Add the following to your Drupal theme's template.php file function phptemplate_menu_item_link($item, $link_item) { $output = l($item['title']...

Published in: #Drupal #Drupal Planet
Article
Posted on 16th December 2007
Takes about 1 min to read

The Drupal search block form is one of those things that gets used in most themes, and frequently needs a bit of themeing to bring it in line with your target design. The following snippet (which needs to live in your template.php file) will change the word "Search" in the submit button to "Go", and will add a title to the search terms box ... function phptemplate_search_block_form($form) { $form['search_block_form_keys']['#title']='search the site'; $form['search_block_form_keys']['#size']=10; $form['submit']['#value']='GO!'; return drupal_render($form)...

Published in: #Drupal #Drupal Planet
Article
Posted on 16th December 2007
Takes about 1 min to read

The contact page exposed by the Drupal contact module is great, it allows you to put together a contact form quickly and easily. But there is one small(ish) problem, the header text for the form is being filtered - which prevents you from using certain tags (for example embed). We found this problem when trying to embed a youtube movie onto the drupal contact form. The solution is a little bit of themeing - put...

Published in: #Drupal #Drupal Planet
Article
Posted on 13th December 2007
Takes about 1 min to read

One of the classic Drupal problems that catches a lot of newbies out is the memory error exhausted error. Typically you get this on the modules page - but it could appear almost anywhere. Its nothing much to worry about and can be easily solved by following the advice posted here http://drupal.org/node/76156

Published in: #Drupal #Drupal Planet
Article
Posted on 12th December 2007
Takes about 2 mins to read

Its always the way, you go months without dealing with flash in Drupal when all of a sudden you get 5 people all asking the same thing, how do you deal with flash in Drupal. We use the swftools module (http://drupal.org/project/swftools), these excellent modules give you an easy way to embed flash objects in your Drupal site. We will cover the basics of adding flash content to your Drupal site below. Download swftools from drupal.org...

Published in: #Drupal Planet