Author Archive

Blocks that appear based on taxonomy in Drupal 6
drupal_block_php_specific_pagesDiscovering 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;
?>

No Comments


How to get video into Drupal 6.

Saturna Project documentary screenshots

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;}

, ,

No Comments


Thanks to Saturna Island!

Team Saturna at the Fog Alarm Building on Saturna's East Point

Team Saturna at the Fog Alarm Building on Saturna's East Point

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!

,

No Comments


Saturna Expedition

Saturna Island's Fog Alarm Building  (photo by Gerri Sinclair)

Saturna Island's Fog Alarm Building (photo by Gerri Sinclair)

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.

,

No Comments


The Saturna Project will be a Drupal 6 site
drupalThe 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.

,

No Comments


Saturna’s Fog Alarm Building

Saturna's rehabilitated fog alarm building

Saturna's rehabilitated fog alarm building

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.

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.

1 Comment