coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: mbu10 on April 18, 2006, 01:30:55 AM

Title: my pictures on another server(was doing it in 1.3.2)
Post by: mbu10 on April 18, 2006, 01:30:55 AM
well i was running 1.3.2 and decided to do a upgrade to newest one
anyway i used to run a modified code in the function.php so that all the pictures were stored on my other web server(but no php support)
but have massive bandwidth
looking to get this config back in could some one help me
i tried swopping the functions file over but that did not work
thanks

saw this in the code looks like could be changed any way how

// Return the url for a picture, allows to have pictures spreaded over multiple servers

/**
* get_pic_url()
*
* Return the url for a picture
*
* @param array $pic_row
* @param string $mode
* @param boolean $system_pic
* @return string
**/

function& get_pic_url(&$pic_row, $mode,$system_pic = false)
{
        global $CONFIG,$THEME_DIR;

        static $pic_prefix = array();
        static $url_prefix = array();

        if (!count($pic_prefix)) {
                $pic_prefix = array(
                        'thumb' => $CONFIG['thumb_pfx'],
                        'normal' => $CONFIG['normal_pfx'],
                        'fullsize' => ''
                );

                $url_prefix = array(
                        0 => $CONFIG['fullpath'],
                );
        }

        $mime_content = cpg_get_type($pic_row['filename']);
        $pic_row = array_merge($pic_row,$mime_content);

        $filepathname = null;
Title: Re: my pictures on another server(was doing it in 1.3.2)
Post by: mbu10 on April 18, 2006, 02:22:29 AM
well i have manged to alter the code so that ,my full size pictures are on another server and my thumbnails are as well
but have not manged to figure out yet how to move the normal ones
bit of help on this last bit would be good
thanks
Title: Re: my pictures on another server(was doing it in 1.3.2)
Post by: arthurn on April 20, 2006, 12:52:00 AM
That would be great for me too! Can you tell me how you did that?
thanks.
Title: Re: my pictures on another server(was doing it in 1.3.2)
Post by: Joachim Müller on April 20, 2006, 06:15:00 AM
stop cross-posting (http://forum.coppermine-gallery.net/index.php?topic=29568.0)