forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: amissner on August 23, 2005, 01:44:22 am

Title: Move originals to another server, leave thumbs and normals
Post by: amissner on August 23, 2005, 01:44:22 am
Hi, I have checked the forums and everywhere else for the solution to my problem with no luck.

What I would like to do is move my originals to another server, but leave the thumbs and normals.  When a user clicks the thumb it will load the normal, when they click the normal it will load the original from my other server (e.g. dynamically change the URL to point to another web server).  My original idea was to directly modify the database, but I see now that is not going to work.  I was hoping there would be a published mod or hack to move the originals, but I don't see any.  I would be willing to modify the php, but I have looked and cannot find the nugget of code where the originals get loaded.

Thanks in advance.

Adam Missner
http://missner.com/img (kinda lame right now, but...)
Title: Re: Move originals to another server, leave thumbs and normals
Post by: Joachim Müller on August 23, 2005, 09:47:16 am
has been asked a thousand times already. Storing coppermine content on remote servers is not supported, and there's no actual hack to do so. The coppermine devs won't do this, although it's possible (in theory). Search the board to find out more.
Title: Re: Move originals to another server, leave thumbs and normals
Post by: amissner on August 23, 2005, 07:19:54 pm
Here's how I did it.  I changed

$pic_url = get_pic_url($row, 'fullsize');

to

$pic_url = 'http://xyz.com/' . get_pic_url($row, 'fullsize');

in include\themes.inc.php

That accomplished what I wanted to do, that is display the original from an alternate server.  Obviously the path must be identical on the alternate server.

Title: Re: Move originals to another server, leave thumbs and normals
Post by: Tranz on August 23, 2005, 11:21:24 pm
I think include/themes.inc.php is specific to cpg 1.4 and this is the 1.3 board...
Title: Re: Move originals to another server, leave thumbs and normals
Post by: amissner on August 24, 2005, 03:24:50 pm
Wow.  Sorry, it never even occured to me.  I stuck 1.4 on there for another reason...