Andrew M Riley's blog

My order to create Drupal sites

At this months Florida Drupal meetings a lot of questions came up about how we create websites. Now these questions weren't really about the technical aspects of creating the site, they were more about the planning and the high level steps we take.

August Florida Drupal Meeting

Our next meet-up will be on Saturday, August 16th, 2008 from 1 to 5 PM at MindComent's offices (directions) in Altamonte Springs, Florida (Orlando area). This will be a 2-topic meeting with Mike Anello covering panels and Andrew Riley covering Taxonomy w/ Pathauto.

More Info: http://groups.drupal.org/node/13978

The easy way to change your domain name with a mutli-site setup

I used to dread changing the domain name of a site running Drupal in a multi-site setup.  After changing the folder name all of my attached files would be broken, possibly some of my links would be broken and I would have to delve through thousands of records in the database to hopefully fix the broken files and links.  Now I don't dread it at all since I figured out I could get around all of these problems by using symbolic links.

Moving $scripts to the bottom of your theme html

Per Yahoo it's best to move your Javascript calls to right above your closing body tags since downloading scripts block parallel downloads which causes your page to take longer to download/render. (1) Now I'm not going to go into any metrics to prove this statement, we'll just have to take Yahoo's word on it.

Drupal modules & themes, where should they go to make upgrading easy?

At the last Florida Drupal meeting one of the attendees (sorry, I'm horrible with names) asked why Drupal was so difficult to upgrade.  At first we were a bit confused since we thought Drupal was easy to upgrade but we later found out that the user was storing his modules in /modules and themes in /themes so every time he wiped out his Drupal installation he had to re-install all of the files for his modules/themes.  While it sounds like this is uncommon, I can assure you, it's quite common for new (and some experienced) users to make this mistake.

To add Content Types or not to add Content Types

... that is the question ... (Ok, I couldn't resist, I love puns and bad quotes)  A few days ago I was working on a site where I had created a content type that just mirrored the standard Page type (just a title and a body).  After looking at it for a bit I wondered if I should have just used taxonomy with the already existing page type to achieve the same effect.  I ended up coming up with a list of rules to when you should create a new content type.

New Content Types should be created when (any of the following apply):

Using JQuery to hide the value of text fields on focus

I created this little snippet (doesn't really warrant a plugin) to remove the default value from a text field when the field receives focus.  If for some reason the field loses focus the field will be refilled with the default value if you did not enter anything.

This is far from spectacular, I know but it's a handy snippet that only requires you to add the swaptextbox to any input field (type of text) to enable it to work.  You can have as many fields on a page that use this effect as you would like :)

Directions:

A look at uploading files in Drupal

Yesterday a client of mine asked how to upload image files for a drupal site that didn't have TinyMCE installed (with IMCE).  At first I was confused since I'm very careful to install those modules for all of the sites I create but then the client stated that this was for a site I didn't create (phew).  For Drupal pros this might seem like an odd question but it's really not and I had the exact same question when I first started working with Drupal.

Poor server performance when runing a Drupal site & Flash

Recently I was developing a new site for a client that had exceptionally high processor usage for every page load.  Now I have other Drupal sites on this server that use a similar module setup but use a lot less processor.  My interest was piqued.

Adding files that begin with a hyphen or dash to Subversion (SVN)

After working on a large project for about two months I was going through my usual pre-QA checklist and noticed that I had about 100 files that were converted over from the clients site that were not listed in svn.  I tried adding them one by one but kept getting the error "svn: invalid option character".   It turns out SVN doesn't like files that begin with dashes (or is it a hyphen?) which is understandable since it thinks it's an argument.

Syndicate content

User login