indexr icon indicating copy to clipboard operation
indexr copied to clipboard

Doesn't list subfolders

Open firedev opened this issue 13 years ago • 6 comments

Is there a way to get it to display folders? This is a deal-breaker for me making this script useless.

firedev avatar Aug 20 '12 05:08 firedev

I'm not sure it should list folders as entities, but pulling all files from the subfolders and showing them nicely could be useful.

berkus avatar Dec 02 '12 16:12 berkus

Yep this is a good question, for scrup it should list everything at one level. But for other uses it would be best to display folders as folders I think.

firedev avatar Dec 10 '12 04:12 firedev

I have made a small change that collects files from all subfolders and shows them, not as nice as I would like it to, but it works http://pic.madfire.net/scr/

One thing I don't like to do is to overcomplicate indexr code with special cases for scrup use, but looks like this is inevitable. One option would be to automatically treat valid two-letter hex directory names as scrup file prefixes and scan them, while showing the rest as folders. Wdyt?

EDIT: Oh, and it's here if you want to take a look at my dirty code https://github.com/berkus/indexr

berkus avatar Dec 12 '12 09:12 berkus

That's pretty nice, although I would suggest to list folders as 7g/xncn9vhp0c0og.png not ./7g/xncn9vhp0c0og.png – looks much tidier and accurate.

I think this is a good idea, especially if you would check that this is a valid hex value. Otherwise it should display folder as folder I guess.

Sorry I am very busy right now and can't dedicate time to work on indexr, but you're moving in the right direction I think.

firedev avatar Dec 13 '12 04:12 firedev

I very much need this script to list subfolders as their own, clickable/navigatable items in the list. So that if there is a subfolder, you can click on it, and then it would open the next index.php available in THAT subfolder, thus displaying it's images etc. I do not want it to recurse subdirectories, and list their images along with the parent folder (this would nullify the organization the subdirectories provide!)

Because index.php gets requested by the browser now, instead of the default of just listing the files/directories, I have now lost the ability to navigate into subfolders from my image directories that employ this script, thus making this a real dealbreaker.

I other wise love this script. How can I make it handle folders, as folders?

Protonus avatar Feb 24 '16 18:02 Protonus

An update. I found another PHP single file gallery solution that does offer directory support. It also recursively handles all sub-directories, so you only need to drop in one copy of the index.php. It also reports EXIF data, has a slideshow, and more. So I've switched to using this instead. Thank you anyways! https://sye.dk/sfpg/

Protonus avatar Feb 25 '16 18:02 Protonus