drupal planet

Creating Custom Content Panes via code [Drupal 7]

For whatever reason there doesn't appear to be a lot of documenation around on defining Custom Content Panes within code.


Drupal Views Nivo Slider - Display original image rather than Imagecache style - Drupal 6

The Views Nivo Slider which allows you to create views which display using the Nivo Slider.

An issue I have had as well as other people (albeit in Drupal 7) have found that the module forces you to use an Imagecache preset. With a slideshow you are generally going to upload the right size image and don't want additional processing to be done on the image from PHP GD or ImageMagick.

Rackspace Cloud Files + CDN + FileConveyor + Drupal 6 = Not as easy as it seems

Drupal 6 - CDN support

To get the most out of the CDN module in Drupal 6 you will need to apply a patch or use Pressflow. Pressflow is a customised Drupal core that provides various performance tweaks under the hood. A lot of these were included in Drupal 7.

Showing a different View if View is empty in Views 2 in Drupal 6

In Views 3 a useful feature was added that when you had an empty view you could show a different view instead. Unfortunately within Views UI in Drupal 6 you can only add a basic text area. You could set up a PHP filter but that could cause problems with security.

This tutorial will guide you through showing another view if the original view is empty.


Create a new webform element in Drupal 7

Sometimes the default field types within Webform don't work as we want them to or we want to do something beyond which will work beyond a few hacks in the theme. The following will show you what is required to define a new field type and the necessary functions to make it work.


Drupal 7 - Defining rules within a module using PHP

It took a while to figure out with all information I could easily find relating to the Rules module using the UI to define rules.

But you can define some default rules within your module by using the function MODULE_NAME_default_rules_configuration() which sits within a file called MODULE_NAME.rules_defaults.inc in your module folder.


Drupal Commerce - Different prices for different customer groups

What are we looking to do?

When you have an online store, by default a product has a set price which is what everyone pays. You may have discounts through voucher codes but occasionally you want to offer a different price to shoppers i.e. wholesalers.

So what we will be doing is creating a new role called 'Wholesaler', adding a new price field to our product, then we will set up a rule which will calculate the right price for the wholesaler.

The tutorial will be focused around a basic Drupal 7 install with the Commerce module (and the other relevant modules installed).

UK Geocoding and mapping in Drupal 7

Geocoding UK addresses has always seemed to be a pain especially outside of Drupal. With Drupal 7 a few of the mapping/location modules that I have been used to using in Drupal 6 are either not available as a stable release or don't quite do what I wanted. A key example is Location which I have used on a Drupal 6 with which geocoding has never worked (I still don't know if it is something that should work out the box, it certainly seems to imply to me.)

A rash of new Drupal 7 modules has made the process a lot easier though.

Drupal 8 dev thoughts

Having just installed the Drupal 8 development version on to a local test site, it has raised a few thoughts.

Of course a lot of these could be fixed or the majority may disagree but either way. We have a long time before Drupal 8 will be shipping and as such have a lot of time to sort out any problems.

Adding color module support to your theme in Drupal 7

I have been playing about with creating my own base theme which I can use to easily roll out new sites quickly and easily for those who don't want to pay for a bespoke design.

The main problem with this is ending up with one theme for all, to get around this with out having to do any development work is use Drupal's core colour module which allows the user to select the colours of certain areas.

This will just show you the basic code that is required for use with a theme using the PHPTempalte engine with some comments on what the code is doing at parts.

Sorry but I will be using the English spelling, too used to typing with the 'u'.


Subscribe to drupal planet