Is it possible to include external pictures in Coppermine 1.1D for PHPnuke?
The pictures have the right sizes and names (thumb_ & normal_ ).
example
* the site with phpnuke is on phpnuke.org
* the pictures are on pictures.org
Or is it possible to change something in one of the files of database?
Try this maybe it works:
if you edit the cpg_pictures table in the database yourself.
In the filepath place the URL
In the filename place the image
and insert the rest of the info
I've tried, but I get a red cross instead of a picture.
Maybe it's an new feature for a new version? External pictures?
Ok we take this as feature request
[edit I thought you were talking about vers. 1.2 (missed the topic name) so this code from functions.inc.php may or may not work for you]
This I think is a feature in the standalone that was not included in coppermine for nuke because of inconsistancies. If all your gallery images are hosted on the same other server you could try editing line 1106
// Return the url for a picture, allows to have pictures spreaded over multiple servers
function get_pic_url(&$pic_row, $mode)
{
global $CONFIG;
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'],
);
}
return path2url('http://otherdomain.tld/'.$pic_row['filepath']. $pic_prefix[$mode]. $pic_row['filename']);//line 1106
}
This has not been tested but try it...
I've made a change in functions.inc.php.
If you change the 'filepath' in cpg_pictures
and make a absolut filepath to pictures on an other site.
Example
filepath:
(1) modules/modules/coppermine/albums/userpics/
(2) file://c:/windows/desktop/fotos/
filename:
(1) test.jpg
(2) othersite.jpg
On this way you can also keep pictures on your 'own' site
Remark! The pictures on external host must have the right prefix
(thumb & normal)
if you have questions mail me
bartbh at hotmail dot com
functions.inc.php
function get_pic_url(&$pic_row, $mode)
{
global $CONFIG;
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'],
);
}
// return path2url($pic_row['filepath']. $pic_prefix[$mode]. $pic_row['filename']); //orginal code
return ($pic_row['filepath']. $pic_prefix[$mode]. $pic_row['filename']);
}
?>