Monthly Archives: January 2008

standards compliant video player

In the last few years I have gone from bein an extreme amateur when it comes to html and css, building a site built on table based layouts to someone who fancies himself an xhtml and css standards geek who is sometimes recruited by friends to write code or fix code they have problems with. When I say standards geek, I mean extreme geek, in fact my new site I am coding as XHTML strict which can be extremely hard to conform to but I will make it so.

With that said, nothing annoys me more on the net than going to youtube, revver, vimeo, jumpcut, etc, etc, and not getting standards based code. Now I understand why they give me this code, its for legacy purposes but that is no good to me, in the world of firefox, opera, and safari we can finally abandon poorly done broken code for fully compliant standards based clean markup, heck it is even possible in internet explorer 7. The only drawback being that due to the quirks of the past this fully compliant code will in fact break in legacy browsers.

With all that said converting old broken legacy code into clean markup is extraordinarily simple, heck I was able to handle it after maybe 15 minutes and if theres two things I don’t know as well as I would like in XHTML its this and forms. That however is purely do to lack of experience, and nothing to do with knowledge or skill and the same can be said for anyone into standards who might be a little intimidated/inexperienced with certain markup.

First let’s take a look at the code below which is provided by the fine folks over at comedy central.

<embed FlashVars=’videoId=148027′ src=’http://www.thedailyshow.com/sitewide/video_player/view/default/swf.jhtml’ quality=’high’ bgcolor=’#cccccc’ width=’332′ height=’316′ name=’comedy_central_player’ align=’middle’ allowScriptAccess=’always’ allownetworking=’external’ type=’application/x-shockwave-flash’ pluginspage=’http://www.macromedia.com/go/getflashplayer’></embed>

All of the code above is broken, well it will work, but its broken as far as standards. The embed tag has been deprecated and if you want to strive for standards it must be abandoned, thats not to say the code can not be utilized, reworked, and turned into standards compliant code all while still appearing and working the same as the original. So working left to right through the above code we can methodically build the new code, the first step is using the object tag, where the embed tag is a relic of the past the object tag is a tag of today and tomorrow (it even replaces the img tag in xhtml 2).

First of all wrap your code inside of an opening and closing object tag, the way I start my code to maintain its integrity is to always begin with the opening and closing tags. The next piece of our code is the FlashVars element, which is used to identify the particular video that comedy central is serving up, it can not be placed as an element of the object tag but it can be used inside of the object tag in the form of a param tag. An empty param tag has 3 elements, the tag title, in this case param, the name element, and the value element. So at this point your code that does nothing would look like this.

<object>
<param name=”” value=””/>
</object>

Now back to the FlashVars element, and this can be used for any element that needs to go into a param tag, everything to the left of the equal sign goes into the name tag and everything inside of the quotes goes into the value tag.

The next element is the src tag and it has a distinction of needing to be both a param and an element of the object tag, it doesn’t have to be but I have noticed the tag is more portable (at least in my experiences) when this is redundant (it seems to help ie7). The src tag and the address inside of it remains the same in every way when used inside of the object tag with only one change, it is now data and not src. Now for the param portion, the name portion of the tag is movie and the value is simply the address used inside of the embed tag. So now your code should look like this:

<object data=”http://www.thedailyshow.com/sitewide/video_player/view/default/swf.jhtml” >
<param name=”movie” value=”http://www.thedailyshow.com/sitewide/video_player/view/default/swf.jhtml”/>
</pbject>

The remaining tags can all be thrown inside of param tags except for type and name which can be simply thrown into the object tag with data, I usually leave out the pluginspage element just because, and I usually change the bgcolor width and height elements out for a css rule which means I then have to add in a css hook which in this case I would name something like comedycentralplayer, or whatever you would like. For the purposes of this post however I will add both the selector name and inline css style and as such the finished compliant code will look like the following.

<object type=”application/x-shockwave-flash” class=”comedycentralplayer” style=”background-color: #cccccc; width: 332px; height: 316px;” data=”http://www.thedailyshow.com/sitewide/video_player/view/default/swf.jhtml” name=”comedy_central_player”>
<param name=”movie” value=”http://www.thedailyshow.com/sitewide/video_player/view/default/swf.jhtml”/>
<param name=”FlashVars” value=”videoId=148027″/>
<param name=”quality” value=”high”/>
<param name=”allowScriptAccess” value=”always”/>
<param name=”allownetworking” value=”external”/>
</object>

