SWFObject 2.0 and multiple videos on your blog front page

So with as easy as posting videos is from Windows Live Writer, a problem that bugs me is their use of the <embed> tag and its non-compliance to web standards. Of course leave the tag out and many browsers won’t work properly.

Through a couple of pieces of information from multiple places I finally figured it out.

First step is to download swfobject 2.0.

Next is to of course include the swfobject code into your page. Do this by including the following into the <head> of your blog (likely located in header.php or something similar):
<script type="text/javascript" src="swfobject.js"/>

Finally include the following code block where you want your video placed in the post:

<div align="center" id="mov2009081101">
    You need the Flash Player to view this video.
<script type="text/javascript">
    var flashvars = {};
            var params = {};
            var attributes = {};
            attributes.id = "swf2009081101";
            swfobject.embedSWF("http://www.youtube.com/v/2Fb-p5TkAE4&amp;hl=en", "mov2009081101", "425", "355", "9.0.0", false, flashvars, params, attributes);

You will need to replace “mov2009081101” and “swf2009081101” in all places with two different strings unique to the movie. The problem is if you have multiple movies on a page, whether the front page, a category listing, or whatever, duplicate ids will conflict. The ones I included above were simply the date of the blog and a 2 digit enumeration. With all of this done, flash videos should now be viewable for everyone AND your page should pass W3C validation.


Windows 7

Well, after years of dealing with the absolute backwater OS that is Windows XP Professional x64 Edition (say that 20 times fast) I went ahead and installed Windows 7 on my PC. The last straw was trying to update my iPhone on XP x64 only to have it not recognize the phone in recovery mode and needing to hook it up to another computer to fix it… TWICE!!

Overall I can honestly say, well.. I am impressed. I have been trying to if not move over to, at least get a hold of a Mac for a little while now, mostly because I am sick of fighting with my operating system. Running XP x64 is like trying to love your chronically disobedient child. It never does what you want it to, usually loses things and often breaks things, but it’s such a major part of your life that you just put up with it and work with it to the best of your ability.

So why am I impressed? Well, right off the bat this is the first MS OS I’ve installed (going back to DOS 6.22) that I haven’t had a crippled OS right from the get go. Drivers, check (aside from my scanner which I had to download the Vista x64 drivers from Epson). Ability to play videos (including Divx/Xvid/MPEG4)? Check. Scanner app (after it was installed)? Check. Heck, even my AAC files from itunes are supported.

Overall there are some things I really love about it. Aero Peek is already a mandatory feature. Basically give a quick full sized peek to an open window without having to bring it to the front or minimize all other windows. The new “quick launch” bar (which it really isn’t) is the first ever quick launch bar in windows that I’ve ever used, or even cared to try. The new system tray is very much clutter free and easy on the eyes by default. UAC and application access to the firewall seems much more sane. And I don’t know if it’s new or not, but the theme setup is vastly improved over XP at least.

Heck, even this post is easy to make thanks to Windows Live Writer… I mean it’s not Windows 7 specific, but not needing to log into the web site and to just instead type this out like Word is very convenient.



I FINALLY FIGURED OUT A USE FOR AJAX!!!!!!!!!!!!!!!!!!!!!!!!!!

Sorry for the over enthusiastic title, but I am freaking psyched. Beyond psyched. I feel like I’m somewhere between having found the cure for cancer and having found the answer to world peace.

AJAX. Asynchronous Javascript and XML. It’s a technology where using Javascript on a page, you can make asynchronous XML requests back to a script on a site and update the page you are on without having to reload the page. One of the most common uses out there for it is the “suggest a search” feature you see on a number of sites, including the search bar of IE7 and Firefox 2 along with Google’s site. I have been looking for a way to incorporate AJAX into something, anything, I’m working on as it seems like something fun I can play around with. My first thought was to work on an addition to Badger’s search bar but well… I’ll do it but it hardly seems fun to work on something that’s been done to death. Well damn.. what else is there? THAT’S what I’ve figured out.

When I am uploading the invoice for a week to insert inventory, I have to select the title/category these issues are going into. If it’s Batman #600, I have to stick it in the Batman (1940) title/category. I accomplish this with a simple drop down box. It works and works well. However my uploaded invoice appears as one huge editable form with our 100+ books on it simultaneously. Originally I would try and go through the entire invoice and create categories for all newly added titles not previously available on the site. What would frequently (re: always) happen is I would be 60 items down on the invoice and come across a book I missed. Oops. At that point I could either abandon the work on the previous 60 items, or I could stick the book in a placeholder section (usually ’68 heh) and fix it after I saved the upload. After a few weeks of this, I decided I had to come up with a better solution.

