first download lightbox
next upload lightbox to the same directory as the page displaying the cpmfetch images
next add these links to your page in the <head> area
<link rel="stylesheet" href="
lightbox_assets/css/lightbox.css" type="text/css" media="screen" />
<script src="l
ightbox_assets/js/prototype.js" type="text/javascript"></script>
<script src="l
ightbox_assets/js/scriptaculous.js?load=effects" type="text/javascript"></script>
<script src="
lightbox_assets/js/lightbox.js" type="text/javascript"></script>
Change
Bold to what ever your lighbox directory is called
Add this <body onload="initLightbox()"> as the body tag or at least this if you already have others there initLightbox()
Next add this to where you want cpmfetch to show - I this case we are showing random images with the Album Title below each image
<?php
include_once "./
gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./
gallery/cpmfetch/cpmfetch_config.php");
$options = array(
"subtitle" => "<center>{{aTitle}}</center",
"linktemplate"=>'
http://yourdomainname.com/gallery/albums/{{pFilepath}}{{pFilename}}"rel="lightbox"');
$objCpm->cpm_viewRandomMediaFrom("cat=partners:album=tours",1, 6, $options);
$objCpm->cpm_close();
?>
Bold = directory for your coppermine gallery
That's all it takes.
Have fun