I already have Coppermine 1.4.4 installed and CPMFetch installed and working inside our phpBB2 forum - we have a random thumbnail show up in the left nav of the forum.
Now, I'm looking to put a random image on our index.html. I was hoping I could simply use the same/similar commands as in our phpBB2 integration but those don't work. There is something going on w/ the path, or with PHP, or something.
So, I have a get-image.php file (which I will later include in the index.html page).
The code of this file is simply:
<?php
include "/photos/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/photos");
$options = array("subtitle" => "File name : {{pFilename}}", "imagesize" => "int", "imagelink" => "int" );
$objCpm->cpm_viewLastAddedMedia(1, 4, $options);
$objCpm->cpm_viewRandomMediaFrom("album=1,3",1, 1, $options);
$objCpm->cpm_close();
?>
I get this error:
Warning: main(/photos/cpmfetch/cpmfetch.php) [function.main]: failed to open stream: No such file or directory in /home/eproxim/public_html/get-image.php on line 2
I've also tried using a period in front of the path, and that gives me another, different error.
ERROR: Path to Coppermine incorrect. (/home/eproxim/public_html./photos//include/config.inc.php)
Fatal error: Call to a member function on a non-object in /home/eproxim/public_html/photos/cpmfetch/cpmfetch.php on line 532
So, I don't know what's going on, and I don't have time to troubleshoot this. Please shoot me an email if someone can fix and please provide a quote/estimate, thanks! ttanaka at gmail dot com.
Regards,
Tyson