Version 2.0 of the invoice upload form simply added a text box. This text box was for generating a new category on the fly. I would enter in the coded new category information and the book would be automatically added to that category. This has worked well, except for a number of instances where multiple SKUs for a single new book might exist (most recently Hack/Slash #1). In this case, to properly create the book initially I would essentially create two categories identically. I then would have to go into the inventory system and move on book over to the same category and delete the duplicate. Still easier than before, but still not perfect.

Then it clicked, and by clicked I mean I honestly think there was a real lightbulb over my head that turned on. With AJAX, I can create new categories on the fly and actually have it update every drop down box on the page. When I come across a book that doesn’t exist, I just create a new category/title for it and say OK, and when I look at the list again the new category will be selectable on that book and every other book on the page. This will be one of the biggest time savers I’ll have done on the maintenance portion of the site.

The other one I can do, though a little more involved, is to dynamically save my progress on the invoice. It can take me up to 2-3 hours to get the invoice completed and uploaded. However that will require quite a bit of work and some new elements added to the database. So I figure I’ll start off small with this upgrade and upon its success move on to the bigger save feature.


Standards, who needs them

So I’ve been hard at work converting our site to valid xhtml. In the process I am quite excited to moving the site into a new direction as well.

To understand this direction though, you have to understand how the web works. The web is made up of HTML, code that your browser reads and then puts into the format you are all familiar with. So

<ul style="background-color: gray">
<li style="color: black; font-size: 16pt">Item 1</li>
<li style="color: red; font-size: 8pt; font-weight: bold">Item2</li>
<li>Item 3</li>


  • Item 1
  • Item2
  • Item 3

Now if you look closely you will see that there are actually two things going on. The first is that a list is being created. This is called the layout. The second is that text is being resized and bolded, colors changed, etc. This is called the style.

Previously, as in my example, the layout and style were all located in the same place, in the page itself’s file. Now what is happening is that the layout is being kept in the main file, and the style is being moved out of the file into a stylesheet. This allows a few advantages, the biggest one is that now the main file is nothing more than your text/data given importance in layout (paragraphs, headings, tables, lists, etc). It doesn’t have any particular look to it, and it shouldn’t. It is just the raw material from your page.

You can then through various web tricks assign all sorts of styles to it. You can assign a style for Halloween or Easter; a style for if it is being viewed over a web browser, a mobile phone, or being printed; or send the raw data through another program and create actual graphic design layouts for a book or other publishing media.

The other thing I have been doing during this project is cleaning up the code. This is something I am also very proud of. the web has always been a very loose collection of standards, and that looseness is something that web designers have never been afraid to take advantage of. Fortunately with HTMl 4.01 and XHTML 1.0 things are changing in that respect also. Web developers are now taking more care to make sure their sites are compliant. This one is for example. You can see by clicking the Valid XHTML link over on the right hand side. You can see if any site is compliant by going to validator.w3.org and typing in your favorite site into the address bar and seeing how it turns out.

Anyway, the project has been fun, but now I am done, and relieved. While fun, it has been long and requiring quite a bit of brain behind it as well.

I know this isn’t the family or picture update many of you have been waiting for, but nonetheless it is something I wanted to share.


Creative’s not so creative patent

Speaking of iPod (my I am just a fountain of words today), Creative Technology have been granted a patent for the entire concept of the typical MP3 player interface. You know, being able to select an artist, then an album, then songs on the album?

First, I STRONGLY have to question the actual relevancy that they created this. ID3 tagging (the metadata they refer to) has been around since the mid-90’s, and the ability to manipulate song lists based on that data has been around for nearly just as long on PC media players. So essentially Creative is saying they invented it for portable players, because they can’t be saying they created it in general.

So my question is, how does this fall under non-obvious when it comes to a patent? If it was around for years on earlier “devices” (PC software), doesn’t it make sense that as soon as portable processing was powerful enough to handle this it would happen?

The two theories on this are a) that Creative will use this simply as PR material for their MP3 player line, or b) that they will use this to receive licensing money from Apple. If it is simply (a) they want, more power to them. If it is instead (b), I hope they lose. If not this is more evidence that the US patent system is screwed up.

Can I patent being able to select a song by year?


RSS Update and other geek stuff

So I upgraded the server. I moved to Apache 2.0.53 and PHP 4.3.10. I was having problems uploading some rather hefty pictured (see above) and upgrading those two things seemed to have fixed it.

Also of possible interest to some techies, I am upgrading the gallery software. The main advantage is that each individual album will now be able to be syndicated through RSS. So once I start getting some general albums up that I will continually add to, adding their RSS feeds to your news reader will let you know whenever new pictures are posted.


