<image> tags in Feeds Plugin

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

<image> tags in Feeds Plugin

Jason Morris-5
Is it possible to add an <image> tag using Feeds Plugin?

I tried various combinations, this looks like it should be the right one but nothing turns up in the RSS source:

    def myFeed =
    {
        render(feedType:"rss", feedVersion:"2.0")
        {
            title = "My test feed"
            link = "http://your.test.server/yourController/feed"
            description = "My Test news feed"
            image()
            {
                url("http://x.y.com/images/rss/image.jpg")
            }

   
            Article.list().each()
            { article ->
                entry(article.name)
                {
                    link = "http://localhost:9000${createLink(action:"show",id:"$article.id")}"
                    article.description // return the content
                }
            }
        }
    }


I do remember someone saying they used their own GSP for RSS feeds because of some limitations in the plugin, is this one of them? If so it is a shame because it is super-easy to use otherwise :-)

Thanks,

Jason
Reply | Threaded
Open this post in threaded view
|

Re: <image> tags in Feeds Plugin

Marc Palmer Local

On 27 May 2008, at 09:55, Jason Morris wrote:

> Is it possible to add an <image> tag using Feeds Plugin?
>
> I tried various combinations, this looks like it should be the right  
> one but nothing turns up in the RSS source:
> [snip]
> I do remember someone saying they used their own GSP for RSS feeds  
> because of some limitations in the plugin, is this one of them? If  
> so it is a shame because it is super-easy to use otherwise :-)


If you want images in articles, just return html content.

What do you expect an image in the root node of the feed builder to  
achieve?

Marc


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: <image> tags in Feeds Plugin

Jason Morris-5
Hi Marc

I'm expecting the RSS reader to display the image, with a link, as you would see with, say, any podcast feed e.g. try opening http://feeds.feedburner.com/nlo in Firefox.

Not looking for it in articles, just looking for the <image> sub-element of <channel> in RSS, as RSS doesn't seem to support and <image> tag under <item>. IMHO that is a big oversight in the spec (who says RSS is always read by a browser?), but that is a much wider issue than either of us will solve :)

I'm pretty sure ROME supports it: https://rome.dev.java.net/apidocs/0_9/com/sun/syndication/feed/synd/SyndFeedImpl.html (see setImage/getImage methods)

Cheers

Jason

On Tue, May 27, 2008 at 8:23 PM, Marc Palmer <[hidden email]> wrote:

On 27 May 2008, at 09:55, Jason Morris wrote:

Is it possible to add an <image> tag using Feeds Plugin?

I tried various combinations, this looks like it should be the right one but nothing turns up in the RSS source:
[snip]

I do remember someone saying they used their own GSP for RSS feeds because of some limitations in the plugin, is this one of them? If so it is a shame because it is super-easy to use otherwise :-)


If you want images in articles, just return html content.

What do you expect an image in the root node of the feed builder to achieve?

Marc


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: <image> tags in Feeds Plugin

tomas lin
I am pretty sure the render tag only supports entry items, if you want
to do anything more complicated than that, you might want to try using
the FeedBuilder class, which I believe is backended with the ROME API

There is an example in the plugin page of how to use this:

http://grails.org/Feeds+Plugin

On Tue, May 27, 2008 at 7:26 PM, Jason Morris <[hidden email]> wrote:

> Hi Marc
>
> I'm expecting the RSS reader to display the image, with a link, as you would
> see with, say, any podcast feed e.g. try opening
> http://feeds.feedburner.com/nlo in Firefox.
>
> Not looking for it in articles, just looking for the <image> sub-element of
> <channel> in RSS, as RSS doesn't seem to support and <image> tag under
> <item>. IMHO that is a big oversight in the spec (who says RSS is always
> read by a browser?), but that is a much wider issue than either of us will
> solve :)
>
> I'm pretty sure ROME supports it:
> https://rome.dev.java.net/apidocs/0_9/com/sun/syndication/feed/synd/SyndFeedImpl.html
> (see setImage/getImage methods)
>
> Cheers
>
> Jason
>
> On Tue, May 27, 2008 at 8:23 PM, Marc Palmer <[hidden email]> wrote:
>>
>> On 27 May 2008, at 09:55, Jason Morris wrote:
>>
>>> Is it possible to add an <image> tag using Feeds Plugin?
>>>
>>> I tried various combinations, this looks like it should be the right one
>>> but nothing turns up in the RSS source:
>>> [snip]
>>> I do remember someone saying they used their own GSP for RSS feeds
>>> because of some limitations in the plugin, is this one of them? If so it is
>>> a shame because it is super-easy to use otherwise :-)
>>
>>
>> If you want images in articles, just return html content.
>>
>> What do you expect an image in the root node of the feed builder to
>> achieve?
>>
>> Marc
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: <image> tags in Feeds Plugin

