coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: nette on March 08, 2008, 03:54:37 AM

Title: [Solved]: Trouble with array for including description
Post by: nette on March 08, 2008, 03:54:37 AM
I really love cpmfetch but I am having trouble with modifying the code because I would like to include the description. I have read the cpmfetch documentation manual section on arrays and trying to find an example here on the boards so I did try the solve the problem on my own for 2 days now but I am just not getting it. Here is my code

<?php
include_once "./mediavault/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./mediavault/cpmfetch/cpmfetch_config.php");
$options = array("subtitle" => "File name : {{pFilename}}");
<?php
  include_once "./mediavault/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("./mediavault/cpmfetch/cpmfetch_config.php");
  $options = array("subtitle" => "File name : {{pFilename}}");
$string = $objCpm->createDescription(6, 1, $options, $picDesc);
   $objCpm->cpm_viewRandomMediaFrom(1, 1, $picDesc);
  $objCpm->cpm_viewLastAddedMedia(6, 1, $options, $picDesc);
  $objCpm->cpm_close();
?>

All i want to do is include a description. Thanks for your help
Title: Re: Trouble with array for including description
Post by: nette on March 08, 2008, 04:45:39 AM
nevermind i just figured it out!
Title: Re: Trouble with array for including description
Post by: Joachim Müller on March 09, 2008, 02:13:32 PM
For the benefit of others with similar issues you should post what you actually did to solve your issues. That's the point of a support board...
Title: Re: [Solved]: Trouble with array for including description
Post by: nette on March 09, 2008, 07:47:56 PM
Well I guess my quest to get support without stepping on any toes failed. Quite impossible to do that on this board but anywho here is my code


<?php include_once "./???/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./???/cpmfetch/cpmfetch_config.php");
$options = array('subtitle' => '{{aTitle}} {{aDescription}} 
Downloads: {{pHits}}' 
,
'imagewidth' => '' 'imageheight' => '' 'subtitlelink' => '' 'linkstyle' => 'li' 

'imagestyle' => 'imagestyle' 'alttag' => '{{aTitle}}: {{pTitle}}');
$objCpm->cpm_viewLastAddedMedia(61$options$picDesc);
$objCpm->cpm_close(); 
?>