RSS Feed not working...
2 posters
Page 1 of 1
RSS Feed not working...
yeah, i have RSS feed and its not working xD
my RSS feed:
my RSS feed codes:
can someone tell me why its not working?
my RSS feed:
my RSS feed codes:
- Code:
<head>
<script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAA7eIzy-nhw15oRi1VFsPIaBQLfwdOeVqlPYn2aeR7PenOUsSEWxRHyJa-h_PHhev828-oDCX0Sqjv1Q"></script>
<script type="text/javascript">
google.load("feeds", "1");
function initialize() {
var feed = new google.feeds.Feed("http://www.digg.com/rss/index.xml");
feed.load(function(result) {
if (!result.error) {
var container = document.getElementById("feed");
for (var i = 0; i < result.feed.entries.length; i++) {
var entry = result.feed.entries[i];
var div = document.createElement("div");
div.appendChild(document.createTextNode(entry.title));
container.appendChild(div);
}
}
});
}
google.setOnLoadCallback(initialize);
</script>
<script type="text/javascript" src="http://googleajaxfeed3_files/rssdisplayer.js"></script>
<script>
google.load("feeds", "1") //Load Google Ajax Feed API (version 1)
function rssdisplayer(divid, url, feedlimit, showoptions){
this.showoptions=showoptions || "" //get string of options to show ("date" and/or "description")
var feedpointer=new google.feeds.Feed(url) //create new instance of Google Ajax Feed API
feedpointer.setNumEntries(feedlimit) //set number of items to display
document.write('<div id="'+divid+'">Loading feed...</div>')
this.feedcontainer=document.getElementById(divid)
var displayer=this
feedpointer.load(function(r){displayer.formatoutput(r)}) //call Feed.load() to retrieve and output RSS feed
}
rssdisplayer.prototype.formatdate=function(datestr){
var itemdate=new Date(datestr)
return "<span style='color:gray; font-size: 90%'>"+itemdate.toLocaleString()+"</span>"
}
rssdisplayer.prototype.formatoutput=function(result){
if (!result.error){ //if RSS feed successfully fetched
var thefeeds=result.feed.entries //get all feed entries as a JSON array
var rssoutput="<ul>"
for (var i=0; i<thefeeds.length; i++){ //loop through entries
var itemtitle="<a href="" + thefeeds[i].link + "">" + thefeeds[i].title + "</a>"
var itemdate=/date/i.test(this.showoptions)? this.formatdate(thefeeds[i].publishedDate) : ""
var itemdescription=/description/i.test(this.showoptions)? "
"+thefeeds[i].content : /snippet/i.test(this.showoptions)? "
"+thefeeds[i].contentSnippet : ""
rssoutput+="<li>" + itemtitle + " " + itemdate + itemdescription + "</li>"
}
rssoutput+="</ul>"
this.feedcontainer.innerHTML=rssoutput
}
else //else, output error
alert("Error fetching feeds: "+result.error.message)
}
</script>
<style type="text/css">
#msndiv{
width: 90%;
}
#msndiv li{
clear: both;
margin-bottom: 1em;
}
</style>
</head>
<body>
<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tr>
<td width="300px"><p align="center">Recent Announcements:</p></td>
<td width="300px"><p align="center">Recent Discussions</p></td>
<td width="300px"><p align="center">Recent Introductions</p></td>
</tr>
<tr>
<td id="cssdrive" style="border-right: solid #111 1px;"> <p><!--webbot bot="HTMLMarkup" startspan --><script type="text/javascript">
//USAGE SYNTAX: new rssdisplayer("divid", "rssurl", numberofitems, "displayoptions")
new rssdisplayer("cssdrive", "http://strawhatclan.findtalk.biz/feed/?f=3", 3, "")
</script></p></td>
<td id="cssdrive1" style="border-left: solid #1e1e1e 1px; border-right: 1px solid #111;"> <p><!--webbot bot="HTMLMarkup" startspan --><script type="text/javascript">
//USAGE SYNTAX: new rssdisplayer("divid", "rssurl", numberofitems, "displayoptions")
new rssdisplayer("cssdrive1", "http://strawhatclan.findtalk.biz/feed/?f=1", 3, "")
</script></p></td> <td id="cssdrive2" style="border-left:1px solid #1e1e1e;"> <p><!--webbot bot="HTMLMarkup" startspan --><script type="text/javascript">
//USAGE SYNTAX: new rssdisplayer("divid", "rssurl", numberofitems, "displayoptions")
new rssdisplayer("cssdrive2", "http://strawhatclan.findtalk.biz/feed/?f=5", 3, "")
</script></p></td>
</tr>
</table>
</body>
can someone tell me why its not working?
Re: RSS Feed not working...
RSS feeds of a forum only works for "public access" sections of a forum. Curious, is it even possible to get a rss feed on "restricted" sections (that which requires a login)?
Re: RSS Feed not working...
Since this thread appears to be solved, I will lock this thread and mark it as solved.
Sanket
Sanket- ForumGuru
- Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum