listen > understand > code > teach
Building custom Web architecture with Drupal

Robust File-writing from InDesign JavaScripts

Recently I've been scripting InDesign with JavaScript to parse an entire issue of the print version of the Boston Review and produce the files needed for the new Drupal site I am building for them.

After getting oriented in the Adobe ExtendScript scripting environment, I found that outputting all my debugging print statements to the JavaScript console with $.write() was really slowing things down. Since I was going to have to write files eventually anyway, I was thrilled to find Dave Saunder's code for logging from InDesign JavaScripts. Using this logging function sped up my code greatly versus writing everything to the console.

CTC at DrupalConSF 2010

The upcoming DrupalCon in San Francisco from April 19-21, 2010 will be my first. I'm thrilled to return to the West Coast as a Drupal developer, having fond memories of the Human Language Technologies 2002 conference in San Diego (as a computer scientist) and the Materials Research Society's Spring meetings in San Francisco in the mid-90's (as a physicist).

Optimizing Drupal sites on shared hosting: A Case Study

The first web hosting I signed up for was ANHosting's "All Inclusive Mega Package" shared hosting. Going with an $8/per month plan made a lot of sense while I was learning to build web sites. I chose ANHosting after finding it recommended for Drupal sites on John Forsythe's blog.

Speeding up Eclipse PHP debugging by using an external web browser

Today I got my environment for debugging PHP web pages working much more snappily, and I'm excited to share my tips. My experience only applies directly to you if you are running Eclipse and debugging PHP on a Macintosh with OS X.

Flexibly titled pop-up windows

Here's a tip to add to the previous articles here about pop-up windows. When you invoke a pop-up with Javascript, the window is automatically given a title which is the URL of the page it is viewing. But often one wants a simpler title like, say, "Play audio", instead of the URL of the audio file. What to do?

An easy solution I found was to put the file within its own Javascript IFrame(). That way, the invisible title of the IFrame is the file URL, while the window can have whatever title one sets.

Debugging locally using Eclipse, MAMP, and virtual domains

When setting up debug configurations for Eclipse, I often have my files living in a subdirectory of my web server root. For example, at directory drydock/ I have a full replica of whatever live site I am working on.

On my hosting, I have the same directory structure and a subdomain set up so that drydock.crotown.com maps to the drydock subdirectory. Then the site drydock.crotown.com lets me put changes on the web for testing and approval, before the actual live site is touched.

ShareLinkField is born

Have you ever posted a link on Facebook? An image and the site description is automatically scraped from the site, and you can select an image from the site without a page reload. When you are done the result is posted in one unit; it is very slick.

Drupal 6 RealChat module

Chatting is something that makes a community site seem so much more vibrant and dynamic. I had looked into chatting options using contributed modules to Drupal 6 at one point but never implemented any of them.

Working on the Drupal 7 Field API

I have recently started working on the Drupal 7 Field API. In Drupal 7 the Content Creation Kit module (CCK) is mainly a user interface that uses the new Field API to do the behind-the-scenes work of attaching fields to objects.

Robust popup links in Drupal 6

Once MIDI files were reliably playing in the browser (see the previous post), the next thing I wanted was to have them play in little popup windows, instead of making a blank new page and playing there. Having to hit the browser's "Back button" after playing any MIDI was not acceptable.

The first way I did this was to put the Javascript code to make the popup window inside the link (with an onclick attribute). The problem with that method is that the link is completely broken when Javascript is not supported. Clearly a new page to play the file is the best option when Javascript is not supported.

So, the question is, how can one get a popup when Javascript is supported, but have the link still go to a new page and load the file when it is not?

Drupal SEO