December 21, 2007

The Wild Ones

Six years. That seems such a long time to have been without Karen. I don't think I set out to create a tradition of musical remembrances, but looking back at previous entries that's how it seems to have turned out.

I'm quite happy with that, after all music is an important facet of life for me. It was also a big shared interest between Karen and me - our musical tastes were quite different, but there was a lot of overlap. We often introduced each other to new bands or music that we'd discovered, or at least, we did once she'd outgrown Bros and Jason Donovan...

The most obvious example of this is Suede. Karen was a big fan of theirs, but I didn't really rate them until she lent me Dog Man Star. That was the first of many Suede albums that I bought, and still my favourite by a long chalk. So what better a choice for this year's song?

Well, actually it's quite a melancholic album, whilst I was looking for something more optimistic and up-beat. Still, The Wild Ones (as one of the less gloomy tracks) it is...

"We'll be the wild ones, running with the dogs today."

Tags:

Posted by Adrian at 02:24 PM | Comments (0) | TrackBack

December 18, 2007

links for 2007-12-18

Posted by delicious at 08:17 AM | Comments (0) | TrackBack

December 17, 2007

Writing the User Guide for the Website Owner in Drupal

Every now and then I end up building a website for someone, and these days I'm tending to pick Drupal as the starting point. It's got a huge number of extensions and modules you can add, and an active developer community.

Part of the reason for going with a Content Management System (the fancy title for the category of website software that Drupal falls into) is that it makes adding and managing content easy for the non-web-developer website owner. That means that there's less work for me to do to keep it running, and more importantly means that whoever runs the website doesn't have to wait for me to find some time before they can change anything.

In order to make updating the website easier for the owner, I try to document some of the basic tasks - adding a page; putting a new product in the catalogue; etc. - in some help pages on the site itself, but obviously I don't want those pages to be visible to normal visitors to the site.

To save me reinventing the wheel next time I'm building a site, here are the details of how I add the 'Staff User Guide'.

A Different Class of User

In order to stop normal users from seeing the "Staff User Guide", we need some way to differentiate between them. I tend to create a new user role for "website staff" anyway, rather than give them the same privileges as "admin".

So, on the page /admin/user/roles add a new role "Staff user", and assign that role to any users who will be updating the website.

Restricting Access to the User Guide Content

With the out-of-the-box installation of Drupal you can't (to my knowledge) prevent anyone from seeing any of the nodes (Drupal-speak for a page, or chunk of content). We could just hide the links to the user guide from normal users, but it would be better to prevent them from accessing them at all.

That's where the Content Access module comes in. Install the module in your Drupal site and enable it on the modules page.

This module allows you to choose who can access (view, edit or delete) any type of content. When editing a content type you'll now have a new page of options entitled "Access Control". For each user role you can decide whether they can view, edit or delete nodes of that content type.

So, let's create a new content type called "User Guide Page", of type "userguide". Then set the access control so that only the "Staff User" role can see or edit the pages.

Optional: If you're using the Pathauto module, and want your user guide pages to have nice URLs then remember to update the setting on the Pathauto configuration page. For example, to have all user guide pages appear at "/userguide/name-of-page", set the pattern for all user guide page paths (in the Node path settings section) to userguide/[title-raw].

Creating the Index

Now you're free to start adding pages to your user guide, by creating new "User Guide Page" nodes. However, one last setup task is to provide a way for the staff users to find and browse through the guide. As I don't expect there to be too many pages in my user guides, I'm going to keep it simple and list them all in a new block in the sidebar.

Go to the Blocks admin menu (/admin/build/block) and add a new block. I called mine the "Staff User Guide" (in both block description and block title) and then chose the "Staff user" as the only role who can see the block. Then I added this snippet of PHP code as the block body, and chose "PHP Code" as the "Input format". It's fairly simple, all it does is find all the nodes of type 'userguide' and creates a simple bulleted list of links to those nodes. (If you chose a different name for the type of your content type, then replace 'userguide' with your name).

<p>Explanations of how to do common tasks on your website.</p>
<?php
  $results = db_query("SELECT nid FROM {node} WHERE type = '%s'", 'userguide');
  $output = '<ul class="menu">';
  while ( $data = db_fetch_object($results) ) {
    $node = node_load($data->nid);
    if ($node->status == '1') {
        $output .= '<li class="leaf">';
        $output .= l($node->title, 'node/'.$node->nid);
        $output .= '</li>';
    }
  }
  $output .= '</ul>';
  print $output;
