the friday contest

May 9th, 2008

At my office we’re doing a “Theme Friday” contest. Where the previous week’s winner picks the theme for next week. So since everyone in the office would vote for themselves, I’ve created a way for the everyone in the world (in theory) to vote. Introducing thefridaycontest.com. Every week there will be a different contest. This starts next week with my theme (which I need to pick today) but the site is live now. iPhone interface will come eventually.

I have to create a mini-admin for uploading new photos and updating theme information, but other than that it’s done. I’m deploying it using SpringLoops. It took over 40 versions and 7 hours to create. I like what I ended up with. So come on feedback, like it, hate it, etc.?

Earlier this week I was working on migrating a online donation form that connects to Authorize.net for credit card and bank account donations into a Drupal installation. I built the original form and at the time had used Script.aculo.us to create sliding content blocks that appear when you switch between a one time contribution and an automated recurring contribution. Everything worked great in every browser I tested.
During the migration I ended up re-writing the script and decided to ditch Script.aculo.us for my Javascript library of choice, jQuery.

Everything worked great as before, a few bugs popped up because of they way it had to be setup. After fixing those bugs and sending it to the client for approval, I was informed (by the client) that the sliding panes don’t work in Safari 3 for the Mac. I opened the page in Safari and sure enough they didn’t work. After checking that the Javascript file had indeed loaded, I looked on Google just knowing someone had to of experienced this same problem.

I didn’t find anything, which was discouraging at first until I had an idea. I had used code similar to $(’.field’).focus(); with a function to run when you focus on a form field (usually radio buttons). I made a duplicate of my Javascript file and then did a find and replace. Replacing every occurrence of “focus()” with “click()”. Tested the file and sure enough the panes worked in Safari. I’m not sure why “focus()” wasn’t working, focus should be a valid event in every browser. If anyone has information on why “focus()” in jQuery doesn’t work on Safari 3 for the Mac, I’d be interested in hearing it.

Recently I had an issue with CodeIgniter on my DreamHost account. I uploaded the basic .htaccess file that I’ve used on every CodeIgniter install that I’ve done. Including another one on my DreamHost account. After spending two hour searching the CodeIgniter forums and trying the different suggestions, I contacted DreamHost support to verify my Private Server had the mod_rewrite module installed.

Of course they come back and say that it is indeed installed. So I ended up exactly where I was when I started, until I went through my log files and started removing lines from my .htaccess file until the error my logs revealed disappeared. Now, I have no idea how the original .htaccess file works on one sub-domain, but not another. It doesn’t really matter to me either, I’ll just be using the new one from now on.

CodeIgniter .htaccess for DreamHost