Main
Latest
- Gnip API Changes
- Google Maps and Geolocation
- oEmbed, flickr and starstar
- Petition Against Public Holidays
- Good Morning
- Django Apache Configuration
- Raising funds for Autism Western Cape
- When to release the code?
- Parsing Hashtags
- ISDSL International Weirdness
Archives
- June 2004
- July 2004
- August 2004
- September 2004
- October 2004
- November 2004
- December 2004
- January 2005
- February 2005
- March 2005
- April 2005
- May 2005
- June 2005
- July 2005
- August 2005
- September 2005
- October 2005
- November 2005
- December 2005
- January 2006
- February 2006
- March 2006
- April 2006
- May 2006
- June 2006
- July 2006
- August 2006
- September 2006
- November 2006
- December 2006
- January 2007
- February 2007
- March 2007
- April 2007
- May 2007
- June 2007
- July 2007
- August 2007
- September 2007
- October 2007
- November 2007
- December 2007
- January 2008
- February 2008
- March 2008
- April 2008
- May 2008
- June 2008
- July 2008
- August 2008
- September 2008
- October 2008
- November 2008
- December 2008
- January 2009
Google AJAX Feed API Muti Example
Here is an example of how you can build a fancy Muti.co.za "widget" using the Google AJAX Feed API.
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Google AJAX Feed API Muti Example</title>
<link rel="stylesheet" type="text/css" href="http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.css">
<style type="text/css">
body {
margin: 40px;
padding: 0;
font: 0.8em verdana, arial, sans-serif;
}
h1 {
margin: 20px;
padding: 0;
font: 2em verdana, arial, sans-serif;
text-align: center;
}
#muti-feed {
margin: 0 auto;
max-width: 500px;
}
#muti-feed .loading {
margin: 10px;
padding: 4px;
color: #676767;
}
</style>
<script src="http://www.google.com/jsapi?key=notsupplied-wizard" type="text/javascript"></script>
<script src="http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.js" type="text/javascript"></script>
<script type="text/javascript">
function LoadMutiFeed() {
var feeds = [
{title: "What's Hot", url: "http://muti.co.za/hot?output=rss"},
{title: "Latest Submissions", url: "http://muti.co.za/new?output=rss"},
{title: "Web Development", url: "http://muti.co.za/hot?tags=webdev&output=rss"},
{title: "My Submissions", url: "http://muti.co.za/by?name=charlvn&output=rss"}
];
var options = {
stacked: true,
horizontal: false,
title: "Muti.co.za Social Bookmarks",
numResults: 5,
linkTarget: null
};
new GFdynamicFeedControl(feeds, "muti-feed", options);
}
google.load("feeds", "1");
google.setOnLoadCallback(LoadMutiFeed);
</script>
</head>
<body>
<h1>Google AJAX Feed API Muti Example</h1>
<div id="muti-feed"><span class="loading">Loading...</span></div>
</body>
</html>
I have this up on a temporary URI. I say "temporary" not because I'm planning to remove it but because I can't guarantee its persistence. Yes, that is definitely not a cool URI. :)
This intends to support HTML 5.
Copyright © 2004-2009 Charl van Niekerk. All articles are released under the Creative Commons Attribution 2.5 South Africa licence, unless where otherwise stated.


0 Comments
Post a Comment