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...

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2012-06-16 05:04

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

 
superwoofer

Joined: 2012-05-19
Posts: 10
Posted: Sat, 2012-06-16 18:20

Again.

How can i do it?

I want it in the future also. Not for 1 use only...

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2012-06-16 18:46
Quote:
How can i do it?

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

 
superwoofer

Joined: 2012-05-19
Posts: 10
Posted: Sat, 2012-06-16 19: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;
}

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2012-06-16 19:34

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

 
superwoofer

Joined: 2012-05-19
Posts: 10
Posted: Sat, 2012-06-16 19:51

Folder var/albums must read every photo uploaded today, tomorrow or ten years later and publish it in the gallery. Do you understand now?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2012-06-16 20:08

No.

Quote:
There is no automatic method. You have to use the server add each time you want to add items with this method.

Do you understand now?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2012-06-16 20:15
a good user story wrote:
As a user for Gallery I would like to FTP items to a folder on the server.
This folder could be configured via some admin interface to be scanned automatically.
I would like to have Gallery read that folder and add those items automatically to the gallery.
It would keep the folder structure as album name in the final destination in Gallery.
Once those items are added to Gallery, Gallery would delete those items and continue to re-scan that directory for any changes in the future.

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

 
superwoofer

Joined: 2012-05-19
Posts: 10
Posted: Mon, 2012-06-18 10:53

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.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2012-06-18 16:05
Quote:
Everything is possible to make with mysgl and php.

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