Visit DynamiX Web Design! E-Mail DynamiX Web Design!

html: Validating the Tweetmeme Wordpress Plugin

We recently installed the Tweetmeme Wordpress plugin, only to find that it threw over a dozen errors our way that invalidated our XHTML Strict code. It’s far too valuable a plugin to leave off of any good blog, but we do want to be sure that the code doesn’t throw errors. Here’s how to fix those under five minutes. :-)

1. Replace & with & where necessary.
The list should be: &source, &style, &service, &service_api, &force
You can simply do a find and replace for each of these with your & equivalent.

2. Change “iframes” to “objects”
For this, you can simply copy and paste our code:

FIND:
<iframe scrolling="no" height="105" frameborder="0" width="200" src="http://api.tweetmeme.com/chart.js?url=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;chs=200x100&amp;force=true">

REPLACE WITH:
<object type="text/html" data="http://api.tweetmeme.com/chart.js?url=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;chs=200x100&amp;force=true" style="height:105px;width:200px;border:0;overflow:hidden">

FIND:
<iframe src="http://api.tweetmeme.com/button.js?url=' . urlencode($url);

REPLACE WITH:
<object type="text/html" style="overflow:hidden" data="http://api.tweetmeme.com/button.js?url=' . urlencode($url);

FIND:
$button .= ' frameborder="0" scrolling="no"></iframe>

REPLACE WITH:
$button .= ' ></object>

FIND:
target="_blank"

REPLACE WITH:
target="_parent"

That’s it! That wasn’t so bad now was it? Please let us know in the comments if you run into any issues.

Tags: , , , , ,

Pass This Article On! Tiny Url: http://tinyurl.com/npkdum

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

6 Responses to “html: Validating the Tweetmeme Wordpress Plugin”

  1. AndrewNo Gravatar Says:

    Thank you. That works great.

  2. DynamiXLabsNo Gravatar Says:

    Glad we could help Andrew!

  3. @thinklikeauserNo Gravatar Says:

    I spotted this fix, but noticed your site has the same problem as mine again now, using iframe and src etc.

    I'm using 2.8.5 and 1.7.1 for the plugin…

    Do I disable it because invalid code on a blog offering website advice looks really naff- or spend time fixing it, or disable something that brings me traffic…. decisions decisions….

  4. dynamixlabsNo Gravatar Says:

    Hi @thinklikeauser!

    It looks like we must have inadvertently "automatically upgraded" the plugin. Thankfully we have a backup, and we will look into recreating the fix for the latest version of the plugin.

    Thanks for letting us know!

  5. WP ThemesNo Gravatar Says:

    Good post and this post helped me alot in my college assignement. Say thank you you for your information.

  6. dynamixlabsNo Gravatar Says:

    Assuming that they don't fix this on their own, yes unfortunately. I would suggest looking at the change log to see whether it's worth upgrading before going through the process. Thanks for your question!

We want your feedback! Leave us your thoughts below.






DynamiX Web Design

DynamiX Labs is Copyright © 2010 DynamiX Web Design, LLC.
DynamiX Labs is proudly powered by WordPress

Entries & Comments.  |  thanks & about.


The DynamiX Mascot button submit it! Background
hire dynamix!