<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Bursasporum.com | Bursasporlu taraftarların buluşma adresi..." title_url="http://www.bursasporum.com" author="Tolga Gezginiş" author_email="tgezginis@bursasporum.com" author_affiliation="bursasporum.com" author_location="Bursa, TR" category="Spor" category2="Haberler" height="330" width="320" description="Bursaspor Bağımsız Taraftar Platformu, forum, haberler, multimedya, röportajlar ve bilgiler. " />


<UserPref name="show_date" display_name="Tarihleri goster?" datatype="bool"/>
<UserPref name="show_summ" display_name="Ozetleri goster?" datatype="bool"/>
<UserPref name="num_entries" display_name="Konu adedi:" />
<Content type="html">
<![CDATA[

<link rel="stylesheet" type="text/css" href="http://www.bursasporum.com/style.css" />

<div id=content_div></div>
<script type="text/javascript">

var prefs = new _IG_Prefs(__MODULE_ID__);
var showdate = prefs.getBool("show_date");
var summary = prefs.getBool("show_summ");
var entries = prefs.getInt("num_entries");

if (entries=="") {
entries =5;
}

// If user wants to display more than 9 entries, display an error
// and set the value to 9, the max allowed.
if (entries > 9)
{
alert("9 konudan fazla gosteremezsiniz.");
entries = 9;
}

_IG_FetchFeedAsJSON(
"http://www.bursasporum.com/rss/haberler.asp",
function(feed) {
if (feed == null){
alert("Veriler yuklenemedi.");
return;
}

// Start building HTML string that will be displayed in gadget.
var html = "";

// Access the fields in the feed
html += "<p>" + feed.Description + "</p>";
html += "<p1><b>" + feed.Title + "</b></p1>";


// 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 += date.toLocaleDateString();
html += " ";
html += date.toLocaleTimeString();
}
if (summary==true) {
html += "<br><i>" + feed.Entry[i].Summary + "</i>";
}
html += "</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);

</script>
]]>
</Content>
</Module>