Like I said before though this code will break in old browsers so I would think you should add something known to any good xhtml coder, and that is alt text. But if you look at the code above you will say there is no space for alt tags, and you would be right of course in that there is no explicitly stated alt element, but there is a place for it. If you had just empty object tags everything that was placed inside of them that was not wrapped in a param tag would be non printing text when the object worked, but when it did not it would work the same as alt text or noscript text, alerting the user that what is supposed to be there, is not there after all. So with that in mind your code would look something like this, except you might want to make it appear all on one line, otherwise the code could behave strangely in some environments:

<object type=”application/x-shockwave-flash” class=”comedycentralplayer” style=”background-color: #cccccc; width: 332px; height: 316px;” data=”http://www.thedailyshow.com/sitewide/video_player/view/default/swf.jhtml” name=”comedy_central_player”>
<param name=”movie” value=”http://www.thedailyshow.com/sitewide/video_player/view/default/swf.jhtml”/>
<param name=”FlashVars” value=”videoId=148027″/>
<param name=”quality” value=”high”/>
<param name=”allowScriptAccess” value=”always”/>
<param name=”allownetworking” value=”external”/>
If you’re seeing this something obviously broke, it could be your browser or you may lack the appropriate plug in, I can’t say but if you were running <a href=”http://www.getfirefox.com”>firefox</a>, with an up to date <a href=”www.adobe.com/products/flashplayer/”>flash player</a> I know you wouldn’t have this problem, if you are seeing this still though I bet it’s a problem with the video’s host and not myself, thanks.
</object>

Your finished code would in turn allow for a fully standards compliant version of the original broken code playable in any standards compliant browser as you can see below (provided comedy central doesn’t move their player).

If you’re seeing this something obviously broke, it could be your browser or you may lack the appropriate plug in, I can’t say but if you were running , with an up to date flash player I know you wouldn’t have this problem, if you are seeing this still though I bet it’s a problem with the video’s host and not myself, thanks.

spoiler alert…

as seen on tv: election 2000 spoiler nader concerning presidential run. spoiler? are you kidding me?

It is not enshrined in law that only democrats or republicans can run, neither is it enshrined in law that people can not vote for those who are not republican or democrat, you can think whatever you want about Nader as a person but he had every right to run for president.

Heck in 2000, I voted for Nader and knowing what I knew then I wouldn’t have voted for Gore, today I would but then there was no way.

So spoiler no way, no how!

things i have learned from morning news

So today due to the wind I was up much earlier than I am used to and I watched something that I normally don’t peer into at all, the hell that is morning news, and what I found out was striking.

  • Breaking News has no meaning, it could be a broken down big rig on the freeway or a tactical nuclear strike, everything gets its own panicked on the scene anchor speaking about the horrifying news at hand.
  • All media members are paparazzi, the mainstream media just deems those that chase after celebrities as arbitrarily beneath them.
  • Britney Spears uber alles, it used to be “if it bleeds it leads”, today theres no catchy slogan but if its celebrity news it is the top story, no questons asked.
  • Politics isn’t about ideals, positions or high minded proposals for the future, it is about a beauty contest and a horse race, plain and simple.
  • When it comes to climate change, the media will give equal time to men of science and the batshit fringe who still deny it above all.
  • If the weather does anything that is predictable but a slight change from the previous days weather it is automatically evil and everybody must panic.
  • If someone has gone missing, and they happen to be an attractive white woman, we all have to freak out and panic, if they’re missing and not white and/or attractive well something extraordinary must have happened, like a kid is involved or something.
  • Cute animals and human interest stories are the perfect finisher for a shitty newscast
  • Issues of local or national importance that lack some form of human interest angle will not be covered, it’s not that infrastructure isn’t important or newsworthy, its just not sexy.
  • Lastly, the biggest thing I have learned? EVERYBODY PANIC!

I know I am missing something but still this is what I have learned.

response to my senator

So I wrote my senator in regards to the proposed new FISA law, the telecommunications law that expires this week that Bush highlighted in his State of the Union address, and I was surprised indeed when I received a response from my Senator, Mrs. Dianne Feinstein. It was the typical form letter you expect and didn’t fully address my concerns, but hey it’s better than having your voice go unheard.

Now for those who haven’t been following things I will briefly outline my opposition to the current bill that the president backs. Simply put, after 9/11 Bush wanted to listen into communications between terrorists, a noble end indeed but the means he used to achieve this end were not only wrong, they were criminal, and some would say impeachable. Through various means he convinced the telecoms (except for Qwest) to let him listen in on all communications both voice and data going through their networks, and in some documented cases the telecoms even hardwired the government security agencies right into their networks, enabling them to eavesdrop on all communications going on over the net. He did all this without obtaining a court order which is where the illegality of it all comes in. Any person who has watched Law and Order knows you need a court order to listen in on communications and in cases of national security the president even has a special secret court known as the FISA court to grant him these orders, and they almost always allow them.

