Forums

[resolved] Need help with slight adaptation of plugin (2 posts)

  1. Walrick
    Member
    Posted 2 months ago #

    Hello,

    I really like the Flickr Photo Album plugin, as it has a lot of functionality, for example a tagcloud.

    However there's one drawback: it displays thumbnails in albums with the oldest first, instead of the newest. Which is illogical and a bit annoying in my opinion. I would mean that as the number of pictures in an album increases, visitors would have to go to the last page to see the latest photos.

    As I'm getting the idea that the creator is no longer supporting this plugin (he's been awfully quiet on his google code page this year), is someone willing to have a look at the plugin code to see whether it's possible to reverse the sort order?

    That would be awfully helpful.

    Regards,

    Walrick

  2. Walrick
    Member
    Posted 2 months ago #

    I managed to solved this myself. Noticed that the sets at Flickr themselves used the same behaviour and realised that if every set is like a photoalbum of an event that would be logical. However I use the sets basically as categories, hence the wanted reverse order.

    What I did is replace

    <?php foreach ($photos as $photo)

    with

    <?php $photos_reversed = array_reverse ($photos, true); ?>
    <?php foreach ($photos_reversed as $photo)

    in the following templates:

    1. photoalbum_album.html
    2. photoalbum

    This simply reverses the order in which the thumbnails are displayed.

    Is is by the way also possible to rearrange the order in the Organize function of Flickr.

    Regards

    Walrick

Reply

You must log in to post.

About this Topic