wedful

Enabling multiple themes in Aegir install profiles

4 comments

Couples using wedful.com can select from a variety of themes for their wedding website. So when building the install profile we wanted to have all of these themes enabled by default. Enabling multiple themes in an install profile should be something simple to do. In fact, the install profile api even has a function just for this: install_enable_theme(array('theme1', 'theme2')).

However, due to the issues I discussed previously with static variables, enabling multiple themes from within an install profile is actually extremely difficult.

Static variables and Drupal install profiles

2 comments

I believe that this is not an issue with Drupal 7 as it handles variables differently than D5/D6. However, if you want to make an install profiles for anything earlier than D7 static variables can pose a huge problem. Static varibles are used for caching within a function in PHP. Generally the first time the function is called during a page load the static will be set. The second time it's called there's no need to execute most of the code and the value stored in the static will be returned.

While statics can be convenient and help improve performance, they become a huge problem when the relevant data has been altered partway through a page load and you need to reset the cache. Since the install profile is executed in what's effectively a single page load, static variables become problematic.

Creating nodes in Drupal install profiles

5 comments

One of the toughest things for me personally is coming up content for a new website. Specifically things that resemble an "about" page. I find it significantly easier if I'm given a starting point and something to work from. Once I get started I have no problem writing some decent content.

To make things a bit simpler for couples using Wedful wedding websites we decided to create default nodes with example content. This way users aren't given a blank slate when starting out. We've set up eight default pages to give them a bit of a starting point with the content on their site. Each page contains some example text or questions to give the users an idea of what to write.

An overview of site building in Wedful (Drupal install profiles, Aegir, and features)

7 comments

This post is just to give an overview of some of the techniques we use to build our Wedful websites product. I'll be discussing most of the things listed here in more detail in later posts as well, but thought this would make a good starting point.

Every single wedding website is a complete Drupal site, they don't share users or any data with any other wedding sites. We wanted to go this route so that each site had complete control over it's theme and domain name among other things. It also allows us to balance our server load by moving very active sites to servers with more resources.

Adding a simple twitter feed to your Drupal site

10 comments

I just added a simple twitter feed to one of my sites and thought I'd share what I did. The only other post I could find about was this one http://drupal.org/node/151185 and I didn't really think it should be necessary to write any code (and especially not any db queries) views could do all the display stuff I needed.