The Yahoo! movie images were sad, since once there was an available Apple movie image, the code would opt to use that instead. Therefore I’ve decided to switch them off, where odd # days would use Apple images and even # days would use Yahoo! images.
I’ve hacked together and added an automatically generated Main Link on every Movie Trailer post on the blog as well as on the Atom/RSS2 feeds. So instead of going to the blog, you can go directly to the main user interface or share out the link with friends.
There is a problem however. Due to the fact the main pages are automatically generated, certain pages are often delayed and not available when the blog entry is created. Therefore, I’ve added a little disclaimer: may not be up. I may decide to do some check later to see if the main trailer page is up.
I’ve also fixed up the trailer not found page and now it’ll redirect you back to the homepage.
Recently I made a change attempting to make all my pages Valid XHTML 1.0 Transitional and one of the problems I was facing was that strings I read off of Yahoo! or Apple aren’t always correctly encoded. Therefore I had a simple hacked which called html_entity_decode() followed by htmlentities(), hoping to fix issues.
However, while browsing the pages today, I noticed the title was completely broken when it had special characters such as the apostrophe. Looking closer at the code, it appeared to default to the ISO-8859-1 character set, when what I really wanted was the UTF-8 character set.
Adding that parameter to the method appears to have fixed it. If you guys see anymore problems, please let me know.
I’ve updated the main trailer pages to now include informational links near the bottom, above the social networking links. It currently has links to:
HD-Trailers.net Blog
Amazon.com
Internet Movie Database (IMDb)
Rotten Tomatoes
Yahoo! Movies
Internet Movie Poster Awards (IMP Awards)
They’re basically linked to their individual search engines, but the results tend to be useful.
If you have suggestions on what other informational links to add, please feel free to leave a comment.
I’ve also added poster switching ability. Previously if there’s a movie poster from both Apple and Yahoo!, I only display the Apple one. I felt the Yahoo! poster might get lonely. Therefore if a trailer has 2 posters, when you hover the mouse above the poster image, it’ll get switched to the secondary poster.
If you haven’t noticed yet, I’ve been making changes to the main site over the last few days.
First, I’ve gotten rid of the LightBox (SubModal) and made each trailer an individual page with it’s own header and links. I did this due to several factors. First, depending on the description, it was hard to judge how big to make the modal window. Then there was the fact that people would share links directly to the individual trailers page (which is expected) and it’s hard to discover how to get back to the main site to see more trailers. The experience just wasn’t ideal.
Next I’ve removed the Digg scripts from both the main indices (plural of index) as well as the individual trailer pages and gone with a simpler link sharing code I borrowed from Sociable. You’ll notice that the blog also has this feature enabled. Sociable is a WordPress plug-in, but I just borrowed the code and used it on the main page. I may implement my own voting system later in the future, but for now, that’ll remain on my TO-DO list.
Then there was the navigational changes. First I now have giant left and right arrows for navigating between index pages, while removing the navigation links that used to be below the trailer images. Next, on every individual trailer page, you’ll see links to the next and previous trailers, so you can continue browsing without having to go back to the index. At first I wanted to do arrows on these pages as well, but I also wanted to provide some visual hint to what the next trailer is. I haven’t found a good way to merge an arrow with the trailer image yet, but when I do, you’ll see it.
You’ll also notice the next/previous links on the individual trailer pages to be stationary. The reasoning for this is that if I just want to quickly go through trailers, I won’t have to move my mouse to where the next link is to continue. I’ve always hated sites that didn’t have a stationary next/previous links.
I also changed around how the tables were laid out. Apparently the <tr> no longer supports the height attribute and for some reason the cell heights are automatically assigned. I was able to hack it in Firefox by creating a giant cell that pushes things up, but IE7 just didn’t like whatever I threw at it. Now I’ve just merged the title and descriptions into 1 giant cell so I won’t hit this weird problem.
More changes will come later as I find some more free time.
I’ve got fed up with how slow the pages were loading when it’s trying to contact Digg to get what the current Digg score is, so I decided to remove it from the index pages. Things I’m also planning to add or change include:
Search Engine
Sort by Name
Sort by Score
Inclusion of other link sharing sites
Caching of Digg score
Converting the individual Sub-Modal/Lightbox pages into main pages
Links to IMDb, Amazon, Blog, etc.
Those are not sorted in order of priority, and will probably be implemented when I feel like it.
I’ve been playing with PHP and JavaScript to see if I can get the trailer frame to automatically pop up and ended with something like this: Trailer Popup.
At first I wanted to automatically detect if the parent frame was the HD Trailers index page, and if it wasn’t, to load the index page first, then display the trailer frame. There were some difficulties in doing this as most of my processing is done on server side and there really isn’t a way for PHP to know how the frames are structured on the client side. I could do it with client side code (JavaScript), but then I realized it’ll cause problems with the search engines when they’re indexing my pages. I had a working prototype of this and played with it for awhile.
I then tried passing in another get parameter to my index pages, but that didn’t work out too well due to the fact the index pages are cached and that I had wanted to avoid loading the big trailer list every time.
Finally, I created a whole new page for it: view.php and it worked out pretty well. I then realized that all my Digg URLs would have to change, causing a big reset to ‘0′.
I contemplated for a bit, and reverted the work. Looks like I’ll have to give this some more thought.
As mentioned earlier, I’ve added page spanning to the main trailers page, instead of just having the most recent followed by all the trailers on one page. Now you don’t have to wait 10-15 seconds for that large page to load and can browse more leisurely.
The “All Trailers” page will still be around for those who prefer that. I removed the Digg code from that page as during high Digg traffic time, load time for that particular page is pretty unbearable.
It looks like the next piece I would like to add is some sort of search box. I’m thinking of a simple search box that’ll search based on title and maybe description, and even provide suggested titles so you search will complete faster.
If you haven’t noticed, I’ve been making a few changes to the front page for the last few days. First I started digging a couple of the HD Trailers to see if it’ll attract some more people to the site. Then thought, why not include a digg link on the preview page itself, so if people liked a particular HD Trailer, they can digg it:
Then I thought how cool it would be to have these diggs/ratings show up on the main page. For those who would usually skip over movie trailers because they’ve never heard of it, might actually decide to see it after noticing a high number of people digging a particular trailer. This led to the latest change:
There is some increased delay when loading the pages, due to the fact it’s contacting the Digg server to retrieve all the ratings in real time. I’m trying to see if there’s a way to cache it, but for now, the extra delay isn’t that significant in my opinion, but if you think it’s really bad, please let me know. I’ve been looking at the Digg scripts and there isn’t quite a easy way to do it yet.
Next thing I should do is probably support multiple pages of trailers given the fact that “All Trailers” page has over 230 trailers already and according to my stopwatch, takes over 10 seconds to load. The All Trailers page will still stick around, but for those who want to leisurely browse on quick loading pages, the multiple pages will definitely help.