coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: skidpics on December 22, 2007, 06:05:11 AM

Title: intermediate image displays syntax
Post by: skidpics on December 22, 2007, 06:05:11 AM
I am having trouble understanding the exact syntax of coding to use for the intermediate image display..

Currently, I am thinking this:

  $objCpm->cpm_viewLastAddedMedia(1,1.[array $options = "imagesize" => 'int']);

But this does nothing.  There is not clear cut example that I can find on how to apply the $options to this?

Can someone post an example?



Title: Re: intermediate image displays syntax
Post by: Steve-R on January 21, 2008, 06:07:07 PM
Here's an example that I hope helps.



<?php
  
include_once "./cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./cpmfetch/cpmfetch_config.php");
  
$options = array("subtitle" => "{{pOwner_name}},",
                
"imagesize" => "thumb");
  
$objCpm->cpm_viewTopRatedMediaFrom ("cat=1",1,100,$options);
  
$objCpm->cpm_close();
?>



Although $options does appear in the line you have posted, it also needs to be on another line where you can then specify imagesize and it will work, as the above script does for me.

Good luck, and dont forget to mention here if this solves your problem as it helps others.

Steve...:)