Friday, January 16, 2009

Restaurant Website

I just built a Mexican Restaurant's website in town. It's Ninfa's. It was fun. It was also hard to not be hungry while I was working on it.

I took on the challenge of photographing the food. That was interesting. It actually went better than I thought it would.

When I started researching food photography, I kept seeing stuff like "If you can photograph food, you can photograph anything." That wasn't making me very confident.

And I remember from working at a Digital Photography Studio back in the 90s that it took all day, a food stylist, lots of light, etc.

Well, what I found out was that I needed to use natural light. I almost made the mistake of using my flash. I had them set me up at a table next to a window, I taped a large piece of white paper on the window to diffuse the light, and took along a stretched 2x2 foot canvas to reflect the light on the other side of the window. So the setup was: window, paper, food, camera, then the reflecting canvas.

I didn't figure out how to change the white balance on my camera, and didn't have time to research that, so there's a little blue cast on the shots.

I also photoshopped them a little (mostly just levels move and some dodging and burning). I added some steam to the fajitas by drawing white lines arbitrarily coming up from the food, then taking the smudge tool and massaging the lines, then playing with the opacity. I think they came out pretty good.

Oh, and the camera was on a tripod, and I messed with the shutter speed to get the lighting right.

You can see the photos I took on the website at www.ninfascollegestation.com.

There was actually another shot of some enchiladas with chile con carne on it, but it didn't look good...it was just brown and not much contrast. Truth is, as tasty as enchiladas are, they are very appetising to look at.

Anyway, it was a cool project. Maybe later this year I'll try to convince them to do some flash games on there.

Monday, December 29, 2008

Animated Gif Loading Thingies

Check out this site:

www.ajaxload.info

It's where I got this:



And this:



Blogger may or may not be animating them, but go to the site and you'll see what they are supposed to look like.

I've used it twice already. One on this site: LifeChurchOnline.net and one on a site I am working on that's not up yet.

On the church site I used it during the onload:redirect. I built the page as a wordpress blog, but they needed to keep their domain name for server space. You'll see the little graphic while you wait for the redirect. (otherwise it looked like the site was just sitting there not doing anything while it redirected).

The other time I am using it is as a background image in a table cell, then on top of that table cell, I added another table, and that table has a script I found that changes the background image of the table cell.

The reason I did that was because I needed the image in the table cell to be wider than the width of the page so that as the page stretches for different resolutions, the image will still be there. If I added the image in the table cell, it forced the table to be the width of the image, but I wanted the whole site to be 100%...scalable.

But, the images were taking a little too long to load, and basically had a white area there while it loaded. Now it has a little loading graphic.

Here's a sneak peek of the home page of the site I'm building, but it won't be there forever. And none of the back end programming is working...it's still in the design stages.

Tuesday, December 23, 2008

Getting Spam through my PHP Contact Form

OK, so I have a previous post that explains how to make a PHP contact form. Easy enough. It works great. Well, a few months ago I started getting spam emails from my contact form. This is lame. Basically, a bot has found my contact form, and it's been flooding my inbox with fake email addresses, and 5 or 6 url links in the message.

I thought I would append my initial post with what I've done to fix the problem.

1. Rename the form
(add a "2" or something) Like this: before=contactForm.php; after=contactForm2.php. Which means you will need to make sure the path in the html form is pointing to the right place.

2. Add a "hidden" field in the contact form.

Like this:
<input type="text" name="email2" style="display:none" />
<input type="hidden" name="redirect_thanks_url" value="http://www.yourdomain.com/thankyou.htm" />

I put it between the last text field and above the submit button, but it doesn't matter where you put it...in fact, we might all help defeat spam bots if we put them in different places and even name the fields differently. In this example it's "email2"...see in the code above, and also in the php code below.

3. Add this php code to the for script (which you can download from the other post I talked about).

if(isset($_POST["email2"])) {
if(!empty($_POST["email2"])) {
# THIS IS PROBABLY SPAM
header("Location: ".$_POST["redirect_thanks_url"]);
exit();
}
}