?>

There you go. Choose where you want the block to be displayed, and then get on with writing your user guide.

Tags:

Posted by Adrian at 07:37 PM | Comments (0) | TrackBack

Don't Buy This to Stop X-Factor Being Christmas #1, Buy It Because It's Good

lucky soul for christmas no 1

Being in Italy this year has meant that the humiliation-circus that is X-Factor has completely passed me by, and what a wonderful thing that is.

At least it had until I read Dave Gorman's impassioned plea for people to buy something decent instead. He's nominated Malcolm Middleton's We're All Going To Die, which is a bit depressing but quite catchy...

And one of the commenters on Dave's blog reminded me that last.fm have a Christmas number one campaign too. I hadn't checked it out when they emailed me about it, but I've just had a listen and it sounds great. Surely well worth the 40p(!) it costs to buy, and the profits are all going to charity too.

How many more "it's worth it just for that" boxes does it have to tick?

Tags:

Posted by Adrian at 10:30 AM | Comments (2) | TrackBack

December 16, 2007

geekGreen - a Great Idea for a Conference

Mark Simpkins has floated the idea of geekGreen, a conference he wants to organise to encourage "radical ideas and stories in the time of climate change".

I'm posting this because I think it's a great idea, that needs more support so that it will become a reality. I think the idea of an "unconference" for the third day is superb.

I'm also going to use this post to register my interest in attending, and maybe even speaking, because I can't be bothered creating yet another login for a site just to leave a comment. If it's on when we're back in the UK then I'll definitely be attending, and I'll have to see how the finances are if we're still here in Turin. I'm still disappointed that I missed Interesting 2007 because we were in the middle of moving country.

And speaking of Interesting 2007, it's organiser, Russell Davies, has is collecting suggestions for conferences to attend. There are plenty of suggestions in the comments if anyone wants to find something to attend next year...

Tags:

Posted by Adrian at 12:08 PM | Comments (0) | TrackBack

links for 2007-12-16

Posted by delicious at 08:17 AM | Comments (0) | TrackBack

December 13, 2007

It's Not THE Environment, It's OUR Environment

Two important and related links about climate change and global warming.

Via Greenormal is news of the urgent need for people to show the world governments at the climate summit in Bali that we care about tackling climate change.

Sign up at avaaz.org

Here's what it is about (from the AVAAZ website):

"Climate negotiations in Bali are in crisis. Things were looking good till now: near-consensus on a delicate deal, including 2020 targets for rich countries, in return for which China and the developing world would do their part over time. IPCC scientists have said such targets are needed to prevent catastrophe. But Japan, the US and Canada are banding together to wreck the deal, and the rest of the world is starting to waver... We can’t let three stubborn governments throw away the planet's future. We have until the end of Friday to do everything we can. Please sign our emergency global petition below -- we'll deliver it through stunts at the summit, a full-page ad in the Jakarta Post in Asia, and directly to country delegates to stiffen their nerve against any bad compromise. Add your name to the campaign below now!

THE PETITION: We call urgently for the US, Canada and Japan to stop blocking serious 2020 targets for emissions reductions, and for the rest of the world to refuse to accept anything less."

And once you've signed the petition, head over to the RSA website and listen to the lecture given by Lord Puttnam (see the entry for 6/12/2007 entitled The Light That's Lost Within Us) from last week. It's a clear, and well thought-out piece about why we should be doing something about global warming.

His slavery analogy, and an audience member's observation (from which the title of this entry comes) are particularly good. Both were covered by Mike Reed when he wrote about it whilst guest blogging at Noisy Decent Graphics. So if you don't want to listen to the lecture, at least go and read Mike's summary.

Tags:

Posted by Adrian at 07:56 PM | Comments (0) | TrackBack

Merry Christmas Everyone

Picture of us in Via Mazzini with the Christmas lights in the background

Wishing you a great Christmas and a fun New Year

Adrian and Rebecca

Posted by Adrian at 09:26 AM | Comments (2) | TrackBack

December 05, 2007

Mountains and Biking, But Not Mountain-Biking

Picture taken from Ponte di Sassi in Torino with the Alps in the background

