Image of the day in a rss feed


I wish to use the new function getPictureOfTheDay() to populate an album containing this single image that would be published in a rss feed with printRSSLink().
How can I do that?

With a dynamic album I can't do that, can I?



  • acrylian Administrator, Developer

    This function just gets a random image and basically caches the result for one day before picking another random image. This is nothing an album can do.

    To use that result with an RSS feed you would have to code your own. But RSS feeds do support random order if you call it with the appropiate GETparameters. See the in file documentation of the class-feed.php file

  • davidarnoult Member
    edited October 2020

    Hi Acrylian,

    I am trying to use printRSSLink() and add some GET parameters manually on the result URL as you propose like sortorder=random&itemnumber=1.

    printRSSLink('gallery','','Test RSS', '', false, null, 'fr');

    URL is

    It works fine in the browser with the user session activated.

    My gallery is private so I have activated the RSS_portable_link with the token and user parameter. If I add sortorder and itemnumber parameters in the URL, mailchimp can not access to the feed.

    Do you have any idea why the token and user credentials does not work when I add manually these parameters? Is there a way to send these parameters directly in the function printRSSLink()?


  • acrylian Administrator, Developer

    I admit I haven't used the token/portable links in ages. But looking at the code the token is generated from the link so adding parameters manually afterwards will create a mismatch.

    The RSS plugin has some predefined mode and you can only those parameters globally via the options. Quickly looking without trying it at all: I think if you need this kind of custom feed you need to create the token manually after you added the additional parameters. See line 346 of the plugin for example how that is created.

    Sidenote, the language code should probably be "fr_FR" as that is what your translations are tied to generally. But perhaps works as well. If your site is French only anyway, you don't need the language naturally.

  • acrylian Administrator, Developer

    FYI the support build/1.5.8b now has a RSS class method generateToken() Use this and not what is currently used. There is a change planned that otherwise may break this.

  • Great thanks! I will check that.

Sign In or Register to comment.