Jason Morris-5
Thanks Tomas, I will give that a go

On Wed, May 28, 2008 at 8:11 AM, Tomas Lin <[hidden email]> wrote:
I am pretty sure the render tag only supports entry items, if you want
to do anything more complicated than that, you might want to try using
the FeedBuilder class, which I believe is backended with the ROME API

There is an example in the plugin page of how to use this:

http://grails.org/Feeds+Plugin

On Tue, May 27, 2008 at 7:26 PM, Jason Morris <[hidden email]> wrote:
> Hi Marc
>
> I'm expecting the RSS reader to display the image, with a link, as you would
> see with, say, any podcast feed e.g. try opening
> http://feeds.feedburner.com/nlo in Firefox.
>
> Not looking for it in articles, just looking for the <image> sub-element of
> <channel> in RSS, as RSS doesn't seem to support and <image> tag under
> <item>. IMHO that is a big oversight in the spec (who says RSS is always
> read by a browser?), but that is a much wider issue than either of us will
> solve :)
>
> I'm pretty sure ROME supports it:
> https://rome.dev.java.net/apidocs/0_9/com/sun/syndication/feed/synd/SyndFeedImpl.html
> (see setImage/getImage methods)
>
> Cheers
>
> Jason
>
> On Tue, May 27, 2008 at 8:23 PM, Marc Palmer <[hidden email]> wrote:
>>
>> On 27 May 2008, at 09:55, Jason Morris wrote:
>>
>>> Is it possible to add an <image> tag using Feeds Plugin?
>>>
>>> I tried various combinations, this looks like it should be the right one
>>> but nothing turns up in the RSS source:
>>> [snip]
>>> I do remember someone saying they used their own GSP for RSS feeds
>>> because of some limitations in the plugin, is this one of them? If so it is
>>> a shame because it is super-easy to use otherwise :-)
>>
>>
>> If you want images in articles, just return html content.
>>
>> What do you expect an image in the root node of the feed builder to
>> achieve?
>>
>> Marc
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: <image> tags in Feeds Plugin

Marc Palmer Local
In reply to this post by tomas lin

On 28 May 2008, at 08:11, Tomas Lin wrote:

> I am pretty sure the render tag only supports entry items, if you want
> to do anything more complicated than that, you might want to try using
> the FeedBuilder class, which I believe is backended with the ROME API
>
> There is an example in the plugin page of how to use this:
>
> http://grails.org/Feeds+Plugin


Actually not quite true - the render method uses the builder. The  
features are the same.

You can set any property of the ROME SyndFeed or SendEntry beans. So  
on the SyndFeed you can do:

   image = new SyndImage( .... )

See https://rome.dev.java.net/apidocs/0_9/com/sun/syndication/feed/synd/SyndFeed.html 
#setImage(com.sun.syndication.feed.synd.SyndImage)

FYI I've fixed an annoying bug in the builder in SVN, and have just  
added enclosure and now iTunes podcast tag support (not committed yet)

Marc

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: <image> tags in Feeds Plugin

eyuana
In reply to this post by Marc Palmer Local
Pusat Pengetahuan dan Teknologi mengungkap ilmu pengetahuan dalam berbagai aspek kehidupan. Tutorial Elektronika, Pengetahuan Umum, Komputer dan Internet. Khusus untuk tutorial elektronika kami eyuana.com pernah membahas modifikasi speaker aktif
Pusat Pengetahuan dan Teknologi Eyuana mengungkap ilmu pengetahuan dalam berbagai aspek kehidupan. Tutorial Elektronika, Pengetahuan Umum, Komputer dan Internet