• Hello,

    First of all thanks for your great plugin and hard work!

    Could you explain us how we could display gallery content in random order? (nor date / nor relevance / not interstingness / just random).

    We use the Flickr part (and corresponding shortcode) from your plugin.

    Thanks in advance for your support!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Sayontan Sinha

    (@sayontan)

    Flickr doesn’t have a “random” order, so there is not much Photonic can do there to help you. You might want to consider using the “Mosaic” layout, which arranges photos somewhat randomly, but again, that is not connected to anything that Flickr itself provides.

    Thread Starter benoitroubert

    (@benoitroubert)

    @sayontan

    Your plugin surely has at a moment the table of all elements to be displayed when communicating with Flickr, no?

    Could it be possible to hack your plugin simply to have the elements of this table in random order, before constructing the gallery?

    It should be possible no?

    Help would be really appreciated.

    Thread Starter benoitroubert

    (@benoitroubert)

    @sayontan

    Maybe in Photonic_Flickr_Processor.php file?

    Plugin Author Sayontan Sinha

    (@sayontan)

    Hi,
    No, Photonic does not store any data in a separate table. All data is pulled live from Flickr or any other source.

    The main challenge with what you are asking for is “pagination”. This is what I mean:

    1. Let’s say your gallery has 100 photos, and you load them 20 at a time.
    2. The way Photonic works is that it will request for 20 photos each time rather than trying to pull all 100 together. This saves bandwidth and ensures a quicker response time.
    3. Flickr returns 20 photos as per the sort criteria that you give it. This will generally be constant.
    4. Even if you randomize what Flickr is returning, you are still randomizing the same set of 20 photos; it is not that you are getting a different set of 20 photos, because Flickr is always giving you the same thing.

    The above is similar to how the Mosaic layout works – after the data is pulled it tries to randomize it to get a perfect fit, but true randomization will only happen if Flickr itself is returning different photos each time.

    If I try to do a true randomization outside of Flickr, that will incur a performance hit. Basically, if an album has more photos than the maximum limit, I will have to make multiple calls internally, then pull photos at random. This is very computation-intensive and will slow down things on your site quite a lot.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display gallery in random order’ is closed to new replies.