Articles about Drupal

Using Apache to block Spammers

Last month I wrote a post about blocking spammers from a Drupal (or any Linux / Apache) site by identifying the originating IP address from the watchdog table.

By way of an update I thought I'd share a way you can do this using the Apache configuration. Ideally this would be done in the vHosts/Httpd files if you manage your own server but works equally well within the .htaccess files that most people have access to on shared hosting.

Entity Translations and the published status flag

Always nice to start the new year with a challenge.
I created some new products for a client's Drupal Commerce site and translated them into 10 languages. All good until it was noted that the view that displays the products was showing the new products in Dutch not the default English - although all other products were showing up in the correct language.

Drupal 7 menus in a localized site

i18n / Internationalization module

We use the i18n menu module that comes with the Internationalization module.
While the module provides configuration options for language specific menu items, simply enabling the module creates a new translation text group called "Menu" that exposes all menu items to the translation interface.

You can use the translate interface to translate all the menu items except for once created by nodes for those you should translate the node and specify the translated menu title.

Blocking Spam Comments

One of the housekeeping tasks that I undertake is to review the activity of comment spammers on our websites.
All of our Drupal sites use Mollom to keep us almost Spam free (big thumbs up to Mollom!)
But if you review the logs you can see that Mollom is protecting you from an alarming rate of attack and it would be good to not bother ourselves or Mollom with such traffic is possible. So the solution is to drop the traffic upstream of our web sites.
There are many ways of doing this from Firewalls to Drupal modules.

The Commerce Detective: Cloud Zoom JQuery plugin 404 errors - A solution

If you have been enjoying the Drupal Commerce Kickstart demo of what Drupal Commerce can do you are likely to be greatly inspired to use the techniques showcased in this amazing product. However you may not yet have noticed that you are getting 404 errors on the product page. In this post I cover how to solve this issue.

Drupal Translation Magic

When you create a multilingual site with Drupal there are lot of things to consider; should I use content translation, entity translation, what about views, what about node titles.

There are lot of great resources out there and with a little lot of effort you can get it all working.

However one thing that is easily overlooked is all the strings you use in your jQuery files.

How to let users create 'unpublished' content in Drupal 6

Basic Content authoring in Drupal

Each node in Drupal has an option to be 'Published' or 'Unpublished Published' under “Publishing Options” in the node edit screen. This enables content authors to be able to create content before publishing it on the live site. The field out of the "core" box can have the values of published and unpublished (this can be extended but that's a topic for another post).

Drupal Behaviors, Ajax and doing it once

After wrestling with this for a while this evening it struck me that it isn't a very well documented area - so I thought I'd make a quick post as much for my own notes as hopefully assistance for someone else.

The issue:  You have some jQuery that runs once the page has loaded and you find that it runs on Ajax post backs .. Ugh!!

The end result is that you get the behaviour repeated every time the code runs - not nice.

The answer lies in the use of the jQuery .Once() - see http://drupal.org/update/modules/6/7#jquery_once

Drupal Open Office and Brighton Area Drupal Weekend

As part of the Brighton Digital Festival and the Brighton Area Drupal weekend Blue-Bag and  three other Drupal houses in New England Gouse Brighton UK will be opening their doors this coming Friday.

Why are you looking for my crossdomain.xml?

If you are developing commerce sites and review your logs regularly, chances are you will come across 404 errors looking for crossdomain.xml. We get a lot from the plugins that looks for coupons on e-commerce sites (e.g. Drop Down Deals). In fact you are likely to get them on any sites you develop - but we have seen them more frequently on ecommerce sites.

Top Tip: Drupal Views - No valid values found on filter

Expose your Master display!

Views ErrorNow and again a little issue occurs that makes you pull your hair out.

I like to have NO errors on my sites and today whilst refactoring a view kept getting this error: No valid values found on filter: Content. But all my filters seem OK and the views work fine....

Doing it the Drupal way...

It is quite common practice to add head elements such as:

  • metatags and links such as webfont links and
  • xmlns namespaces

as text to the html.tpl.php or in template.php in hook_preprocess_html etc and other string based ways of doing things.
The problem with this is that it is hard coded and not the Drupal way. I have cobbled together some examples of how we do this in code (most of which have been gleaned from issue queues, posts and other great Drupal.org sources - credit to many anon contributors! The point here is simply to pull together some examples.

Drupal_add_js - Tip: Checking for javascript already added to page

We are working on a series of Facebook modules for Drupal at the moment. These enable us to use Drupal to serve facebook applications and integrate the site(s) we are developing tightly with Facebook. We are developing them as a set of submodules (more on that later...)
One of the issues we have faced is that javascript needed for opengraph integration may be added by more than one module (custom and contrib).
Using drupal_add_js() in several modules.

Drupal Commerce for Dickies Streetwear

We were engaged to create a socially linked ecommerce site for a new brand range of Dickies clothing - Dickies Streetwear. The brief called for a high performance state of the art site that engaged a growing customer base in the streetwear market. So rather than create a run of the mill ecommerce catalogue site we wanted to create a rich user experience based around news and social media with purchasing opportunities presented across the site.

Drupal Discovery Day - Brighton

Drupal (pronounced drew-pull) is a Content Management System and web application development software written in a popular scripting language - PHP. Drupal has over 11,000 modules and over 1,000 themes, along with both a point and click interface to allow tech-savvy people to put together websites with no programming experience; and an API and framework for programmers to develop unique applications. Best of all, it's free, open source software!

Drupal Commerce Order display - Missing Template filename and path - .tpl.php

Wrestling with an error message on a Drupal Commerce site today. I kept getting errors relating to a missing template file with no path and no file name .tpl.php. Fortunatley with a little debugging giving me a pointer to the correct issue queue on Drupal the solution was readily available. So here's a few easy steps to follow in case you have the same issue.

Importing Products Displays and related Products to Drupal Commerce

In this post I am going to look at Drupal Commerce and demonstrate how to prepare e-commerce product data for import into Drupal Commerce - and show how to create a delimited list of product references to link the products to their display nodes. These techniques supplement the wealth of great practical demos and documentation provided by the Commerce team.

Top Car Dealership adopts Drupal

Kambara has just launched a new website design for Burton Kia at www.burtonkia.co.uk.

History of Parliament Online - Uses Drupal

We were engaged by the History of Parliament Trust to work on their flagship website that publishes the results of research into the members and constituencies of all British parliaments since 1386.

See for yourself at : http://www.historyofparliamentonline.org

This data rich web site is managed by the Drupal CMS and has tens of thousands of 'nodes'.

Contact