Project / Support Center
Welcome, Guest. Please login or register. December 06, 2022, 12:46: AM
Home Help Search Login Register
D-Web Web Site Creator D - Web Web Site Creator On-line HTML Editor No Programming knowledge required. Web Global Net PayPal-Cart Shopping Cart System PayPal - Kart Shopping Cart System for E-Commerce over the internet, that's easy to use. Web Global Net Newsletter Manager Newsletter Manager On-line Newsletter Creator with Email Subscriber Management.
Ring Central Discount
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  Open Source Topics  |  Coppermine Photo Gallery  |  Topic: cpg1.4 cpmFetch adding Album Title under images - Random Image Display 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Send this topic Print
Author Topic: cpg1.4 cpmFetch adding Album Title under images - Random Image Display  (Read 15882 times)
admin
Guest
« 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();
?>
Report to moderator   Logged
Pages: [1] Go Up Send this topic Print 
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  Open Source Topics  |  Coppermine Photo Gallery  |  Topic: cpg1.4 cpmFetch adding Album Title under images - Random Image Display « previous next »
Jump to:  


Login with username, password and session length
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!