CMS MADE SIMPLE FORGE

Gallery

 

[#10147] Option for randomizing order of images in gallery

avatar
Created By: Michal Bursa (xbursam)
Date Submitted: 2014-08-06 05:46

Assigned To:
Resolution: None
State: Open
Summary:
Option for randomizing order of images in gallery
Detailed Description:
I suggest an option can be added that will randomize the order of images in
gallery.

A client requested that, so I added this feature for him and now I suggest I may
be included in the module.

Two lines are to be inserted to action.default.php:

// first line reads if 'randomorder' parameter is set
// this will go after line: $folderpath = $this->GetPreference('fe_folderpath');
$randomorder = (isset($params['randomorder']) && ($params['randomorder']
==1)) ? 1 : 0;

// second line radomizes the order if images in the array
// it goes just before line: $images = array_splice($images, $start - 1,
$number);
if ($randomorder) shuffle($images);

History