Many feed readers seem to use different tags for thumbnails. What are some common ways of specifying thumbnails?
So far, I know about the enclosure tag, the media:thumbnail tag, embedding images directly in the item description, and using the og:image meta tag. What are ways are there?
Tehcnically, the only way to do it with pure RSS is <enclosure>. Now, the greatness of RSS is that it's (almost) XML, which means that you can extended with namespaces... whether they are existing namespaces (like MediaRSS) or completely custom ones.
As to what you should do:
try to avoid creating your own namespace because it's unlikely everyone else will do the work to support it.
Use MediaRSS: (media:thumbnail) specifically if you need it for more than just the thumbnail (like a larger image, or other media elements).
If you only need <enclosure> then, just use plain RSS: simpler is better!
Related
Is there a way to add images inside Sulu.io editor, rather than creating properties or blocks?
I have been searching this in their issues, documentation and google, but I'm not sure if its possible or not, even tho one can add image links but not image tag, does not make sense.
We don't plan to support putting images directly into the editor. We actually also don't want that, because it contradicts our philosophy. Enabling the user to do stuff like that in the editor, would probably also allow him to break the site in unexpected ways, and it's close to impossible to properly implement a responsive design this way.
Im making a normal RSS feed for my website. I need to include simple html formatting in the description eg paragraphs, line breaks, lists, etc. To do this I need to wrap the description content as CDATA.
The issue with this is that when I validate my feed the content of the CDATA is ignored. So although the feed validates, I dont actually know if everything is ok or not.
How can I find out what markup will likely be read ok by the various RSS readers?
Can I use whatever markup I would happily put in a website? How about inline styles? Or is more like designing html emails? Thanks
RSS files are XML Formatted plain text, I think that's the only standard you can rely upon.
I think most Syndicators look like they're handling HTML in RSS as they simply download the linked article when you choose the header.
If you're looking to embed rich content, then you may well be better investigating Atom instead of RSS.
Have a look at this S/O question: Which is better for encoding HTML for RSS?
I'm trying to incorporate a google news feed in my website (Using the built-in SimplePie functionality of WordPress).
However, the default feed gets rendered in a strange table structure. Sure enough, when I inspect the feed XML, I see that Google News has a whole bunch of table html as its 'description' element, complete with embedded styles, etc (See this example)- essentially dictating how the feed must be displayed, and not allowing for any effective css based customization.
This seems really dumb- can anyone help explain what is going on, or at least agree with me that this is just a terrible feed architecture?
Feeds often include html tags, as many (most?) readers will handle and use them, and that way the RSS provider can have some nice looking output in the reader, as you've guessed. (I prefer flagging it as CDATA unless it's proper xhtml, as it's not valid xml/rss otherwise). It's not in the original spirit of RSS perhapts, but the Google feed is just an extreme example of common practice. As per your problem, does strip_htmltags help (simplepie.org/wiki/reference/simplepie/strip_htmltags)?
I'm working on multiple videos and images page on Drupal.
I would like to know if I can combine Video and Image CCK fields in back-end content type pages, in order to assign them a common mixed order, when I have multiple images and videos.
ps. I don't want to create a node for each image/video, I prefer to use the CCK fields, since it is easier for my customer to manage the files, change the order and delete them.
thanks
I suppose you can set a generic field type, use filefield module, and in the 'allowed filetypes' setting enter all image and video filetypes (png jpg gif avi flv etc), then also set 'unlimited' for the quantity allowed.
That said, maybe you need to explain your question or situation further, maybe provide a more detailed use case. Everyone seems confused about your question, and your basic structural plan may be flawed.
Usually you want to keep these things in separate fields, then use different views to pull exactly what you want. View1 would pull videos from the video field of the content type, View2 would pull images from the image field of the content type, View3 would pull videos and images, etc. When they are all mixed into one field you have to do extra parsing on the end to get what you want out, and that's more difficult.
But I don't think we understand what you are asking, an example case may help us help you.
If you're just asking if you can have image fields and video fields on the same content type, then the answer is yes.
That said, I have no idea what you mean by "a common mixed order."
You could look at using Views. http://drupal.org/project/views
Set it up to display Nodes and then add in all the fields you want, you can then set the style to be Ordered List. This should give you something similar to what your trying to achieve.
On my blog I use some CSS classes which are defined in my stylesheet, but in RSS readers those styles don't show up. I had been searching for class="whatever" and replacing with style="something: something;". But this means whenever I modify my CSS I need to modify my RSS-generating code too, and it doesn't work for a tag which belongs to multiple classes (i.e. class="snapshot accent"). Is there any way to point to my stylesheet from my feed?
The popular RSS readers WILL NOT bother downloading a style sheet, even if you provide one and link to it using <?xml-stylesheet?>.
Many RSS readers simply strip all inline style attributes from your tags. From testing today, I discovered that Outlook 2007 seems to strip out all styles, for example, even if they are inline.
Good RSS readers allow a limited set of inline style attributes. See, for example, this article at Bloglines about what CSS they won't strip. From experimentation, Google Reader seems to pass through certain styles unharmed.
The philosophy of RSS is indeed that the reader is responsible for presentation. Many people think that RSS should be plain text and that CSS in RSS feeds is inappropriate. It's probably not appropriate to impose a different font on your RSS feeds. However, certain types of content (for example, images floated on the left, with captions positioned carefully) require a minimal amount of styling in order to maintain their semantic meaning.
The point of RSS is to be display agnostic. You should not be putting style attributes on your feed.
I found this blog post that describes how to add style to your RSS feed.
Because RSS is (supposed to be) XML, you can use XML stylesheets.
http://www.w3.org/TR/xml-stylesheet/
The purpose of an RSS feed is to allow the easy transmission of content to places outside your site. The whole idea is that the content within the feed is format-free, so that it can be read by any piece of software. The program that is reading the your feed is in charge of how to present it visually. For example, if you had a website that read RSS, you would want to parse the feed into HTML, and style it that way. However, if you were building a desktop application to read the feed, you would implement the formatting quite differently.