My problem with the bill has nothing to do with Bush however, my problem is simple. The telecoms knew it was illegal but they did it anyways, and to escape prosecution they have asked for retroactive immunity to be written into the next FISA bill. They claim in various ways complete ignorance of all of this of course but we are talking about multi national, multi billion dollar cooperations. They have teams of lawyers whose sole responsibility are things like this, they knew what they were doing, they were just afraid that fighting this would leave them branded as traitors after 9/11.

Which brings me back to Senator Feinstein and her letter, which states:

The Intelligence Committee’s report on the bill includes declassified text stating that the Executive branch provided letters to electronic communication service providers at regular intervals. These letters all directed or requested assistance and noted that the assistance was authorized by the President and was legal.

I introduced an amendment on the Senate floor that would limit this grant of immunity. Under my amendment, cases against the telecommunications companies would go to the FISA Court for judicial review. The Court would only provide immunity if it finds that the alleged assistance was not provided, that assistance met legal requirements, or that a company had a good faith, reasonable belief that assistance was legal.

I believe that this approach strikes the correct balance: it maintains court review and a judicial determination of whether companies provided assistance that they should have known violated the law.

So Mrs. Feinstein if I am reading you correctly if someone I reasonably believe is telling the truth tells me its legal to steal this persons car I can not be held liable? Because that’s how I am reading this amendment.

The president had noble intentions with his request of the telecoms, and I am sure the telecoms didn’t mean to break the law, but they did, as did Bush. He won’t be impeached, censured or punished in any way by you or anyone else in the senate, but those companies that either A. knew better but acted anyways or B. were criminally negligent, must not get off so easy.

Do not allow them to get off that easy Mrs. Feinstein, I beg you.

So tonight many things happened in Florida, John Mccain won a primary over good ole Willard “Mittens” Romney, and we finally don’t have St. Rudy of 9/11 to push around any more, oh the democrats answered the age old question of “what would happen if we had a primary but no one campaigned?” And Hillary’s website answered that question with this:

hillary wins florida?

Which is total bullshit, until recently she hadn’t even mentioned Florida, and now she’s acting like she won a contested primary. For those of you not in the know, Florida moved up its primary, the DNC said that was a no, no but the Florida dems did it anyways, and in response all the democratic candidates agreed not to campaign there and also to not allow the Florida delegates to be awarded or seated. Same thing happened in Michigan with the same result, Hillary proclaiming she won the primary.

She will do whatever it takes it seems, even deploy the soft racism of Bill Clinton. We don’t need a win at all costs president, we need a president who stands for something. Not only for the ideals of the left, but someone who stands for us, a president who wants to truely unite the country. What we need is change, a departure from the failed policies and bickering of the past, we need someone who can really provide the one thing that has become a buzzword in this election, change. What we need is:

obama '08

Al Gore, Your Country Needs You…Endorse Barack Obama. Now!

Jason Rothenberg of the Huffington Post lays it down pretty clearly and concisely that our former veep needs to endorse Obama for the good of our union, and I pray he does.

It’s time. Now. Before February 5th. If you wait, it’ll be too late. You’ve won the popular vote, an Oscar and a Nobel Prize, and now it’s time for you to give something back

read more | digg story

state of the union ’08

6:00 PM Hey it’s Bush’s black friend!

6:05 PM Hey it’s the son a bush!

Give it up, one final time GWB in the hizzle!

6:07 PM Hey did he just shake Ted Turners hand? Since when is he in congress?

6:08 PM W with the hand jokes, give it up!

6:09 PM Isn’t it a bit early for an encore Mrs. Speaker?

6:10 PM President Dumbass is speaking, where’s my drink?

6:13 PM Hey it’s Charles Rangel he looks as full of it as ever

6:15 PM Funny man GWB!

Let the Bush tax cuts lapse, it’s not a tax increase.

Spend tax dollars wisely? You’re gonna wait until the end of your presidency to do that?

6:16 A surplus by 2012? Damn if only we could have done that sooner, oh wait…

I’d applaud your anti earmarks rhetoric if I thought you meant it.

6:17 PM tax free bonds? hell no mr. president I’m done with you borrowing my kids money.

6:18 PM Decisions about my medical treatment done in a doctors office and not in congress? I think those decisions will be made in office towers by CEO sir.

6:20 PM No Child Left Behind teaching students how to take test since 2002. (I think that’s the year)

6:22 PM No more public funding of private schools, especially religious ones, fix what we have.

6:23 PM Just say no, to expansion of free trade, fillibuster if you have to.

The president should care more about the finest workers in the USA not the world.

6:24 PM Hillary looks like she’s about to fall asleep

