forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 upload => Topic started by: Alex92 on November 04, 2010, 11:29:18 am

Title: adding pics from a ftp folder somewhere else than in /albums
Post by: Alex92 on November 04, 2010, 11:29:18 am
Hi,

I've been trying out gallery solutions lately and i find coppermine really nice and probably the winner on the list.
But there's one feature that i can't get to work the way i would like to...

In Gallery 3.0 for instance you can load pictures from anyplace in your host's ftp, including non-public_html areas. (for instance /home/my_domain/some_pic_folder).
Whereas in Coppermine I can't figure out how to load from anywhere else than /home/my_domain/public_html/coppermine/albums/some_pic_folder).
Is there any way to go around this limitation?

The reason I really need to do this is that I have plenty of stuff already present on that ftp which I can't move to /albums or else I mess up some other links...

Any ideas?

Thx
Title: Re: adding pics from a ftp folder somewhere else than in /albums
Post by: Nibbler on November 04, 2010, 11:32:14 am
The files have to be in public_html. You can change 'albums' to any other path in config. If you don't want to copy them then use a symlink.
Title: Re: adding pics from a ftp folder somewhere else than in /albums
Post by: Alex92 on November 04, 2010, 02:02:31 pm
Thanks for quick reply!

Any particular reason to this limitation? Gallery 3.0 grabs anything even one level above /public_html, I double-checked just now and it works like a charm (but somewhat slower than Coppermine doing the same transfer from /album/uploads)...

About the symlink tip, I would like to give it a try but from what I googled I would need access to a console on the host server and I only have basic access to an ftp...
Is there any workaround like creating a file/folder in /albums that points to some other folder?
Title: Re: adding pics from a ftp folder somewhere else than in /albums
Post by: Nibbler on November 04, 2010, 02:51:12 pm
It's because Coppermine leaves the pictures where you batch add them from and that location needs to have a public URL. Locations above public_html will not generally have a public URL. I've never used Gallery 3.0.

Your host should be able to create a symlink for you if you give them the exact source and destination paths you want. Alternatively you can create them yourself using PHP - http://php.net/symlink
Title: Re: adding pics from a ftp folder somewhere else than in /albums
Post by: Alex92 on November 04, 2010, 05:17:04 pm
Got it, Gallery 3.0 actually copies over the original files to some dir in it's own sub-dir.

I basically don't know anything about php and tried to use the symlink function with no luck...
How can I get this to work?

Code: [Select]
<?php
$target 
'uploads.php';
$link 'uploads';
symlink($target$link);

echo 
readlink($link);
?>


Say I wan't to grab pics from /home/my_domain/public_html/pic_folder and my default coppermine "add from server" folder is /home/my_domain/public_html/coppermine/albums/uploads
What should i replace "uploads.php" and "upload" with?
Is $target necessarily a php file or can it be a path?
Once saved as a php file, where should i put it on my ftp? and how to launch it?

Help i'm confused...  ???
Title: Re: adding pics from a ftp folder somewhere else than in /albums
Post by: Nibbler on November 04, 2010, 07:22:51 pm
You don't need to use a symlink in that case. Just change the 'albums' directory to '../pic_folder' in config.
Title: Re: adding pics from a ftp folder somewhere else than in /albums
Post by: Alex92 on November 04, 2010, 08:17:18 pm
The problem is that i don't have a single pic_folder, it's more like:

/home/my_domain/public_html/pic_folder1
/home/my_domain/public_html/pic_folder2
/home/my_domain/public_html/pic_folder3
/home/my_domain/public_html/pic_folder4
/home/my_domain/public_html/etc...
/home/my_domain/pic_folder5
/home/my_domain/pic_folder6
/home/my_domain/pic_folder7
/home/my_domain/etc...

Looking for a way to hook the present '/album' to all of these folders...
Else i'll just have to copy/paste each and every one of these folders to '/album' through the web interface that my hosting provider offers (i can't do it directly from my ftp client).
Title: Re: adding pics from a ftp folder somewhere else than in /albums
Post by: Αndré on November 05, 2010, 04:43:19 pm
I suggest to move that folders and create appropriate rewrite rules on your webserver.
Title: Re: adding pics from a ftp folder somewhere else than in /albums
Post by: StrongEagle on November 24, 2010, 08:27:23 am
Use a symlink to each folder from the albums folder.  Make sure each folder is 777.

For example, my coppermine gallery is at pix.  I cd into /mydomain/pix/albums

then execute the following link to symlink the dir

ln -s
/home/my_domain/public_html/pic_folder1 pic_folder1 (or any other name you want).

The linked folder shows up under the batch upload and works just fine.

The problem is that i don't have a single pic_folder, it's more like:

/home/my_domain/public_html/pic_folder1
/home/my_domain/public_html/pic_folder2
/home/my_domain/public_html/pic_folder3
/home/my_domain/public_html/pic_folder4
/home/my_domain/public_html/etc...
/home/my_domain/pic_folder5
/home/my_domain/pic_folder6
/home/my_domain/pic_folder7
/home/my_domain/etc...

Looking for a way to hook the present '/album' to all of these folders...
Else i'll just have to copy/paste each and every one of these folders to '/album' through the web interface that my hosting provider offers (i can't do it directly from my ftp client).