Title: cpg1.4 cpmFetch adding Album Title under images - Random Image Display Post by: admin on January 11, 2009, 12:42: PM The cpg1.4 cpmFetch support forum is awful and the documentation although extensive is very technically oriented. (My gripe)
But here is the code you need in order to have the Album Title show where ever you have the cpg Fetch code in your pages - this is for Random image display: <?php include_once "./gallery/cpmfetch/cpmfetch.php"; $objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php"); $options = array("subtitle" => "<center>{{aTitle}}</center"); $objCpm->cpm_viewRandomMediaFrom("cat=partners:album=tours",1, 6, $options); $objCpm->cpm_close(); ?> Change the bold text to the directory that your Coppermine album is located This will add the Category and the Album names to random image display: <?php include_once "./gallery/cpmfetch/cpmfetch.php"; $objCpm = new cpm('./gallery/cpmfetch/cpmfetch_config.php'); $options = array( 'windowtarget' => '_blank'); $options = array("subtitle" => "<center> {{cName}}: {{aTitle}}</center>", ); $objCpm->cpm_viewRandomMediaFrom("cat=partners:album=tours",1, 6, $options); $objCpm->cpm_close(); ?> |