Since moving to Turin I've hardly done any cycling. That's mainly a location thing - in Cambridge we lived on the outskirts of the city, and so cycling was the best mode of transport; here we live in the centre with most of what we want in easy walking distance.

We also use the car less than we did even in Cambridge. I think a lot of that is due to it being a five-minute walk from the apartment - you can get to a lot of shops more quickly than you can get to the car. In many ways I prefer not having the car so near as you actually consider whether or not it's the best option, and it often isn't. I still don't know if I'd deliberately choose to park so far away however...

Anyway, that's not what this entry is about. It's about getting back in the saddle and enjoying yourself. I went for a ride along the river, spending most of my time away from the main roads. I got a closer view of some of the locations used in The Italian Job (one of these days I might do an Italian Job tour of Torino and post some photos); watched the ducks, gulls and herons on the river; and got some wonderful glimpses of the mountains - like the one in the photo above, taken from the Ponte di Sassi (Sassi Bridge) at the mid-point of my route.

And if you want to see some closer shots of the mountains, Rebecca has posted the photos from our recent walking expedition.

Tags:

Posted by Adrian at 01:25 PM | Comments (0) | TrackBack

December 03, 2007

If Not Hot Water, Then Something Else?

In a recent email (after my follow-up posting about the solar-water-utility), Jeff wondered if I'd heard of heat pumps and whether they'd be a better solution than solar water panels.

They are something I'd heard of, in fact I saw one in the flesh during the tour of the AC Architects practice a couple of years back. They also had photos taken during the installation, when they sunk the boreholes for the pipework. More recently I'm sure I've heard about air-to-air heat pumps, which I imagine aren't as efficient but don't need you to dig deep holes in your garden.

It isn't something I'd considered with respect to the Green Utility (I can't call it the Solar Water Utility now, can I?) and I'm not going to invest any more time looking into it now, but it's a good idea.

However, today the House 2.0 blog has a post about some experiments that Barratt have been carrying out with Manchester University which give some interesting data points for anyone who would be building the Green Utility. Not taking into account inflation (or presumably other possible energy price increases), they've calculated the payback period for a number of green technologies:

Domestic wind turbines
Although in theory these are a useful approach, with the current technology (possibly the electrics side, rather than the wind "capture") in practice they aren't any use.
Photo-voltaic panels
A £4,500 solar electricity generation system would take 37.5 years to pay for itself
Ground source heat pump
Not as efficient as makers claim, but still worthwhile. A £7,800 system will reduce a home’s carbon emissions by 62% and has a payback period of 15 years.
Solar hot water
They didn't work out the payback period for solar hot-water but did comment that, although they heated water to much higher temperatures, the evacuated tube collectors didn't really provide any benefit over flat-plate collectors, so weren't worth their extra ~£1,000 cost.
Micro CHP (Combined Heat and Power - units that generate both heat and electricity)
No payback figures on these either, although they give figures for the power generated during the year's testing. It might also be worth reading another House 2.0 entry about micro CHP which comments on a report casting doubts over their validity in domestic situations.

Tags:

Posted by Adrian at 11:10 AM | Comments (2) | TrackBack

links for 2007-12-03

Posted by delicious at 08:17 AM | Comments (0) | TrackBack

December 02, 2007

30-in-30 Post Mortem

Well, it's now December which, amongst other things, means that my do something to improve my Italian each day in November challenge has ended. So how did it go?

I think it went okay. I achieved my thirty tasks and my Italian is a lot better than it was a month ago.

It wasn't all plain-sailing - with just over a week to go I was running three days behind schedule but that shows that I hadn't made the challenge too easy. It needed that extra bit of effort towards the end to hit the target. I think the variety of tasks helped when I was lagging behind as it meant I didn't have to face a growing pile of identical work, and I could pick something that suited my mood or motivation. My tasks included working through the My First 100 Italian Words book I got for my birthday; watching a learning Italian course I'd recorded from BBC Learning Zone; attending the social gatherings organised by the language institute where Rebecca is having Italian lessons; and day-to-day tasks like getting my haircut or dropping off my dry-cleaning.

I'm sure I could've made more progress too, but pitched as it was I didn't have to sacrifice any of my other work, which I'm pleased about.

Tags:

Posted by Adrian at 12:54 PM | Comments (0) | TrackBack