Friday, November 23, 2007

Added social bookmark links

Using informtion from this blog post, I have added icons linking the movies and landmarks to a variety of the most popular social bookmarking sites. I wanted to use the javascript button from www.addthis.com, but because of the way MovieLandmarks works (100% AJAX) I'd have to insert the script dynamically into the page -- which doesn't seem to work very well.

So, I just added links with the logos. They all seem to work just fine.

Added a 'Mail This' feature

I just implemented a simple 'Mail This' feature in about 10 minutes. Instead of setting up a fancy form that could be exploited by spammers I opted for the reliable old mailto: link. It ends up that you don't need a email address in the link, and that you can fill in the subject and body easily.

For example, the mailto: link for A Christmas Story looks like this:

mailto:?subject=MovieLandmarks.com%20-%20A%20Christmas%20Story%20&body=Check%20out%20this%20MovieLandmarks.com%20location%3A%20http%3A//www.movielandmarks.com/%23movie-B0000AYJUW%0A%0AMovieLandmarks%20is%20a%20movie%20and%20TV%20location%20search%20engine.%0A%0A

You simply pass it a ?subject= and a &body filled with the relevant location and link information. This way the email comes directly from the person, not from an intermediate server, spammers can't exploit the feature to send their crap under your name, and the message is more personal.

Make sure the contents of the subject and body are escaped using the javascript escape() function so that things like quotes won't mess up the link.

Wednesday, November 14, 2007

Google Misses the Web 2.0 Boat

I find it ironic that the company that single-handedly kicked off the Ajax/Web 2.0 craze is failing so miserably when it comes to supporting advertising on sites that take advantage of techniques they pioneered. I've pulled my attempt at adding AdSense ads to MovieLandmarks after only a day -- they were display stupid things like thong bikinis and sonic software. Nothing even remotely related to movies.

I've replaced them with Amazon DVD ads. Hopefully those will be more successful. At least they blend with the site.

If Google wants to succeed on Ajax sites they need to provide website creators with a way to feed content to the ad system. Otherwise you just end up with totally irrelevant ads and not much revenue.

Tuesday, November 13, 2007

AdSense on AJAX Pages

MovieLandmarks is a 100% AJAX page. This makes it a really nice site to explore for people, but not so friendly for the Google AdSense system. I'm experimenting with AdSense ads over on the right side of the map, hopefully with the addition of the directory it will start showing some relevant ads in a day or so. I have it setup to refresh the ad when the movie selection changes, but I don't know if it can pick up the change to the location using hashes or not.

I'd really like it if I could 'feed' the adsense system the dynamic content from the page, but apparently it doesn't work like that.

I don't like the idea of having ads for fireplaces or sonic software being shown all the time, so if it doesn't improve in a few days I'll probably pull it off.

Making it refresh is pretty easy. Create a div for your adsense ad, put your adsense code into it and then call this function to refresh it:

/* Refresh the Google Ad iframe
*/
function refreshAd( content ) {
var d=document.getElementById('adsense');
if(d){
var s=d.getElementsByTagName('iframe');
if(s && s.length){
s[0].src=s[0].src+'&'+new Date().getTime();
}
}
return true;
}
The content argument is there so I could experiment with feeding it content (which doesn't work).

Monday, November 12, 2007

Veronica Mars Canceled?!

Ok, so I've had my head buried in other things recently. I finished Season 3 of Veronica Mars the other night and while I didn't think it was the best season it was still far better than anything else I've seen on TV. As I'm adding landmarks for the series I discovered that CW has canceled the show and it hasn't been picked up anywhere else. I'm bummed.

Sunday, November 11, 2007

A Directory for MovieLandmarks.com

I just finished adding a directory of the movies we have in the database. Its a simple alphabetical list with the movie names, landmark names and media text descriptions. Its main purpose is to give search engines something to index and visitors a place to land. Since the main MovieLandmarks page is 100% AJAX there isn't much for the search engines to index there.

Thursday, November 8, 2007

MovieLandmarks.com now works with IE

I think I've solved the Internet Explorer problems with the site. The fixes were pretty simple:


/* Replace getElementById with a function to try it the right way first,
then the IE way
*/
document._getElementById = document.getElementById;
document.getElementById = function(id) {
var e = this._getElementById(id);
if(!e || e.id == id)
{ return e; }
return window[id];// try the IE way
}


IE apparently doesn't implement getElementById properly, so if it fails you try using the window method. This seems to have fixed all of my div id lookups.

The google map also wasn't displaying, this was because the 'map' variable wasn't declared in the global scope first (in Firefox if there is no var it assumes global, in IE apparently you have to explicitly declare it first). Simply adding var map = null; at the top of the javascript solved this problem.


I use the GDownloadUrl() function for all my back end calls, so compatibility isn't an issue there.

Let me know if you have any problems viewing in IE.

Tuesday, November 6, 2007

MovieLandmarks.com v1.0!

I released the new code at noon today, Jayson has been testing it for the last 24 hours and other than some minor glitches it looks good! The changes include a much faster method of rendering landmarks, using clustering from Mike Purvis' post on the Sydney Blug site, trailers for the movies when you click on the cover and a cleaner interface for logging in and registering.

We now have about 42 landmarks for The Blues Brothers, one of my favorite movies of all time.

We can always use more help, come register and add a couple of landmarks for your favorite movie or TV show. What else are you going to do, now that the writers are on strike?

Sunday, November 4, 2007

New MovieLandmarks is Almost Ready

Its late, so I'll keep this short -- the new version of MovieLandmarks is almost ready. I'd hoped to release it tonight, but there's still a couple of bugs to be worked out. Hopefully sometime this week. Its going to be a huge improvement on the current codebase, much faster and with some added features like Trailers being show when the movie cover is selected.

'night!

Friday, November 2, 2007

A Christmas Story

I took a break from working on improving the site to add a few more landmarks to the 'Christmas Story' entry. We have the house (which is open for tours!), the school, the department store and the Chinese Restaurant.

Welcome!

Welcome to the MovieLandmarks blog. I'm going to be discussing some of the behind the scenes work on the site here, as well as answering any questions visitors may have.

The MovieLandmarks site is a search engine for the filming locations of movies and TV shows. It is an AJAX site, using Javascript with PHP on the server side, that allows you to explore the landmarks in a variety of ways. You can search by movie title, location or browse the movies in the database. You can also use Google Earth to view them.

Right now the production site is a bit slow -- the way I originally wrote the javascript was not optimized for so many landmarks (over 350 at last count!). I am working on a faster system that will hopefully be rolled out soon.