development
I've begun working a lot more with Drupal multisites, as doing so saves a lot of time in certain situations (usually, when you have a large group of sites that use the same kinds of Drupal modules, but need to have separate databases and front-end information.
One problem I've finally overcome is the use of actual domain host names for development (i.e. typing in dev.example.com instead of localhost to get to a site). This is important when doing multisite work, as it lets you use Drupal's built-in multisite capabilities without having to hack your way around using the http://localhost/ url.
Here's what I did to use dev.example.com to access a dev.example.com multisite in a Drupal installation using MAMP (the dev.example.com folder is located within Drupal's /sites/ folder):
- Edit MAMP/Apache's httpd.conf file - it's located at
/Applications/MAMP/conf/apache/httpd.conf- Put in the following at the end of the file:
<virtualhost> DocumentRoot /Applications/MAMP/htdocs ServerName dev.example.com </virtualhost>
- Put in the following at the end of the file:
- Restart Apache (in MAMP, click stop servers, then start servers).
- Open up Terminal (in Applications > Utilities), and type in $ sudo nano /private/etc/hosts
- Type in your password if requested
- In the hosts file, add a new line after the line that reads
127.0.0.1 localhost:127.0.0.1 dev.example.com
- Save the file by pressing Control+O (this writes the file) and then Return when it says 'File Name to Write:', then press Control+X to exit nano.
- Now, flush Mac OS X's DNS cache by typing:
sudo dscacheutil -flushcache
Now, if you are behind a proxy server (i.e. if you have the Network settings in System Preferences set to use a proxy server for Web traffic), you will need to also add your dev.example.com entry to the 'Bypass proxies for these domains' field (localhost/127.0.0.1 should already be present here).
Next time you visit http://dev.example.com/ in your web browser, Drupal should point you to the appropriate multisite folder on your local Mac!
Part 3 of a series: Building out a full Drupal site in a weekend.
Now that my feet are firmly on the ground (and hopefully will stay that way for a time), I have a little time to write about the final stages of the Open Source Catholic website development... even though it's tagged as in 'beta.'
On the plane flight home, I was mostly finished creating the theme for the site. I hadn't opened it up in IE 6/7/8 yet, but I knew the main three or four bugs that would crop up, and prepared for them. I decided to write some postings (two articles, two blog posts, and a website review) for the website, as it's never a good idea to try to build momentum for a website on which nothing exists!
I wrote the posts, edited them a little, then browsed every page on the site once or twice, fixing little CSS bugs and tweaking the design until it was just-so. I had created the header image in Photoshop, and I worked to make it so it would be easy to change if I needed to—especially when (if ever) the site goes out of beta status.
Next, I did a little (VERY little) performance testing, and made sure things were working well on the backend. I didn't Boost the site (I don't think that'll be necessary... at least not yet), but I did turn on page caching, CSS and JavaScript aggregation, and am working on following the rest of the YSlow rules.
The second-to-last step on this site was to open it in Internet Explorer 7 and 8 (I haven't tested 6 yet) to make sure there were no show-stopping bugs. Luckily, there really weren't; just one column that kept floating right behind the content. I fixed that by floating the 'second' column to the right instead of left, and adjusting its margins accordingly.
The last step I have is to monitor the site's performance and metrics, test from an end-user's perspective, and make sure the 'moderator' role has the right permissions/access to do everything he or she will need to to keep the site in tip-top shape.
I haven't tried the Flag module yet, but I may at some point; seems pretty interesting to me! Also, I'm going to try to submit the theme, "Airy Blue," to Drupal.org's theme repository... wish me luck!
Part 2 of a series: Building out a full Drupal site in a weekend.
Well, one plane flight down, and a conference to go, I have the main structure of the theme set up (locally; haven't pushed it out to opensourcecatholic.com yet). I decided to go with Zen 2.x's -dev releases, for the simple fact that it's new and the way the Zen project is moving. There are a few rough areas in the documentation, mostly in the 'Readme' file for installing a subtheme, but I got through everything okay.
This theme, I hope, will make its way onto the fine Drupal.org theme repository; getting a CVS account, I'm sure, will be fun ;-)
I started with the very bare layout I had made for the OSC splash page. Then I posted a couple sample blog posts, articles, and other items, and went to town theming all the common HTML elements, positioning the navigation items, and doing some (very) basic testing in IE. Here's a rough idea of how the theme looks at this stage in the game:

Now, mind you, this is quite rough; I was focusing on the main layout for most of the plane flight, and I haven't even gotten around to theming all the listings, more blocks, etc.
But hopefully you have a general idea of where I'm going; I decided to use a digg-like navigation look (border-radius ftw!), and went with Warnock Pro for headings (why not? If you don't have that, you'll at least get Georgia!). I'm still not 100% happy with the 'Zen' way of having Navigation all the way at the bottom for a simple site where there are only a few links. I don't think it negatively impacts SEO much if at all, and although it's a good display of the idea of structure separate from form, it might simply not be worth the hassle.
I'm sticking to the KISS principle for this site, and hopefully will have a very clean, modern look to the site (right now I'm titling the them 'Blue Airy'). I'll keep you posted throughout the rest of the weekend, but postings tomorrow will be very sparse indeed, as I'll be at a conference all day!
Part 1 of a series: Building out a full Drupal site in a weekend.
Before you start building your website, you need to get all the parts of the site together, and have a good plan for what you'll need and how you'll do it. For many organizations, this can be a huge hassle, as you'll have to go through planning meetings, make diagrams, have all kinds of changes, and end up pre-stressed... and that's before you start working on putting the site together!
Luckily, for this website, the requirements are pretty simple: I can do whatever I want. But I can't get started from that point, so I put a few requirements down on paper, then grabbed everything I needed.
This weekend I am going to attend the Catholic New Media Celebration. I'll be on two plane flights, I'll be sitting at an airport for a few hours before each flight, and I'll be at a convention all day Saturday. I'm hoping to build out a new site idea I've had lurking in the back of my head for some time: Open Source Catholic.

In the past 45 minutes, I've been jumping around Drupal.org downloading all the different modules and tutorials I think I'll need. I've also saved some of my previous work on other Drupal sites in case I need to refer to a code snippet along the way while I don't have Internet access. I'm going to call it a night for now (I need to pack!), but tomorrow, beginning at the airport, I'm going to start working on the site.
Right now, there's a splash page. No theme, no Drupal installation—nothing more than a simple welcome message. By Monday, I'm hoping to have a Drupal site with a new theme (which I hope to contribute back to d.o as a zen subtheme) and all the community features I can possibly cram into it. One man, three days; almost no free time to work with. Think it can be done? I think so! Follow me as I begin this fun and crazy journey!
[UPDATES:]
- Part 1: Putting the Puzzle Together
- Part 2: Theme Development
- Part 3: Going Live...
- Part 4: [Final] Releasing a Theme on d.o!
