Author Archive
Blocks that appear based on taxonomy in Drupal 6
Posted by: mark in Saturna Project on April 20th, 2009
Discovering the power of the Views and Taxonomy modules solved a huge number of frustrations I had when I was designing our site. But to get the subsequent Blocks to appear on the correct pages with the correct content is tricky.
This problem is easily solved with some PHP cut and paste magic that gets inserted in the configure section of the specific Block you want to control (See image for the exact location of where the code goes). This page in the Drupal forums has a list of great snippets that can help with organizing Blocks with PHP. I was stuck two of them together to get the following code, that makes a specific block appear on certain pages, and also a certain page type if the taxonomy term is correct.
To find out the number corresponding to any of your Taxonomy terms, go to the Taxonomy section in your admin menu and in "list terms", hover the mouse over any given term and the term's number will appear at the bottom of your browser.
To use this code, just replace the term number and the Drupal paths with your own and change the FALSE / TRUE variables as you like.
<?php
$match = FALSE;
$url = request_uri();
if (strpos($url, "fogalarmbuilding")) {
$match = FALSE;
}
if (strpos($url, "community_stories")) {
$match = FALSE;
}
if (strpos($url, "saturnina_stories")) {
$match = TRUE;
}
$desired_term = 4;
if ( arg(0) == 'node' and is_numeric(arg(1)) and arg(2) == FALSE ) {
$node = node_load(arg(1));
if (is_array($node->taxonomy)) {
foreach ($node->taxonomy as $term) {
if ($term->tid == $desired_term) {
$match= TRUE;
}
}
}
}
return $match;
?>
How to get video into Drupal 6.
Posted by: mark in Saturna Project on April 9th, 2009

This might seem like an incredibly easy question to answer, but as a first-time Drupalist, with this being the first feature I tried to add to our site, I ended up experimenting with several different module combinations and ripped out all of the hair I had left before I finally got the videos playing.
To actually get the video files to play in Drupal, I followed this tutorial from Drupal Therapy: http://drupaltherapy.com/node/50, which uses the FileField and jQuery Media modules, running the videos in the free JW Mediaplayer http://www.longtailvideo.com/players/jw-flv-player/.
The JW Mediaplayer is probably the best bet in terms of a player, and its customizability was ideal for streaming video online as well as creating an off-line video gallery that could play in the Fog Alarm Building.
Once you have videos playing with jQuery Media and FileField, you'll probably want to get rid of the annoying FileField icon that appears just below the video. There are several posts in the Drupal forums about how to do this with PHP code, but it's simplest to just add the following code into your CSS file:.filefield-icon {display:none;}
Thanks to Saturna Island!
Posted by: mark in Saturna Project on March 4th, 2009
The team just got back from Saturna Island and we are completely amazed at the warmth and hospitality of everyone we met, especially the people we stayed with, everyone who fed us, drove us and boated us around - we are so impressed with the Saturna community and all of the amazing projects they are working on. Thanks!
Saturna Expedition
Posted by: mark in Saturna Project on February 27th, 2009
After many weeks of hearing about Saturna Island, reading about, looking at pictures of the FAB, charting courses on old maps, and new maps, we're finally visiting the island! All five members of the project team will be on Saturna Island from today until March 2nd. We can't wait to meet everyone and see all of the places we've heard so much about.
The Saturna Project will be a Drupal 6 site
Posted by: mark in Saturna Project on February 21st, 2009
The Saturna Project website is going to run on Drupal. There are a several reasons we decided to use Drupal, one of the major ones being that it's open-source, so there's a great online support community. Another reason is that it's easy to create templates so new stories can be added to an existing Saturna site and blend in with the existing stories about the FAB and the Spanish exploration of the island. In addition to that, other communities can easily build their site, using their heritage buildings or stories as a focus, and they don't need to have a vast knowledge of computer code.
Visit the Drupal.org site to learn more.
Saturna’s Fog Alarm Building
Posted by: mark in Saturna Project on February 2nd, 2009
The FAB is Saturna's Fog Alarm Building, the most photographed building in the Gulf Islands. Located on Saturna Island's East Point, in sight of the San Juan Islands, it's one of the best places in BC for terrestrial whale watching - which means you can see the whales from land, not that you can see land whales.Saturna's rehabilitated fog alarm building
Also visible from East Point is the aptly named "Boiling Reef", making the narrow passage around the island and out to sea even more difficult to navigate. Not only has East Point seen a great deal of history and fascinating stories pass by and over it for centuries, but the lighthouse and the FAB saved lives and ships for decades prior to automation and then the use of GPS.
East Point had a diaphone fog alarm, a Canadian invention that forces compressed air through a pipe similar to how an organ creates music. Each fog alarm along the coast had a distinctive rhythm so ships' captains would know exactly which fog alarm they were near.
The original lighthouse building on East Point is gone, but the local community stepped in to save the fog alarm building from being demolished. What I find so great about the FAB rehabilitation project is that the aim is not simply to preserve a building, but to take a heritage building and give it a modern purpose, turn it into a focal point for community and tourist interaction, connecting the past with the island's very vibrant present.