My phone – the Nokia 6620

So a few weeks back Heidi and I picked up two Nokia 6620’s. But first some history.

A few years back I had a Samsung SCH-8500. It was fun and cool, VERY popular. Anytime you saw a SprintPCS ad it seemed they were using that phone. It was one of the early flipphones and had a decent resolution on the screen, could surf the web, etc. Well, the phone was killed (no, murdered) and after a few months of not having a phone I began to enjoy my new found freedom. Years passed and not a month went by where Heidi was not trying to get me to get a new phone. Finally a year ago the light shone down and I saw what would be my next phone.

I first found out about it on Phone Scoop and Mobile Burn. This phone seemed to do everything. Camera, video, full blown operating system, 2.5G technology with faster download rates, Bluetooth connectivity (nore on that in a bit) and lots and lots and lots and lots of available software for it.

First the things that I love about this phone. Bluetooth is awesome. It allows me to use a wireless headset but even better, it lets me transfer files wirelessly between the phone and the computer, sync the phone with the computer wirelessly, and transfer files between the two phones. This was really useful in Disney World where some of the photos posted to the gallery were actually taken on heidi’s phone but then transferred to my phone to be posted.

The contact capabilities of this phone are amazing as well. I can carry over a thousand contacts, and record and hold any single piece of information. any contact number of any sort, address (mnultiple), etc. I also have a full event calendar program, a todo program, and integration between all three systems.

A/V features are numerous. I can watch videos, listen to MP3’s or MP4’s, take pictures or video, and record phone conversations. I even got a bluetooth presentation unit with the phone (for free no less) that allows me to stream pictures and video to a TV set.

Messaging is excellent. I can have any number of email accounts connected to, it supports POP3 and IMAP4, and through the use of a VPN client available for the phone I can even connect up to my work email on our private network and check that. It also supports standard text messaging as well as MMS (multimedia messaging service) for picture and video messages.

And applications galore. If you can get it for a Palm or PocketPC, you can probably get the same or similar application for SymbianOS. Microsoft Office viewers and editors, PDF viewers, I can print to bluetooth printers from any of them, GPS applcations, encyclopedias, etc.. just a huge array of available applications, including….

GAMES. Not typical “phone” games, but more like games available for Palm and PocketPC. Emulators for SNES, NES, Gameboy, and genesis. role playing games, fighting games, driving games, golf games, etc. hundreds and hundreds of games, not to mention for those familiar with Nokia’s N-Gage might be interested in knowing that most games for that system can either be played outright on the phone or with a patch to get colors working correctly.

As for dislikes.. hmmm.. I dislike it not being a flip phone. The screen is already less than perfect (though I can purchase replacement covers for the phone). It also has some issues that are fixed in later firmwares. Unfortunately the only way to be guaranteed to get an updated firmware is to ship it to an individual who will put it on. Going through AT&T/Cingular or Nokia is a crap shoot. Also the keypad takes some getting used to. Not horrible but definitely awkward at first.

One final note is that coverage with the new AT&T/Cingular company is amazing. Our house in particular is like a cell phone hell. Virtually every phone and company that has ever made it into our house has lost signal almost constantly. These phones however have only lost signal once in the past two weeks. If that isn’t a testament to the merger I don’t know what is 😛

So here are some links:

Information from Nokia
Probably the most popular forum for Symbian Series 60 phones
One of the better theme sites for phones
The best theme site (though it is a pay only site
Handango’s selection of Symbian software


And now for a new project

Well, I’m glad I got this up. I haven’t looked to see what kind of traffic this site generated, but I hope many of you found it fun to see some of the things we were doing. I didn’t get to post as many photos as I would have liked to… But I suppose that’s what I get for putting everything together literally an hour and a half before I am supposed to be leaving.

My new project consists of two things really. First, create a realy photo gallery to be used on this site. You can see the start of that here. This site will eventually be updated much more frequently. And for those who were used to the now pretty much dead borgh.dyndns.org/var_pics directory, this will replace that (and should allow me to maintain it much more often than the previous “site” did).

The second part of the project is to allow an easier way for me to moblog it… that is, upload both text entries here as well as photo entries on the gallery page. Of course uploading pictures taken with my camera will only be able to be done with a computer and an internet connection (until they actually start releasing bluetooth enabled cameras.. hopefully soon). But hopefully I will be able to better facilitate uploading phone pictures to the gallery (posting to here is already possible, though I have some funky line carriage stuff to figure out).

So keep checking here for the meantime.. I am hoping to get most of my photos uploaded (the better ones at least) and make this something of an updater for friends, family, or really anyone who cares to check on it.