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

edited September 2007 in Vanilla 1.0 Help
LightGallery
«13

Comments

  • This works great for me (also using FriendlyURLs)! Will the ability to comment be added for users? I'm not trying to get ahead of things but I was thinking of an interesting concept. What if on the initial page, Instead of the current text, the user was presented with:
    image



    Just an idea..
  • yeah I already thought of that http://vanilla.baldursoft.de/ThickGallery but it might take a while. going on vacation tomorrow
  • Can't this use the already established JQThickBox extension instead of Lightbox?
  • Dumped 500 images in the directory and I think we might need some sort of pagination.
  • Is there a way so we can let users upload photos, and it'll display them after wards, please help.
    thanks,
    wayne
  • @ skube no, lightbox is far better for images :) @ mis-one yeah, put them in dir1, dir2, dir3 so long @ waynem80 yeah, I plan on doing that. but going on vacation in... ahm.... 10 minutes :D
  • Skube, I've already suggested using something like this - perhaps if enough of us ask, we can get him to add Thickbox support as well. While I agree that Lightbox is a more attractive proposition than Thickbox (out of the box), it's also a lot heavier, and hey, why not give people the choice?
  • The main gripe I have with Lightbox is that you have to close and open each photo. You can't simply go next/previous. But yeah, I agree Stash - lighter is always better as well as choice.
  • You can go next/previous - create a gallery with Lightbox and then move your mouse over the right/left half of the picture. Check it out working just fine here... http://exhibitq.com/talk/discussion/4/ Edit 1: Hehe smeg - I just realised the image paths are busted... gimme a sec. Edit 2: Working now, I had an older copy installed - now updated to the most recent.
  • Ah ok...thanks Stash. I still find Thickbox works better tho...
  • @ lightbox vs thickbox IMHO the next/previous ability of lightbox is far nicer, also the next/prev image preloading.... I will add thickbox and lightbox gone wild (or similar) support at some point, however this isn't really high up in my priority list :) @ future I'm gonna start with some access management now: group / user => category / image, with a default (results in deny), explicit deny and allow setting. This however requires a sql table, but is the right step for LightGallery I believe. Allthough it's than not really light anymore ;-)
  • If you're worried about that not being light any more, why not make this a tech preview for "heavy gallery"?
  • Sorry for the long time without updates, I've been working on other projects and the access management prooved to be more complicated than it appeared.
    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 !!!)
  • Great work AlexL! Any way to sort by date instead of file name?
  • Just downloaded and installed but I am confused. I continue to get a divide by zero on line 229. It doesn't look like the settings are being retrieved because this is the fotos per page setting.

    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.
  • jimw try (just for testing) setting chmod on settings.php and thumbs to 777 (both in /extensions/LightGallery)
    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.php
  • I added the code you suggested and made sure the settings file was intact. There was no change.

    I 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.

  • mis-one: possible... yeah, but requires some additional coding ;-)
    Oh okay, that's fine. I tried messing with it a little. Am I correct in that the ordering now is done by filename in the images directories?
  • yeahnatsort($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 ;-)
  • I'm not in any sense a php expert.. But I found this little snippet of code that might could help in sorting the images by modification date of the file:
    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);
Sign In or Register to comment.