Posts Tagged ‘xhtml’

With XHTML use <Object> instead of <iFrame>

Tuesday, July 28th, 2009

I swear I have been asked 100 times what to do instead of <iframe> when building content in XHTML Strict. The answer is to simply use <object> instead because in XHTML it is expected that all remote and embedded content use the <object> handler to better abstract the separate code.

<object data=”YourURI.here” type=”text/html” height=”in pixels or percentage” width=”in pixels or percentage”></object>

—————–
now playing: Harry Gregson-Williams – Battle At Aslan’s How

howto: XHTML Strict valid way to embed Fox News video

Thursday, August 7th, 2008

Copy the code Fox News gives you for embedding the video under the share button. In a previous post I noted how to properly embed a flash video using the WordPress pb-embedflash plugin. Using that plugin, we are going to tell it the address of the video is the value of the fox news’ code’s src + ? + value of flashvars from the embed video code. 

For example if the src was : “foxnews.video.example
and the flashvar was: “playerId=5&referralObject=9
The url we give to the pb-embedflash plugin would be:
foxnew.video.example?playerId=5&referralObject=9
(note the question mark separating the two parts as this IS needed.)

We now have the foxnews player and our selected video embedded into our blog post in a manner which passes XHTML Strict validation. Check out my previous post for a live example of an embedded fox news video.

—————–
now playing: Air Hustlers – Downtime

blog’s XHTML Strict comment fix

Friday, June 13th, 2008

Here I was thinking my blog was valid XHTML Strict when I happened to run a check on a page that was not the homepage page. AKA it had comments.

The ajax comment-reply plugin, which I think is fabulous, evidently is not XHTML Strict compliant. Thankfully only two quick edits to the plugin’s “comment.php” file were needed and are as follows:

Add an empty list item to line 64.

change: echo ‘<ul>’;

to: echo ‘<ul><li></li>’;

similarly, add an empty list item to line 92

change: <ul class=”commentslist” id=”comments”>

to: <ul class=”commentslist” id=”comments”><li></li>

This is because when there are no comments on a post there are no list items to attach to the page. Therefore creating an empty unordered list, which XHTML Strict does not allow. Our fix, shown above, is to add a blank list item as a place holder. Simple isn’t it.

——————
now playing: Delerium – Lost & Found (Niels van Gogh vs. Eniac Remix)

XHTML Strict and youTube (Update)

Monday, May 26th, 2008

So I’ve found to be XHTML Strict for flash content I’ve had to hand-code the entry which I am not fond of as I would prefer it to be automatic. Luckily I have found a solution: pb-embedflash plugin for wordpress actually does handle this. All you need to do is paste the youTube link in the following fashion:

[ flash http://www.youtube.com/watch?v=NAME]
(without the space between the “[" and "flash"... had to do that so the code would show up)

There is also a button added to the "write post" screen which allows you more options. It's simply brilliant. However, take note that the other options the plugin gives you (like loading into an overlay) are not valid xhtml strict.

Example youTube: Beckham scores from 60 yards out!

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

-----------------------
now playing: BT - Simply Being Loved (Somnambulist)

[via FoxyTunes / BT]