01-14-2016, 04:16 AM
(This post was last modified: 01-20-2016, 12:52 AM by wolfgang1983.)
Hi.
I am trying to find out how in the rss feed part of this forum how I could get the date it for each post i have a example here Codepen Example
But where it says undefined it should say the date of it posted.
Here is the full view Codepen Full View
Any suggestions how to get date of post for rss?
I am trying to find out how in the rss feed part of this forum how I could get the date it for each post i have a example here Codepen Example
But where it says undefined it should say the date of it posted.
Here is the full view Codepen Full View
Any suggestions how to get date of post for rss?
PHP Code:
$(document).ready(function() {
url = 'http://forum.codeigniter.com/syndication.php?limit=15 ';
$.ajax({
type: "GET",
url: document.location.protocol + '//ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=1000&callback=?&q=' + encodeURIComponent(url),
dataType: 'json',
error: function() {
alert('Unable to load feed, Incorrect path or invalid feed');
},
success: function(xml) {
var postlist = xml.responseData.feed.entries;
var html = '<ul class="list-unstyled">';
$.each(postlist, function(idx, data) {
html += '<li>';
html += '<a href="' + data.link + '" target="_blank">';
html += '<h3 class="rss_feed_title">' + data.title + '</h3>';
html += '</a>';
html += '<small>' + data.date + '</small>';
html += '</li>';
return idx < 4;
});
html += '</ul>';
$(".rss_feed").append(html);
}
});
});
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!