You'll need to add it somewhere in the code inside the main opening and closing php code, make sure you don't put it inside another function. I put mine right after line 12 in the script mentioned on the other post.

What it's doing is basically telling the spam bot that there is a field to fill in. Bots are attracted to fields. So we attract it with a label like "email2" or "message" or something that's not already in use, but still attractive...not something like "honeypot" or "spamtrap".

It's hidden from humans, so if it's a human filling out the form, the script checks to see if the field is blank. If it's not blank, the script tosses the submission, but redirects to a thank you. I read that some bots wait to see if the redirect goes to an error page or not, then will try again.

Now, it's possible that spammers will teach their bots to look for "hidden" fields and not fill them in at some point, but then we can come up with something else.

For the time being, this helps.

Again, the contact form on the previous post still works just fine, but I'm afraid it's just a matter of time before a spam bot finds it and starts spamming you.

Hopefully you remembered where you got the script in the first place and checked back to see if there was a solution.

What a pain this spam thing is. It's like a battle of escalations and counter attacks. Kinda fun, just annoying and time wasting.

I looked into some CAPTCHA solutions but it was really difficult to implement, and most of them cost money. (CAPTCHA by the way means "Completely Automated Public Turing test to tell Computers and Humans Apart"

Hope this helps.

jorge

Tuesday, December 16, 2008

New Christmas Game Called "Ball Hanger"

Last year, some of you may have see my "Bobblehead Nativity" Flash toy thing.

Well, this year, I've gone and made another Christmas game. This time it has to do with hanging balls on a tree. Check it out.

And have a safe and wonderful time with your friends and family.

Stay tuned this year for more games on my website. I've got some puzzles, a couple of "shooters" and some other things I'm working on.

Oh, and do you have a cell phone? Check out my free ringtones. Free...like a Christmas present. Yay.

Jorge

Sunday, October 05, 2008

iPhone Game Idea

I don't have an iPhone, but I thought that with the accelerometer and GPS, that this idea or an idea like it would not be too far off. I don't think it's there yet, but I think it's close.

I saw that there is a compass app you can download, but the compass is not an actual compass. You actually have to know wha time it is and where the sun it, and I assume it calculates the date of the year and maybe even GPS location to figure out where north is. That's cool.

My idea goes a bit further.

My idea is a sort of "virtual" place you can go to.

You'd start playing the "game" by finding a large parking lot or open field or something like that and setting your center point (assuming you are in the approximate middle of the area you've chosen).

Maybe you can choose a 25 foot diameter or 50 or even 100.

So, you hold the phone up in front of you and it becomes a "window" into this virtual space. If you turn right, the image in the phone displays what is to the right, etc.

So, think about a hedge maze where you are stuck in the middle, and if you walk into the hedge, you lose points or it resets you to the center or something.

Or, what about a Counter Strike or Halo type game where you are hiding around buildings and shooting aliens or whatever...maybe you can use the camera button as the trigger.

Or what about a mansion where you have to find clues...maybe by taking pictures of objects in the rooms.

In reality, you could have a virtual 3D "Missle Command" or "Space Invaders" Type scenario where you hold the phone up toward space and defend your planet by shooting them out of the sky.

What about a "Search and Rescue" game, or a "Treasure hunt/Metal Detector" game, or a mine sweeper game. Maybe even where your friends can hide a text message or a picture or something somewhere and you have to find it.

It seems like once the technology is there, there would be many possibilities.

What about a "seeker" where maybe you are in a mall and you look for other players by looking through your phone...and you can see through walls all the way across the mall. Sort of like a laser tag or something.

Maybe I'm jumping too far ahead. But it sure sounds fun.

Anyway, just thought I'd put it out there.

Someone hurry up and make it.

I guess we'll know someone has invented it when we hear about people running into trees or parked cars or sides of buildings.

Jorge