forum.coppermine-gallery.net
No Support => General discussion (no support!) => Topic started by: ArielTM on July 23, 2006, 01:07:42 am
-
Hi all,
First I would like to say that this script is the best gallery script I have seen, including commercial ones..
I found a way to view in coppermine pictures stored in photobucket
First look at my gallery: http://album.arieltm.net/ ( A bit of hebrew but you'll manage :) )
You can see that all the pics there are not really stores on my server but on photobucket...
How did I do it??
The key is The "album directory" setting located under "Files and thumbnails advanced settings"
This setting, by default "album/", sets the directory that all the pictures are being stored at....
Normally this directory should be on your server... but what happens if you point the script to another server??? lets say photobucket??
(http://img301.imageshack.us/img301/8619/1ag5.jpg)
The main idea is to point this setting to your photobucket directory... in my case http://i57.photobucket.com/albums/g224/arieltm/albums/
This way the coppermine script will add at the begining of the src attribute in the IMG tag your photobucket directory....
(http://img301.imageshack.us/img301/121/2kh5.jpg)
And this is what you have to do:
- Open a Photobucket account
- Create in your acount the exact direcory structure as on your album dir on your server
- Upload all your pics, including the thumb_ and normal_ to photobuct in the exact direcory structure as your server (The Windows XP Publisher wizard is recommended: http://tutorials.photobucket.com/tutorial_40.html )
- Change the "album directory" setting to your photobucket folder
Photobucket structure:
(http://img301.imageshack.us/img301/4990/3pv8.jpg)
Now the problem is to upload new pictures to the gallery because coppermine thinks that your photobucket folder is on your server... and it wants to create the "thumb_" and "normal_"
I uploaded files only with the "batch add files" option so here's the way:
IMPORTANT: your files extension must be lowercase because photobucket renames all the pics extensions to lowercase
- Change the "album directory" setting back to "album/" so the script can access your server
- Upload all the new pics to a folder under "album/" IN YOUR SERVER (Don't forget to chmod)
- run the "batch add files" scrpit and add the pics to your gallery
- Open a new album in photobucket in the exact structure as on your server
- Upload the new pics to photobucket (including the "thumb_" and "normal_") to the new album in photobucket
- Change the "album directory" to your photobucket folder
Problems I experienced:
- When the "album directory" is set to pohotobucket both the batch add and the normal upload are disabled
- As I've already said, you can't upload files with an uppercase extension, you need to rename them
- After some pictures are uploaded to photobucket the photobucket server is changed.. for me it changed from http://s57.photobucket.com/albums/g224/arieltm/albums/ to http://i57.photobucket.com/albums/g224/arieltm/albums/ This is ok because the new pics are located on the new server (i57) and the old pics are located both on the new and old(s57) servers.. so you can easily change the "album directory" to the new server (In my case from http://s57.photobucket.com/albums/g224/arieltm/albums/ to http://i57.photobucket.com/albums/g224/arieltm/albums/ )
- The zip download doesn't work
Few things I didn't check:
- Photobucket automaticly create thumbs called "th_{filename}", maybe you can use them instead on the ones created by coppermine
- I guess you can create a mod that will alter the upload scripts to upload directly to photobucket (using sockets)
I think that's it....
1 GB space with 10 GB Monthly bandwidth for free!!!
If you have more questions post them here...
-
Well, It has been a week and no replies...
Did anyone tried it?? anyone experienced a problem?
My gallery is still online if you want to check that it works http://album.arieltm.net
Iknow it's a long shot but maybe you should consider adding this to the tutorials section?
-
Switching the albums folder setting back and forth is not a very elegant way. In fact, you could upload to any external server, creating the intermediate and thumbnails files on your client before uploading would render the step of switching the albums folder every now and then invalid. In fact, you're using Coppermine to resize pics only, which is a comparatively trivial thing to do on your client (e.g. by using IrfanView's batch mode). The albums folder setting in coppermine is just what it says: it expects a folder name, not a URL, so in fact many features will break, because your mod lacks the capability to do what simply can't be done: the PHP script on the server you control (i.e. the server your coppermine-driven gallery resides) doesn't have control over the other server (where you want to store your files). In fact, the remote server could be anything, not just photobucket.
Another drawback of your approach: this will only work if you disallow your users to upload at all.
I appreciate your willingness to share your solution, but imo the whole concept is pretty crude. Remote storage usually is being asked for by newbie users. Your hack is not very newbie-friendly imo.
Related thread: http://forum.coppermine-gallery.net/index.php?topic=33978.0
-
I'm uploading to photobucket because
a. It doesn't rename the filenames
b. It uses a folder like structure
I'm uploading the pictures first to my gallery not only to create the thumb_ and normal_ but also to add the pictures to the DB
I hope some talented PHP coder will develop my idea and create a mod, as I said with sockets....
R
Ariel