By default, the slideshow displays the images in the order they were added in the imagefield. The user has an option to change the order there, but suppose one wanted to display the last image one added to the field, first in the slideshow (desending sort), would it be possible to include a setting to select the sort order ?

Maybe a radio-button where the default sort is ascending, one can click descending.. and maybe a third option to randomly start at any image in the slideshow. Some people would like that everytime they navigate to a page, a different image is shown to the visitor first.

some code like:
$count = 0;
foreach ($items as $key => $item) {
if (!is_array($item)) {
...($items[$key]);
}

reverse the array for descending sort.. or use the random function to randomize the sort.. before the links are generated so that it does not mess up the numeric pager.

Comments

jdanthinne’s picture

Status: Active » Needs review

Ok, I've added an "Order" setting, with reverse and random options.
Please test next DEV or use patch here http://drupalcode.org/project/field_slideshow.git/patch/11bcf65

vinsabus’s picture

Just tested it, works great ! Many Thanks!

jdanthinne’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.