Blogs

Programmatic node creation, Drupal 6 and the drupal_get_schema() function

Submitted by Jonathan Hedstrom on Mon, 06/16/2008 - 11:08.
While working on importing a bunch of content from an old Drupal site to a new one, I discovered a little gotcha with the D6 database schema. The method I was using involved loading a bunch of nodes from the old database via a call to db_set_active(), followed by a series of calls to node_load(). Once I had the nodes in an array, I switch to the new db via another call to db_set_active and store the nodes via node_save(). The problem arose due to the fact that Drupal is caching database schema information. Thus, during the node load phase, CCK attempts to load up information on a table that doesn't exist, and the result is cached. When back in the new database, where the table really does exist, the cached schema thinks it doesn't.

Drupal 6 and Primary/Secondary menu translation

Submitted by Jonathan Hedstrom on Fri, 06/13/2008 - 11:32.
I ran into the following issue while developing a bilingual (English and Spanish) site recently: I wanted the site, for ease of use, to have a single menu structure so translators didn't have to worry about mimicking the primary navigation every time they translated a page or added a new one. The problems, when the site was in Spanish, were three-fold:
  1. Primary links were linking to es/english-path even though es/spanish-path existed.
  2. For every sub item that was in English, when on the translated page, the secondary menu didn't display, since the menu system didn't see the translated page as a child of the parent.
  3. Both primary and secondary link text was still in English.
The 3 issues were solved as follows.

Session Favorites module released

Submitted by Jonathan Hedstrom on Wed, 06/04/2008 - 15:49.

The Session Favorites module provides a "Favorites" or bookmark system based solely on a browser cookie. This allows site visitors to aggregate lists of content without becoming full-fledged users.

The module can be configured on a per-node-type basis, and optionally provides AJAX add/remove links.

This module will soon work alongside the Favorite Nodes module, or possibly Views Bookmark (or both, depending on demand), such that once a visitor registers or logs in, their collected session favorites are transferred to the more permanent Favorite Nodes or Views Bookmark storage.

Search Engine Optimization Cheat Sheet

Submitted by Stephen Peters on Mon, 06/02/2008 - 16:17.
We're frequently asked how we get a web site to return well in search engines. Read this post for some hints and a link to a useful cheat sheet.

LinuxFest NW Presentation Slides Posted

Submitted by Cooper Stevenson on Tue, 04/29/2008 - 13:25.
LinuxFest NW Presentation Slides Posted

The seldom used hook_requirements()

Submitted by Jonathan Hedstrom on Mon, 04/28/2008 - 10:21.
Whilst writing the Video Upload module, I came across Drupal's hook_requirements() function. As it turns out, this is the perfect place to check for all the little stuff your module requires in order to function properly.

OpenSourcery in the blogosphere

Submitted by Thomas King on Mon, 04/28/2008 - 08:50.
OpenSourcery in the blogosphere

Introducing the Video Upload module for Drupal

Submitted by Jonathan Hedstrom on Wed, 04/23/2008 - 12:19.
The Video Upload module, while in alpha state, provides a CCK field type that allows for the end user to upload video directly to YouTube, using a single account for the site.

InnoTech Update

Submitted by Cooper Stevenson on Tue, 04/22/2008 - 09:32.
InnoTech brought with it a lot of learning and a few suprises!

Lovdbyless: New Social Neworking Platform for Rails

Submitted by Alex Kroman on Fri, 03/28/2008 - 13:06.
Lovdbyless: New Social Neworking Platform for Rails