<?xml version="1.0" encoding="UTF-8" ?> 
 <Module>
  <ModulePrefs description="malayalam blog listing" author_location="chennai india" author_link="http://simychacko.blogspot.com" thumbnail="http://hosting.gmodules.com/ig/gadgets/file/102198116407053772391/tn.PNG"  
               screenshot="http://hosting.gmodules.com/ig/gadgets/file/102198116407053772391/tn.PNG"  
               directory_title="Latest Malayalm - Kerala blog posts" title="Latest Malayalm blog posts" height="400" width="250"  author="SIMY CHACKO" author_email="simymylooran@gmail.com" title_url="http://latestmalayalamposts.blogspot.com/" >
  <Require feature="dynamic-height"/>
  </ModulePrefs>
  <UserPref name="show_summary" display_name="Show Summary?" datatype="bool"/> 
  <UserPref name="num_entries" display_name="Number of Entries:" />
 <Content type="html">
 <![CDATA[ 
<style> #content_div { font-size: 80%;  margin: 5px; background-color: #FFFFFF;} </style>


<div id=content_div></div>

<script type="text/javascript"> 

// Get userprefs
var prefs = new _IG_Prefs(__MODULE_ID__);
// var showdate = prefs.getBool("show_date");
var showdate =  true;
var summary = prefs.getBool("show_summary");
var entries = prefs.getInt("num_entries");

// If user wants to display more than 9 entries, display an error
// and set the value to 9, the max allowed.
if (entries > 25)
{
    alert("You cannot display more than 25 entries.");
    entries = 25;
}

if (entries < 11)
{
    entries = 11;
}


// Use the _IG_FetchFeedAsJSON() function to retrieve core feed data from
// the specified URL. Then combine the data with HTML markup for display in
// the gadget.
_IG_FetchFeedAsJSON(
  "http://blogsearch.google.com/blogsearch_feeds?hl=en&lr=lang_ml&scoring=d&q=.&ie=utf-8&num=25&output=rss",
  function(feed) {    
    if (feed == null){ 
        alert("There is no data.");
    return;
  }
  
    // Start building HTML string that will be displayed in gadget.
    var html = "";
    
    // Access the data for a given entry
    if (feed.Entry) {
      for (var i = 0; i < feed.Entry.length; i++) {
        html += "<div>"
	      +   "<a target='_blank' href='" + feed.Entry[i].Link + "'>"
	      +      feed.Entry[i].Title
	      +   "</a> ";
          if (showdate==true)
          {    
             // The feed entry Date field contains the timestamp in seconds
             // since Jan. 1, 1970. To convert it to the milliseconds needed
             // to initialize the JavaScript Date object with the correct date, 
             // multiply by 1000.
             var milliseconds = (feed.Entry[i].Date) * 1000;   
             var date = new Date(milliseconds);
             html += "<font size=1 color=gray face='Courier New'> ";      
             html += date.toLocaleDateString();
             html += " ";
             html += date.toLocaleTimeString() + " </font>";             
          }          
          if (summary==true) {           
             html += "<br><i> <font size=2 color=navy> " + feed.Entry[i].Summary + " </font></i>";
          }
	      html += "</div>";
      }
    }
    html += "<div> <font size=1 color=green face='Courier New'><b> Thanks for using this gadget: <a href='mailto:simymylooran@gmail.com'> SIMY CHACKO </b></font></a></div>";
    _gel("content_div").innerHTML = html;
 
    // The rest of the function parameters, which are optional: the number
    // of entries to return, and whether to return summaries.
  }, entries, summary);
  _IG_AdjustIFrameHeight();
    
</script>

  ]]> 
  </Content>
  </Module>

































