InstaGallery icon indicating copy to clipboard operation
InstaGallery copied to clipboard

Thumbnails in separate folder, please

Open CriBP opened this issue 2 years ago • 7 comments

First, thank you for your work, I've been looking for a simple one page no database Galley for a log time, and this one is the closest one I found to my needs. I have a few requests, since I couldn't figure them out yet:

  1. is there a way to put thumbnails in a separate folder, for example "/thumbs" so we can keep a clean list of pictures? Some of my gallery folders may have over a thousand pictures, and I don't like to double the numbers.
  2. I have a little project where I don't want captions, but only pictures. How can I safely disable captions?
  3. Can we make size-proportional thumbs?
  4. Can we eliminate the white border around thumbs completely and fill the "DIV" with the thumbnail? Thank you again and I'm looking forward for your answer!

CriBP avatar May 05 '22 18:05 CriBP

Hi @CriBP ,

  1. it's not supported, I'm afraid. If you add support for this as an option, I'd be happy to take a pull request.
  2. You can delete any of the .inc files and that functionality should just get disabled. Eg. Delete instaGallery_comments.inc
  3. The easiest way would probably be to generate thumbnails ahead of time with padding so that the thumbs are still square. I believe that the css assumes that the thumbs are square.
  4. You should be able to do it all with CSS, but it's not supported right now. If you make something nice, I'd be happy to include a pull request with an alternative style that people could use.

My photo collection has grown big enough that I needed a database, so I don't use this code much anymore. I do try to keep it running, but I'm not planning on making it more mobile friendly, for example.

What I'm using now is https://github.com/stuporglue/fastback, which uses SQLite, and requires generating the thumbnails ahead of time. It's alpha quality at the moment, so if you try it, be warned.

stuporglue avatar May 05 '22 21:05 stuporglue

Hello @stuporglue , Thank you for your fast reply. I am not an expert in coding, but I will probably end up building something that will do what I need. My own gallery is over 150000, but still I don't want to use a database, I need something with no maintenance, a basic view of the pictures, that works on any device.

  1. Can you please let me know what line of the code generates the Thumbnails? I will try to work on creating a sub-folder for them
  2. I don't use any xxxx.inc files, what I mean is the text/title underneath the pictures. Is there a safe way to disable it?
  3. I would like to know how these thumbnails are generated, then I can figure out if there is a way to make them proportional
  4. I like the clean design I used so far from https://code-boxx.com/simple-php-gallery-from-folder/ still that is not as friendly for small mobile screens and very big ones. I am trying to find a code that will make it useful on 4K monitors or TV's and mobile devices, too. Your new Gallery may look promising, do yo have a demo anywhere?

CriBP avatar May 06 '22 06:05 CriBP

If anybody still interested in generating the thumbnails in a separate folders here is a diff file which can be applied to index.php index.diff.txt

Sergey-77 avatar Oct 07 '23 10:10 Sergey-77

If anybody still interested in generating the thumbnails in a separate folders here is a diff file which can be applied to index.php index.diff.txt

Thanks for your solution!!!
please, how to use? ... i think it means find xxxxxx -> delete [-] and fill with [+] marked lines?

Yippeee!!!! i´ve made it manually and it works!

Many many THANKS!!! to stuporglue for this fantastic tiny gallery and to Sergey-77 for this good working addon!!!

RonXTCdaBass avatar Oct 14 '23 17:10 RonXTCdaBass

hello again! after the changes with the index.diff.txt, all working fine. but for another script i turned on the error messages from the server and now the gallery shows me this:

Warning: is_file(): open_basedir restriction in effect. File(/brd_irrenanstalt_thumb.jpg) is not within the allowed path(s): (/php_sessions:/tmp:..:/var/www/errors:/usr/share/pear:/home/vol2_8/infinityfree.com/if0_35061821/htdocs) in /home/vol2_8/infinityfree.com/if0_35061821/htdocs/cms/instagalerie/index.php on line 194

and means the "$relpath" in line 194

$thumbname = "?d=$relpath&t=$filename";

with error-report off, all runs fine.

P.S. error report only when calling the gallery inside an iframe. direct call shows no errors. O_o

RonXTCdaBass avatar Oct 18 '23 23:10 RonXTCdaBass

On line 192 of index.php try to replace '/' with (($relpath == '') ? '_thumbnails/':'/_thumbnails/') I also updated the diff file if you decide to patch original index.php.

Sergey-77 avatar Oct 21 '23 23:10 Sergey-77

On line 192 of index.php try to replace '/' with (($relpath == '') ? '_thumbnails/':'/_thumbnails/') I also updated the diff file if you decide to patch original index.php.

Happy Monday or night ;) !!! and Thank you very much!!!

no errors anymore :D

calling the gallery as single file works really perfect! iframe too, only including in an cms dont wanna work correct.

if you wanna look what i playin arround , 2 servers and systems...

i´m trying and experimenting with QuickCms. This is where the include dont wanna work: https://ronxtcdabass.free.nf/cms/?fail

and my other server and no CMS, but i like it ^^: https://ronxtcdabass.lima-city.de/cms/instagalerie/gallery_menu.php

RonXTCdaBass avatar Oct 22 '23 23:10 RonXTCdaBass