Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
LightGallery
LightGallery
0
Comments
Just an idea..
thanks,
wayne
Here a really small update to 0.0.1 alpha, and I'm again really sorry that this took so long.
Since adding an alpha version is not possible, I'm gonna just post it here for the moment:
Changelog:
fix: filemtime instead of md5 => much faster, but new thumbs required. delete the old files!
new: style.css for LightGallery
new: pagination
Demo
Download (read readme.txt !!!)
Also, it's not generating thumbnails for me. And it requires you to enter all the settings again even when you want to change just one.
you can do so in most ftp programs
mis-one: possible... yeah, but requires some additional coding ;-)
// edit: jimw, after (around line 46)
$SettingsFile = galleryPath . '/settings.php';
add:if(!is_readable($SettingsFile)) die("LightGallery's settings.php is not readable. try changing chmod on /extensions/LightGallery/settings.php"); if(!is_writable(thumbPath)) die("LightGallery's thumbs dir is not writable. try changing chmod on /extensions/LightGallery/thumbs/");
If you updated LightGallery make sure
$Configuration['Gallery_FotosPerPage'] = '50';
is added to settings.phpI think the problem is that there is nothing in the settings that are grabbed from the settings. I put in echos in the Render of the LightGallery class and the settings are empty.
natsort($arr);
This line does the sorting. If you want it by date you need all dates and for example sort by key, I believe there is a php function for that - not sure.In case you write it, please send me the code ;-)
function LoadFiles($dir) { $Files = array(); $It = opendir($dir); if (! $It) die('Cannot list files for ' . $dir); while ($Filename = readdir($It)) { if ($Filename == '.' || $Filename == '..') continue; $LastModified = filemtime($dir . $Filename); $Files[] = array($dir .$Filename, $LastModified); } return $Files; } function DateCmp($a, $b) { return ($a[1] < $b[1]) ? -1 : 0; } function SortByDate(&$Files) { usort($Files, 'DateCmp'); } $Files = LoadFiles('data/'); SortByDate($Files);