drupal

Drupal performance tutorial at PHPNW 7 October

The PHP North-West conference is an annual conference favourite of mine...This year they're running a tutorial day for the first time - and I'm pleased to say I'm running a tutorial on Drupal performance (and the tools we use to make Drupal faster).

I'll be talking about topics including:

Hacking contextual links in Drupal 7

Drupal 7 comes with some cool new tools like contextual links

Contextual links are added to blocks using hook_block_view or hook_block_view_alter:

Building a WYSIWYG plugin in Drupal

As developers, we usually praise and curse WYSIWYG editors equally. They all suffer from issues, but they're usually better than the alternative - trying to convince clients and content editors to use raw HTML? Not likely!

These usually work with input filters: say for example, you have a YouTube plugin which lets you enter a video ID and embeds the video in the post.

Customising the labels on radio-buttons

Thought I'd quickly blog about this whilst this is fresh in my head!

Sometimes you want to add detail to a set of radio-buttons - e.g. you may want to show an example image below the radio-button's label:

Choose cable connection
( ) VGA
    [ pic of VGA cable ]

( ) DVI
    [ pic of DVI cable ]

( ) DisplayPort
    [ pic of DisplayPort cable ]

Overriding URLs with Drupal panel pages

Hi, My name's Marcus, and I'm addicted to Drupal panels.
(For those of you who haven't come across this wonderdrug before, panels is a layout-engine for Drupal: it lets you add and lay out content, blocks, views and other panels on the page. And it's awesome!)

Panels has a UI which lets you setup new panel pages: e.g. you could add the URL /jobs for your jobs listing page.

A set of system URLs can also be overridden: e.g. node/%node can be overridden to use a panel-page instead of the core node_page_view function.

Anti-virus for Drupal sites

Anti-virus is a subject that's drummed into us continually, bombarded as we are by a constant barrage of infected emails, exploits, attacks on web-servers.

Your server may well be firewalled, patched, protected by strong passwords and all the rest, but many Drupal sites have an attack-vector left wide open: file uploads.

Drupal and Varnish - a quick intro

Varnish is a HTTP accelerator (or reverse proxy) capable of serving 100,000 requests a second. Somewhat faster than Drupal, even with page-caching on!

How does it work?

Diagram of the varnish process, explained in more detail in the list below.

Panels magic

I love unexpected discoveries.

Drupal's Panels module seems to find its way into most of my site builds, along with custom layouts, panel-panes and all sorts of goodness.

I used to declare custom panel layouts this way:

Drupal and the spirit of openness

So what does it take to get accepted around here?
I've started this post to kick off a discussion about the Drupal database abstraction layer, and how to encourage support for other databases.

Overriding language for a Drupal backend

Someone in my DPC Drupal tutorial brought up the topic of multi-lingual sites, and asked how to run the backend of the site in English, when the frontend is in Dutch...

Text in Drupal should run through the t() function, which handles translation. t() checks the global $language variable to choose the target language ($language may be set from user preferences, from a path parameter, from content-negotiation...it will be set automatically).

The solution is to implement an early bootstrap hook - hook_init - to change the language.

Subscribe to RSS - drupal