Drupal

Drupal for Publishers notes

Blog Post

This week I attended the Drupal for Publishers event that was held at the Sun Microsystems office in central London. As the name suggests, the event was aimed squarely at publishers. I work for the UK's biggest magazine publisher, so I thought I should attend! I was not disappointed.

Read Drupal for Publishers notes

2Bits has a great piece of advise when it comes to extending Drupal. A very common trap is just keep on adding more and more modules to achieve the required functionality. That is what makes Drupal great but at the same time, too many modules can have a seriously negative effect on a sites performance.

Get Less Modules, More Extending Link
See video

Creating an effective deployment process has historically been a nightmare with Drupal. A deployment process should include pushing content and configuration settings (and code) from dev server to stage server to live server. In many cases, pushing content from live server back to stage server will also be required (to test on the stage server with real life content).

See Demonstration of Drupal deploy module Video

User can’t edit a node – Drupal troubleshooting

Blog Post

From time to time a user may not be able to edit a Drupal node and you end up tearing your hair out trying to figure out why. Sometimes the solution is obvious, and sometimes it is not. This post will take you through some of the main reasons for the problem along with suggested solutions.

Read User can’t edit a node – Drupal troubleshooting

This snippet should be added in a block under "block visibility". "Show if the following PHP code returns TRUE" should be selected.

It is designed to display the block if the node has a term that belongs to a given vocabulary (specified in the top of the code). It will also show the block on a term page if that term belongs to the given vocabulary. An additional page can be nominated if desired.

The $vid and $page should be adjusted as follows:

$vid = the vocabulary id eg 11
$page = another page that you specify for the block is display on. eg 'drupal'

See Block visibility by vocabulary Snippet

Use this snippet to find the URL alias for a node by looking it up in the url_alias table by its node ID.

See Find URL alias for a node Snippet

This will checkout a Drupal contrib module.

-d module_name is the name of the folder that it will be added to (put in path if necessary)

DRUPAL-5--X-X - This should be the version of the module. For example, if the latest stable version is 5.x-1.4, then change this to DRUPAL-5--1-4

contributions/modules/module_name - change module_name to the module name

See Check out Drupal Contributed Module from CVS Snippet

This will update the code base to Drupal 6.10. Change to what ever version you want.

See Update Drupal from CVS Snippet

Command to checkout Drupal from the drupal.org cvs repository. This will checkout the latest tag in the Drupal-6 branch. It will add it to a local folder called drupal6.

See Check out Drupal from CVS Snippet

Advanced Forum (Drupal module) comes with a few variants on the theme. The following can be added to the sites main theme style sheet and adjusted to suit. This will override most of the colours of that come with Advanced Forum.

See Override Advanced Forum Colours Snippet

This example will print our human readable information about the $_SESSION inside a drupal_set_message. You can replace the $_SESSION with any other variable or array (or object).

See print_r in drupal_set_message Snippet

Happy 8th birthday Drupal!

Blog Post

Drupal has turned 8 today, so happy birthday is in order. It is a day for the whole Drupal community to celebrate what they have created, a fantastic project/product. Not only has Drupal survived 8 years in the ultra fast paced web market, but it is going from strength to strength. Well done everyone.

Read Happy 8th birthday Drupal!

Add to the .htaccess file when Drupal is install in a subfolder of a main site.

See Drupal in subfolder .htaccess Snippet

What makes Drupal special video

Blog Post

Here is an nice interview with Scott Mattoon from Sun Microsystems. He is talking about why Drupal is great.

Read What makes Drupal special video

Drupal wins Packt Publishing 2008 Open Source CMS Award

Blog Post

Drupal has won Packt Publishing's Open Source CMS Award for 2008. This is the second year in a row that Drupal has won the overall CMS award and is in addition to the Best PHP Based Open Source CMS Award for 2008. It is testament to tremendous progress that Drupal is making as an open source product to be to be reckoned with.

Read Drupal wins Packt Publishing 2008 Open Source CMS Award