W3C compliant Twitter feeds

W3C VALIDATION HELPFUL HINTS AND POINTERS.
Forum rules
Please use these hints and tips entirely at your own risk. Please take on board different webmaster software can react in different ways to certain codes used.
Although you may find helpful hints and tips, if it goes wrong please take on board NOBODY on the W3Cforum can take responsibility - all advice and directives can be found on the http://www.w3c.org comprehensive website, which is especially written for webmasters wishing to validate their respective websites.

W3C compliant Twitter feeds

Postby frontpagerankings on Thu Feb 19, 2009 5:57 pm

It took a little bit of ingenuity, but if any of you are interested, Twitter feeds can be made W3C compliant with a little re-working of the code they give you and a bit of graphic work.

See here for an example:

http://www.glenngarnes.com/about-glenn.html

Here was the original code (html)

<div id="twitter_div">
<h2 class="sidebar-title">Twitter Updates</h2>
<ul id="twitter_update_list"></ul>
<a href="http://twitter.com/{twitterid}" id="twitter-link" style="display:block;text-align:right;">follow me on Twitter</a>
</div>
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/{twitterid}.json?callback=twitterCallback2&amp;count=5"></script>

This produced a plain html feed that was not only unattractive, but did not pass W3C.

In order for it to appear as it does on the example site you need to recreate the image and place it in the CSS as a background image in the division that holds the feed, then insert <li></li> between <ul id="twitter_update_list"></ul> in order for the nest to pass W3C.

Voila! W3C compliant Twitter feed!

We need a forum to post things like this... how about it admin? I'd like to see a specific place that developers like myself can post cool stuff that passes W3C, I think it would be a benefit for all involved.

Thanks for reading.

Tim
frontpagerankings
 
Posts: 13
Joined: Sat Jan 31, 2009 7:35 pm
Location: USA

Re: W3C compliant Twitter feeds

Postby admin on Thu Feb 19, 2009 7:04 pm

:D
Hi! Tim,
hope you like the new section - we have been playing with the idea for some time, but always felt the major answers are always in w3c.org.
:D
admin
Site Admin
 
Posts: 36
Joined: Fri Oct 26, 2007 5:29 pm

Re: W3C compliant Twitter feeds

Postby frontpagerankings on Thu Feb 19, 2009 8:24 pm

I love it!

Hopefully we'll get some traffic on here!

thanks for listening.

Tim
frontpagerankings
 
Posts: 13
Joined: Sat Jan 31, 2009 7:35 pm
Location: USA


Return to W3C CREATIVE VALIDATION HINTS AND TIPS.

Who is online

Users browsing this forum: No registered users and 1 guest

cron