Drupal, Mulitsite, CVS

Sunday, March 1st, 2009

Drupal has a multisite feature that allows you to run multiple sites under the same code base.  I found a great tutorial here which uses CVS to install Drupal.  The advantage of using CVS is that if you want to update/upgrade your Drupal install, it’s as easy as issuing a single command in your shell.

First I setup my Dreamhost UNIX directory structure by following this wiki entry.   The wiki entry goes into a lot more detail but the important part is to keep your directory structure clean and put all of your websites under ~/www.

Then I followed the instructions from the above mentioned tutorial.

Here are some highlights…

Checkout Drupal verision 6.10 from the CVS repository, by using the tag DRUPAL-6-10, to your directory…here it’s ~/www (here is a list of valid tags):

$ cd ~/www
$ sudo cvs -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal checkout -r DRUPAL-6-10 -d drupal drupal

This will create a directory called ‘drupal’ and place all the checked out files in that directory.  Create all the other directories following the tutorial..including one for each domain you want to host.

Since, I don’t have access to my web server’s configuration files, I used Dreamhost’s control panel to point the two domains to the drupal install directory (if you’re on Dreamhost, you can find it under Manage Domains…click on the Edit button under Web Hosting for the domains you want to run on Drupal).

You can also checkout contrib modules using CVS. Here’s an example of how to grab the admin_menu module. To find the tag to use for the version(-r) parameter, here it’s DRUPAL-6--1-3, click on the Release Notes link that accompanies each release. At the top of the page you should see the tag in all caps.


$ cd ~/www/drupal/sites/all/modules/drupal-contrib
$ cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -r DRUPAL-6--1-3 -d admin_menu contributions/modules/admin_menu

Later, to update your core and contrib modules, you just have to run this (of course, make sure you backup stuff, turn off modules, etc. before updating. Basically follow appropriate upgrade instructions):
$ cvs -nq update -dP

Two ways to take iPhone screenshots

Friday, January 2nd, 2009

I stumbled upon one of Jeff LaMarche’s blog entries while searching for something else. This tells you how you can take a screenshot from an untethered iPhone.  Just hold down the power button and then press and release the HOME button.  Now the screenshot is saved in your Photo album.

The other way is for Developers using XCode.  You tether the iPhone and open the Organizer window in XCode.  Click on your iPhone under the DEVICES list at the left of the window.  Click on the “Screenshot” tab, then click the “Capture” button.  These screenshots are store: ~username/Library/Application Support/Developer/Shared/Xcode/Screenshots.

Learning iPhone development…continued

Friday, January 2nd, 2009

Learned about creating multiview applications today.  Dave Mark and Jeff LaMarche are great teachers (Check out their book “Beginning iPhone Development“).  I really like their teaching and writing style. It is ‘to the point’ and more in the philosophy of giving you incremental building blocks.  It’s something that I’m use to and prefer.  At ITP, that’s how we teach students.  There’s a lot of technology involved and most do not have a technology background, so we need to arm them each week with a new tool, if you will, in their technology Swiss Army Knife, so that they can build cool things.  :)   We don’t get bogged down too much in the technical details or theory.

Upgrading Wordpress using SVN

Thursday, January 1st, 2009

I just recently discovered I manually installed this blog a long time ago, instead of using my hosting service’s “one click install” feature to install Wordpress.  They also make it really easy to upgrade.  But I also found out that at some point I had converted my install to use SVN instead.  So, now all I have to do to upgrade my Wordpress software is to:

  1. Go into the root directory of your blog
  2. type ‘svn sw http://svn.automattic.com/wordpress/tags/2.7 .‘  (make sure you refer to one of the right version tags here)
  3. Go to your browser and run http://yourblog.com/wp-admin/upgrade.php

That’s it!  Really simple right?!

Read this to find out more information about SVN and Wordpress.

iPhone SDK dance and Info.plist

Monday, December 29th, 2008

This morning, I started to follow the book “Beginning iPhone Development, Exploring the iPhone SDK” (it got many high reviews at Amazon) and found that I needed to update my setup somewhat.  It turned out that my iPhone is running 2.2 software but my XCode SDK was still at 2.0.

Once I installed the lastest SDK (2.2) all was fine.  I was able to take screenshots from the Organizer within XCode.  XCode was also able to connect to the iPhone device’s debugger.  So the setup is good to go.

After some research, I finally found out the definitive answer for changing the Info.plist so that your app will run on a tethered device.  Make sure you create a Bundle Seed Id.   The Bundle Seed Id is a 10 character alpha-numeric ID.  Then use it as the value for the Bundle identifier in the Info.plist.   So you need to put something like this “##########.com.mycompany.HelloWorld” as the Bundle identifier.  Now you’ll be able to run your app on your development device.

The Bundle display name can be set to anything.  This is what shows up underneath the application icon on the iPhone desktop.