..check it out the Foldi blog for updates on work, clients, etc...

Archive for March, 2009


What’s in your wallet?

Wednesday, March 11th, 2009

Foldi recently designed and developed getrapturecertified.com, a website for satirical writer Billy Beam where you can pre-order your very own Rapture Card. Why would you need a Rapture Card? Well, I bet Captain Jean-Luc Picard wished he had one in 1994.

The site was built using CakePHP for the quiz and card ‘validation’. The front-end used jParallax and jQuery for the floating card effect. Get yours today!

CakePHP and file upload validation

Monday, March 9th, 2009

I haven’t seen an approach to file upload validation explicitly laid out in the CakePHP documentation. In other words, how do you make sure the user has selected a file to upload before hitting the upload button. In my case, I’m uploading images. After trying a few things, here’s what I’ve used.

It may seem logical to apply the built-in ‘NotEmpty’ rule to your ‘Modelname.file’ field in your view. However, Cake will throw an error. Instead, use the built-in ‘extension’ rule in your model like this:

var $validate = array(

   'file' => array(
      'rule' => array(
         'extension', array('jpeg', 'jpg')
       ),
      'message' => 'You must supply a file.'
   )

);

If a user hits the upload button before choosing a file to upload, the rule will kick in and display the error message. Add extensions as necessary.

Silly bums and hangovers

Saturday, March 7th, 2009

For the last six years I worked at a marketing agency that focused on event promotion, product launches, movie releases, blah, blah, blah…anyway, I’d bet anyone in a similar industry can attest to the number of launch parties, wrap parties, client lunches, happy hours that come with the territory.

In my experience, the loose business context of these functions means they happen during the week. It also means the next day I can count on a hungover staff and my own personal headache. This got me thinking…what’s up with hangover cures?

Googling hangover will of course return a long list of links. But notice the dominant subject concerns a cure. After following several of these and reading a few articles, I’ve gravitated toward and experimented with a specific theory and preventative regimen.

(more…)

Setting up a CakePHP project in Aptana Studio and Aptana Cloud

Saturday, March 7th, 2009

If you ‘re not familiar with Aptana Studio or Aptana Cloud, you can get all the details at www.aptana.com. But briefly, Aptana Studio is an IDE (Integrated Development Environment…think Eclipse, Dreamweaver, etc.) that hooks into Aptana’s hosting service called Aptana Cloud. Both products/services offer a long list of features that should catch your eye. This post makes some good selling points. I believe also that since the Cake framework uses so many files, using an IDE and live environment that talk to each other makes a lot of sense.

But….CakePHP developers may feel left out considering Aptana has yet to fully integrate the CakePHP framework.

Don’t worry, setting up a CakePHP project is possible and relatively easy….there are just a few points that tripped me up in the beginning. Anyway, I’ve outlined below the step by step process I used to get a fresh CakePHP project set up in the Studio and synched between my local environment and Aptana Cloud. I hope this helps anyone who’s interested.

(more…)