Read images from folder /albums uploaded by ftp client
|
superwoofer
Joined: 2012-05-19
Posts: 10 |
Posted: Fri, 2012-06-15 19:06
|
|
Hello. I have lot of images I want to publish on my gallery. I want to upload all of images from my pc through ftp client in folder var/albums. How can I make this folder read all images from folder var/albums? Thanks in advance... |
|
| Login or register to post comments |

Posts: 25941
You need to create a temporary directory and use the server add module to add those items. Gallery will create a copy of them and then you can remove the temp directory later.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 10
Again.
How can i do it?
I want it in the future also. Not for 1 use only...
Posts: 25941
You have to be a bit more verbose.
There is no automatic method. You have to use the server add each time you want to add items with this method.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 10
Thanks for reply but I think I can make some changes in php but i don't know where to put this code:
//path to directory to scan
$directory = "/var/albums/";
//get all image files with a .jpg extension.
$images = glob($directory . "*.jpg");
//print each file name
foreach($images as $image)
{
echo $image;
}
Posts: 25941
I'm lost as to what you want to achieve.
I need a user story to understand.
Do you understand what I mean by user story?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 10
Folder var/albums must read every photo uploaded today, tomorrow or ten years later and publish it in the gallery. Do you understand now?
Posts: 25941
No.
Do you understand now?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 25941
If that is what you are after, then no, that feature does not exist yet.
Try:
http://gallery.menalto.com/forum/101
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 10
Yes, that feature. Include it in Gallery 3.0.5 update.
With this gallery now, if we avoid mysql and create php script to scan folder with images and automatically publish them, then it possible to make to php put them in mysql. Then we get a slower gallery but it is possible. Everything is possible to make with mysgl and php.
Posts: 25941
Sure it is. Care to write a module to do this function? If you do then it will help out the community to get the feature faster.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team