We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9674
    • 170 Posts
    Hi there,

    I have been inactive for a while, and back in the code I am looking to make / put a gallery in place using the revo gallery snippet.

    I wonder if someone already created an rss feed from an album ? huh

    Help and example appreciated.


    And yes, I already tried google smiley

    Cheers.

    Philippe
      • 9674
      • 170 Posts
      Quote from: Fildefer57 at Jul 20, 2011, 10:46 AM

      Hi there,

      I have been inactive for a while, and back in the code I am looking to make / put a gallery in place using the revo gallery snippet.

      I wonder if someone already created an rss feed from an album ? huh

      Help and example appreciated.


      And yes, I already tried google smiley

      Cheers.

      Philippe

      I tried the following :

      An XML page with empty template containing :

      <?xml version="1.0" encoding="UTF-8"?>
      
      
      
      <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
      <atom:link href="[[++site_url]]flux-rss-art-impulsion.xml" rel="self" type="application/rss+xml" />
      <title>[[*longtitle]]</title>
      <link>[[++site_url]]</link>
      <description>[[*description]]</description>
      <lastBuildDate>[[!getTime?format=`%a, %d %b %Y %H:%M:%S %z`]]</lastBuildDate>
      <language>fr-fr</language>
      
      
      [[!Gallery? &thumbWidth=`195` &thumbHeight=`140` &thumbTpl=`rssGalItemThumb` &album=`my_album`]]
      [[+Gallery]]
      </channel>
      </rss>


      a template named rssGalItemThumb for galley call containing :

      <item>
      <title>[[+name:toCDATA]]</title>
        <link>http://site.url/[[+gallery.name]].html</link>
           <description>[[+description:toCDATA]]</description>
        
      
       <pubDate></pubDate>
        <enclosure url="http://my_site.url[[+thumbnail]]" type="image/jpeg" ></enclosure>
      </item>


      But rather than having the image displayed I have link to the image....

      Some help from Gallery expert would greatly be appreciated. wink


      Thanks.

      Philippe
        • 9674
        • 170 Posts
        Finally the solution was to create a template chunk rssGalItemThumb with the following code :


        <item>
        <title>[[+name:toCDATA]]</title>
          <link>[[++site_url]][[+gallery.name]].html</link>
        <description><![CDATA[ 
        [[+description]] <br/> <a target="_blank" href="[[++site_url]][[+gallery.name]].html#[[+id]]"><img width="200" src="[[++site_url]][[+thumbnail]]" title="[[+name:htmlent]]" alt="[+name:htmlent]]" /></a>]]>
        </description>
          
        
         <pubDate>[[+gallery.date]]</pubDate>
        </item>
        


        The developpement is not completed since I want to put the picture modification date in it (if someone knows how to do it ?) and ensure the code is w3c compliant.

        But it works and may help other people to do it.

        Feel free to use it.


        Cheers.


        Philippe