How to add images and custom tag content?
Please see this feed: http://www.espnscrum.com/rss/rugby/rss/headlines_fantasy.rss how do we add the images and custom tags? I just get undefined when I try to load them.
$("#rss-top").rss("http://www.espnscrum.com/rss/rugby/rss/headlines_fantasy.rss", {
limit: 3,
tokens: {
articlelink: function(entry, tokens) { return entry.link },
articleimage: function(entry, tokens) {
if(typeof entry.image == 'undefined' || entry.image == '') {
return 'scrum_placeholder.jpg';
}
return entry.image
},
mainheadline: function(entry, tokens) { return entry.headline },
articlesubhead: function(entry, tokens) { return entry.linkname }
},
layoutTemplate: '<ul class="news-items">{entries}</ul>',
entryTemplate: '<li>' +
'<a href="{articlelink}">' +
'<img src="{articleimage}" alt="{mainheadline}" width="99" height="56">' +
'<h3>{body}</h3>' +
'</a>' +
'<p class="description">{articlesubhead}</p>' +
'</li>'
});
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Hm interesting. It seems that google itself is not returning the images of the feed. Will try to fix it
Great thank you.
I think the reason for the issues is actually the fact that the feed is invalid http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.espnscrum.com%2Frss%2Frugby%2Frss%2Fheadlines_fantasy.rss
I'm working on a self-written feed parser which results in something like this: http://jquery-rss-feedr.herokuapp.com/entries?url=http://www.espnscrum.com/rss/rugby/rss/headlines_fantasy.rss. To be clear: The feed is still invalid and it seems that image is not valid inside item. Anyways, the parser will allow to add the original item data to the result and therefore make the data available. The fix will maybe available tomorrow.
Hi,
Thanks a lot for all of your help. Okay that makes sense and after reading this: http://feedvalidator.org/docs/howto/declare_namespaces.html it seems the feed is wrong as pointed out.
I will contact the feed creator and get that updated.
Kind regards
I managed to get the feed fixed on their end and it is now working fine. I need to load the first 3 items in one place and then load another 3 below after an advertisement.
Is it possible to add a offset?
If that is not stated in the docs, then it's not supported. Sorry!
Von meinem iPhone gesendet
Am 21.10.2014 um 13:33 schrieb Glen Hughes [email protected]:
I managed to get the feed fixed on their end and it is now working fine. I need to load the first 3 items in one place and then load another 3 below after an advertisement.
Is it possible to add a offset?
— Reply to this email directly or view it on GitHub.
Okay fair enough. I'm going to be coding that into it so you are more than welcome to add it as you wish.
Glen Hughes www.glenhughes.me LinkedIn: www.linkedin.com/in/glenhughesuk M:+447956637953
On 24 Oct 2014, at 19:25, Sascha Depold [email protected] wrote:
If that is not stated in the docs, then it's not supported. Sorry!
Von meinem iPhone gesendet
Am 21.10.2014 um 13:33 schrieb Glen Hughes [email protected]:
I managed to get the feed fixed on their end and it is now working fine. I need to load the first 3 items in one place and then load another 3 below after an advertisement.
Is it possible to add a offset?
— Reply to this email directly or view it on GitHub. — Reply to this email directly or view it on GitHub.
Sure, sounds good!
Hello, Im using this plugin in my website, and also having the same problem of displaying images in the feed... So I tried out what Hughes did but still no image is being displaed, do u have any idea why is it beahing so??
@AbdallahMyuto did you check that the feed is valid? Which feed URL is that?
yes i checked it's valid
Again: Which feed URL is that?