Tech

Nobody NEEDS a cellphone

13 comments

People got along just fine without them 20 years ago. Yet now you can't leave home without one!? Also, cellphones make things /too/ convenient. Makes people lazy.

I've heard this argument several times, and again recently. Ya, no one needs a cellphone, we use to get along fine without them. This definition of "need" also applies to:

1. Computers
2. The internet
3. TV
4. Anti-biotics
5. Cars
6. Refrigerators
7. Electricity
8. Plastic
9. Running water
10. etc.

Just because we /used/ to get along fine without technology X doesn't mean we don't "need" it now. Though we're not as dependant on cellphones as we are on electricity (yet) I would argue that we still need them (unless you define need as something you will actually die without, in which case, whatever). So please, spare everyone the i'm-superior-cause-i-didn't-use-to-have-a-cellphone argument next time.

</endrant> <3

Hooking into Drush and Aegir

2 comments

(Disclaimer: I'm still just learning this stuff, so please let me know if you notice anything wrong in here)

If you build and maintain Drupal sites and haven't used Drush yet, it's time you take a look at it. Even if you only use it for very basic things such as downloading and updating modules it can still be a big time saver.

One of the things that makes Drush so powerful is it's flexibility with hooks. Each Drush command can be hooked in at three different levels; before, during, and after it runs. The hooks are pre, validate, and post, respectively. It works slightly differently than the Drupal hook system but the concept is the same.

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.