6:25 PM Yes let’s take the next step in conservation and allow California to establish its own clean air standards.

6:27 PM Wait in 2008 he’s gonna ratify Kyoto? Oh wait just kidding, only if China does.

6:28 PM He’s gonna allow scientists to perform their work? Does that mean stem cell research finally gets the okay?

6:30 PM So no embryonic stem cell research even if it can help people who are dying? Thanks Mr. Bush

The rule of law Mr. Bush? When you start upholding it we will approve your judges.

6:31 PM No more faith based initiative, it’s wrong. The church isn’t wrong but it is still the church.

6:34 PM Hey Boehner can you applaud a little less vigorously?

6:35 PM When he mentions liberty in place of freedom I get the chills.

6:36 PM Half an hour in we have our first discussion of 9/11, I am impressed.

6:37 PM Laura gives an almost standing ovation.

The word is terror sir, not terruh.

6:38 PM I think this is the only time each year that Condi isn’t giving someone the stink eye.

6:39 Give it up for Congressman Sleepy! Either that or he’s dead.

It’s not a surge sir, it’s an escalation.

6:41 PM Cheney really does resemble Darth Vader doesn’t he

6:42 He’s invented an Iraqi “surge” are you kidding me?’

6:43 PM The surge wasn’t meant to simply quell the violence Mr. President, without the Iraqi government taking action we will never leave.

6:44 PM Return on Success has such a soothing title doesn’t it?

6:45 Hey is that Betray Us er Patreus?

6:46 By fully funding the troops he means allowing them to go off and die for a lie, doesn’t he?

6:48 PM Is he still talking?

Let’s all clap for stating the obvious! woooo.

6:49 PM Whenever he says “homeland” I hear hitler in my mind speaking of the “fatherland”

6:50 PM No sir you will rest, comfortably, it is the men and women of our armed forces who will not.

6:52 PM Is this the we’re going to war with Iran portion of the speech?

6:53 PM I still fail to comprehend how our having nuclear weapons means no one else can? If we can have these weapons why can’t everyone?

6:54 PM He isn’t gonna throw his weight behind the FISA bill is he? Oh yes he is.

6:55 PM No sir if multinational companies broke the law they must be held accountable in a court of law.

6:56 PM We have consensus no one wants genocide

6:59 PM Bob Dole!!!

7:02 PM GWB Ladies and gentleman, let him hear it!

7:04 PM and we finish this where we started with Bush’s black friend

Good Night!

10 years after netscape

Just now it came to my attention that today marks the 10 year anniversary of what was effectively the dawn of The Mozilla Project, the non profit that brought us such gems as firefox, thunderbird, camino (mac only), and many more projects based off of any one of their apps (flock anyone?).

We sit on the eve of firefox 3, (I’m using the beta build right now to post this from) and looking back on the last ten years online for myself personally it’s incredible. I used netscape back then but soon moved on to IE not knowing how derided and detested it would end up being for various reasons by those the world over myself included.

Without firefox I would have viable alternatives in browsers like Konqueror for Linux, Opera and heck even Safari for Windows but I would not be as satisfied as I am now.

I felt I wanted to write something to mark this day, not as a way to say Happy Birthday to firefox or to congratulate them on the last ten years but rather to wish them success over the next ten.

Hopefully market share can be gained and Microsoft can finally be pushed to support web standards, who knows maybe in ten years Internet Explorer will have gone the way of Mosaic, at the least we will be done with IE6 (Thank god).

If you want to read more here’s the original Netscape press release regarding the GPL release of the source code, or you can read the post marking the anniversary over on mitchell’s blog @ mozilla.

Or if you would like click the button below to “rediscover the web”.
Firefox 2

wordpress db_host and godaddy won’t play nice

So tonight I realized yet again the one pain that is setting up wordpress on godaddy. Using the handy dandy wordpress 5 minute install is simple until you get to the db_host section and have to change your info from localhost to the location of the database, and boy does godaddy hide it.

Not that they need to list it right there in the open with blinking lights or anything but it would be nice if you didn’t have to go way down deep to find it, it also would be good if wordpress explained what you were looking for exactly.

Well after googling I couldn’t find the exact answer and after installing wordpress 3-5 times I knew it was out there so I set out to find it, and find it I did.

I figured maybe with any luck others could come across this post and maybe just maybe the process of wordpress on godaddy would become simpler.

  1. hover over hosting and servers
  2. click on my hosting account
  3. open the appropriate hosting account
  4. click on databases
  5. click on mySQL
  6. click on view/edit details (the little pen icon)
  7. it’s listed under host name

Hopefully that clears up any pain you may have, and any pain I might have in the future when I undoubtedly forget the pathway to success