coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: Team Aero-K on October 16, 2007, 05:02:56 AM

Title: not understanding the option array thing...
Post by: Team Aero-K on October 16, 2007, 05:02:56 AM
call me a n00b, but i'm not understanding how you would open the pictures in a new window using option array?

my code is this...
<?php
  
include "./cpg1413/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./cpg1413/cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewRandomMedia(1,5);
  
$objCpm->cpm_close();
?>


how do i play with the option array to get it to open in a _blank window? i've read the docs, but dont understand how to do it.
Title: Re: not understanding the option array thing...
Post by: Team Aero-K on October 16, 2007, 05:20:34 AM
tried this...still opened in same window...

<?php
  
include "./cpg1413/cpmfetch/cpmfetch.php";
  
$options = array( 'windowtarget' => '_blank' );
  
$objCpm = new cpm("./cpg1413/cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewRandomMedia(1,5);
  
$objCpm->cpm_close();
?>


from my understanding of the docs...it should be like this?

(sorry about half-assed asking for help above, and in previous post...just readyour rant, lol)
Title: Re: not understanding the option array thing...
Post by: Team Aero-K on October 16, 2007, 05:26:49 AM
<?php
  
include "./cpg1413/cpmfetch/cpmfetch.php";
  
$options = array( 'windowtarget' => '_blank' );
  
$objCpm = new cpm("./cpg1413/cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewRandomMediaFrom("",1,5,$options);
  
$objCpm->cpm_close();
?>


solved...sorry for the wasted thread!  ;D