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.
</div>
<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);
    /*-->*/
</script>   
</div>

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.

Share

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.

desktop

Share

Akismet – thank you!

So I finally got around to upgrading from WordPress 2.0. I have been on an upgrading kick recently and after upgrading our private forums I decided to go ahead and update this site to WordPress 2.2. One of the nice features of 2.1 and above is that they include the Akismet plugin bundled with the install. I have received almost 200 spam comments a day, if not more, for months now. It’s not really a big deal except that I get thousands of emails requesting moderation as a result. Also once every few months I have to go in and clear out 10,000+ comments. Finally in the event that anyone does comment (yeah right) I might miss it as a legitimate comment.

This is what Akismet does. It filters out bogus comments (spam) and doesn’t even post them to moderation. It also auto-deletes everything after 15 days so I don’t even need to manually remove them anymore. So go ahead spammers. Comment spam away, because Akismet is on the job making sure I don’t even know you exist anymore. :)

Share