Hi,
I’m on a server that has quite strict default file permissions: files are not readable by "all" by default. This means that the thumbnails created by MaxiGallery are not viewable by "all", and so not viewable from a web-browser (until I log into the server via ssh and chmod the thumbnails manually). The (large) uploaded photos themselves are fine however, with correct permissions (as I think modx sets the permissions of uploaded files appropriately).
Does anyone know how I can get MaxiGallery to set the permissions of the thumbnails to be world readable?
Tommy T.
Try adding the following line to the end of createthumb function in maxigallery.class.php (to line 325):
chmod($path_to_gal.$prefix.$filename,0666);
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
That works great! Thank you,
Tommy T.
I’ll get it added to the next release and make the chmod values configurable too.. I’ve been meaning to do that but I have forgotten it..
"He can have a lollipop any time he wants to. That's what it means to be a programmer."