adding pics from a ftp folder somewhere else than in /albums adding pics from a ftp folder somewhere else than in /albums
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

adding pics from a ftp folder somewhere else than in /albums

Started by Alex92, November 04, 2010, 11:29:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Alex92

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

Nibbler

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.

Alex92

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?

Nibbler

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

Alex92

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?

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

Nibbler

You don't need to use a symlink in that case. Just change the 'albums' directory to '../pic_folder' in config.

Alex92

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

ΑndrĂ©

I suggest to move that folders and create appropriate rewrite rules on your webserver.

StrongEagle

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.

Quote from: 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).