Multi-site Drupal Install

While there are many online tools to maintain websites, after messing around with several, we’ve found two that seem to lead the pack for our needs. For singlar websites, WordPress is still one of the easiest content systems for individual users. The significant advantage there is the ease of updating the content in place through the Administrative interface. This includes installing plugins without the need to download and ftp packages.

For more complicated services, Drupal is one package that seems to have drawn an active community. While not having the simplicity of managment of WordPress, it does provide an economy of scale by serving multiple websites with a single install. So while you will spend a little more time with each update, up can keep a single code base of the core system, modules, and supporting files. <Drupal:Run multiple sites from the same code base>

In short the creation of multiple sites goes like this:

  1. Single Install in a web directory
  2. Point all domains to the same web directory
  3. Add seperate setting files for each site
    • sites/www.site1.com/settings.php
    • sites/www.site2.com/settings.php 
  4. Run the installers but browsing to each domain

Its then possible to move the core configuration data to a seperate location to make updates with minum need to move files around. See links below

(with thanks to @mysty for the links to @buddaboy’s multisite symbolic links tip )

Video:http://www.archive.org/details/DrupalCampUK

slides: http://www.ixis.co.uk/blog/drupal-multisites-session-slides

The crappy new version version – BC Ferries Widget

After a couple days of beating around with the old code from the Konfabulator version of the BC Ferries Webcam widget – I threw out the whole thing in favor of a from scratch Dashcode version. While Dashcode does have some nice templates and features – really going from scratch with your own thought pattern is where I needed to be. The new widget has a cleaner look and feel but also a much cleaner code. See the Software forum for the BC Ferries Widget or direct download link here.

BC Ferries Widget Image

The goals from here are

  • to redo the comments for future reference
  • save state of preferences – important for iPhone version opening and closing
  • Look at allowing for expansion by removing hard-coded references in favor of variable calls
  • Moving the core data outside the javascript to supporting plist file, then hopefully to an externally called XML documents so URL changes don’t require a code rewrite
  • Consider porting to Google or Windows Gadgets or maybe Adobe Air

Coding for OS X and iPhone – Part II

After fighting with Dashcode for about 24 hours, I quickly discovered that most of my problems involved overthinking the problems. For example, after scouring Google for solutions to load and reload images from the web into a image containter the answer was so trivial that I missed it several times.

URL = “http://www.example.com;
document.getElementById(‘picture’).src = URL;

Where “picture” is the name of the image container in the layout.

After fighting with Dashcode for about 24 hours, I quickly discovered that most of my problems involved overthinking the problems. For example, after scouring Google for solutions to load and reload images from the web into a image containter the answer was so trivial that I missed it several times.

URL = “http://www.example.com;
document.getElementById(‘picture’).src = URL;

Where “picture” is the name of the image container in the layout.

After looking at XMLrequestHTTP and other procedure calls, this was a rather trivial answer to something I beat my head against for 3 hours. It is clear the single issue about dealing with multiple types of object oriented programing is correctly identifying the object properties and there Getters and Setters.

BC Ferries WebCams Dashboard Widget available for download

BC Ferries WebCams on you iPhone can be reached by browsing to http://maxwest.net/releases/BCF/

Further developments on these and other projects will be posted to the Software Forum

Questions and comments to customer@maxwest.net

The crappy old version – BC Ferries Widget

A long time ago in a galaxy far away there was a concept of ‘Widgets’ taken from product lore and applied to the computer interface. The first widespread use I ever had was with a tool called Konfabulator (which today lives on as Yahoo Widgets)

A long time ago in a galaxy far away there was a concept of ‘Widgets’ taken from product lore and applied to the computer interface. The first widespread use I ever had was with a tool called Konfabulator (which today lives on as Yahoo Widgets)

There were a number of interesting applications but one I used as a frequent Ferry traveler was a webcam app that looked at the Ferry lineups. Orignally posted by Richard Smith based on an update of some Ottawa webcams widget. BC Ferries Widget – Yahoo It later broke when BC Ferries updated their site and in the absence of any other updates I stepped in and updated the code and redistributed it.

There are now about 20 different ‘widget-thing’ environments. When Apple subsumed the widget into the operating system with the inclusion of Dashboard. I made a feeble attempt to move my previous effort over. While it worked it was a bit of a cludge. (Slightly revised Dashboard version)

This largely ported the old Javascript code to the Dashboard environment as is. It doesn’t really use the standards of Apple’s Dashboard.

Enter Dashcode; this is the development environment that is availble from Apple Developer Connection to create Dashboard Widgets. It is laughingly simple in some respects and the ability creating a few one-off applications for your own use is a massively underutilized part of the OS X environment.

The other factor in Dashcode is it can also be used to deploy to the iPhone (+ iPod Touch). While coding has never been a main part of my work – the thought of creating tools that you can run on your cellphone is just too cool to pass up. So the short term goal is to re-write the old BC Ferries Widget using the standard conventions of Dashcode and hopefully port it as an iPhone app. Documenting what I can about the sucesses and failures for all to see – here.

Coding for OS X and iPhone – Part I

While there are a massive number of environments, scripting languages, and APIs that are designed to make programs lives ‘easier’, it is impossible to even keep up with more than a couple.

While you can get involved in several they all fall into a a relatively few categories

  • Application Programming – full blown implementation for desktop operating systems. Using a common programming language like C and yypically relying on the OS APIs to manage the user interaction

While there are a massive number of environments, scripting languages, and APIs that are designed to make programs lives ‘easier’, it is impossible to even keep up with more than a couple.

While you can get involved in several they all fall into a a relatively few categories

  • Application Programming – full blown implementation for desktop operating systems. Using a common programming language like C and yypically relying on the OS APIs to manage the user interaction
  • Web Application – Server side coding where the user interaction happens through a client usually a web browser.
  • Scripting – the use of a language that can apply to one or more environments to provide automation handle small process, lives within other environments
  • Widgets – programs that live within a reduced environment such as Adobe Air, Google Gadgets or Apple Dashboard

For those working in Mac environments (including iPhone) there are a host of common tools that meet those functions

  • XCode is the GUI tool for the primary Programming environment in Mac OS X, it uses Objective C as its language
  • DashCode is the Widget environment for both OS X and the iPhone
  • Automator is the GUI tool for scripting within the Operating systems and Applications

Provided you have a computer and operating system that supports the current tools. All of these are availble freely from Apple’s Developer Connection (subject to free registration)

In addition there are several good getting started sites

Resources