Jaiku Reader

From OpenSocial Directory

Jump to: navigation, search
Thumbnail
logo_jaiku.png
Application Details
Description Display your latest Jaiku posts.
Publisher Bertrand Gondouin
Author Bertrand Gondouin
Code http://www.bertrandgondouin.net/os/jaiku.xml
Genre Micro-Blogging

Image:Example.jpg==Reviews== Add a Review
Template:Jaiku Reader Reviews

[edit] Comments

Leave a comment

Your Name:
Heading:
Comment:


[edit] Code

View Code

  <?xml version="1.0" encoding="UTF-8" ?> 
  <Module>
  <ModulePrefs title="Jaiku Reader" title_url="http://www.bertrandgondouin.net/" author="Bertrand Gondouin" thumbnail="http://www.bertrandgondouin.net/os/logo_jaiku.png" description="Display your latest Jaiku posts" height="500">
  <Require feature="opensocial-0.5" /> 
  <Require feature="dynamic-height" /> 
  </ModulePrefs>
  <UserPref name="login_jaiku" display_name="Your Jaiku login:" /> 
  <Content type="html">
  <![CDATA[ 
<style> #content_div {background-color: #96C63F;padding-left:20px;padding-right:20px;}
a:link, a:visited { text-decoration:none;color: black;}
#jaiku { background-color: white;margin-bottom:20px;padding:5px;}
small { color: #999999;}
img { float:right; border:0;}
</style>
<div id=content_div></div>
<script type="text/javascript">

// Get userprefs
var prefs = new _IG_Prefs(__MODULE_ID__);
var login = prefs.getString("login_jaiku");
var url_jaiku = "http://"+login+".jaiku.com";
var url_feed = "http://"+login+".jaiku.com/feed/atom";

_IG_FetchFeedAsJSON(
url_feed,
function(feed) {
if (feed == null){
alert("Comments not found.");
return;
}


var html = "<a href='" + url_jaiku + "'><img src='http://www.bertrandgondouin.net/os/logo_jaiku.png'></a>";

html += "<div><h2><b>" + feed.Description + "</b></h2></div><br>";

if (feed.Entry) {

for (var i = 0; i < feed.Entry.length; i++) {

var date = new Date();
date.setTime((feed.Entry[i].Date) *1000);
var datehtml ="";
datehtml += date.toLocaleDateString();
datehtml += " ";
datehtml += date.toLocaleTimeString();

var text ="";
text = feed.Entry[i].Title;

html += "<div id='jaiku'>"
+ "<a target='new' href='" + feed.Entry[i].Link + "'>"
+ text
+ "</a><br/><small><small>" + datehtml + "</small></small><br/>";
html += "</div>";
}
}
_gel("content_div").innerHTML = html;

},10,false);


</script>



  ]]> 
  </Content>
  </Module>

Page Rating

Rating: 2.8/5 (6 votes cast)

Personal tools
communication