Quote from: Frisco at Feb 06, 2006, 08:11 AM
Quote from: Frisco at Jan 31, 2006, 08:03 AM
is there a possibility to upload more then one image at the same time, i.e. a zipfile containing more then one photo? Another possibility would be to put the pics via ftp on the server and tell epg2 where to look.
...
As I know a little bit PHP and as I like modx, I thought to contribute and provide a patch for EPG2. ...
Well, I’ve done it so far - one can put images via FTP on the server where modx is installed and EPG2 stores them all in one loop. No need to upload one by one. This was very important to me, as I have to build a website with some hundred pictures in the galleries.
Just copy the content of module.epg2.tpl in the textarea of the gallerie module (not the snippet!) and copy style.css over assets/modules/epg2/style.css and you’re done.
You will recognize a new field called "Upload dir" when inserting a new picture. It expects a path like /assets/galleries/ftp (no slash at the end, provide the correct access rights to the ftp dir) with the images inside it. Each image will than be processed and stored in the database as it would be if you used the upload field "Image file". The images remain there, they are not automatically removed.
@Nick and Raymond:
May changes are marked with frisco, just search for it. Basically I changed module.epg2.tpl at three points:
1. function EPG2_form_p_create: added input field for ftp dir
2. function EPG2_p_create: look if ftp_upload is set, if so, process all files inside via getpictures
3. function getpictures(): new optional parameter pic_name, if ftp_upload is set take the image from pic_name instead of the uploaded file
Any feedback is greatly appreciated!