forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: The_blue on August 26, 2009, 05:33:39 pm

Title: I can't figure out how to make thumbs open in a new window
Post by: The_blue on August 26, 2009, 05:33:39 pm
My clubs web page:- http://www.theblue.plus.com/index.html

As you can see i'm useless at designing :)

I've learn't what bit i know through trying and trying again. My 1st mistake was using frontpage...


I've discovered cpmfetch and it's just what i needed :) My problem was intagrating it into the old site. I've added a frame and made a basic php page to load the tumbs on.

My problem is that when a thumb is clicked it loads the coppermine site but its wedged in the small frame :(

Can fetch be made to open a new window? I can't figure out the mannual, i just don't get php (yet) :)

Thanks in advance.
Title: Re: I can't figure out how to make thumbs open in a new window
Post by: Nibbler on August 26, 2009, 05:58:40 pm
Post your code. You need to set a target parameter. Better yet, stop using frames.
Title: Re: I can't figure out how to make thumbs open in a new window
Post by: The_blue on August 26, 2009, 06:18:02 pm
Post your code. You need to set a target parameter. Better yet, stop using frames.

<body background="bluwater.jpg">

<font size="4" face="Georgia">Random pictures from the 2nd Annual? CSAC BBQ.
</font>
<?php
  include_once "./cpmfetch.php";
  $objCpm = new cpm("./cpmfetch_config.php");
   // $options = array("subtitle" => "File name : {{pFilename}}");
  $objCpm->cpm_viewRandomMediaFrom("album=35",2, 4, $options);
  $objCpm->cpm_close();
Title: Re: I can't figure out how to make thumbs open in a new window
Post by: Nibbler on August 26, 2009, 06:25:52 pm
Set the windowtarget option, like this:

Code: [Select]
<?php
  
include_once "./cpmfetch.php";
  
$objCpm = new cpm("./cpmfetch_config.php");
   
// $options = array("subtitle" => "File name : {{pFilename}}");
  
$options = array('windowtarget' => '_parent');
  
$objCpm->cpm_viewRandomMediaFrom("album=35",24$options);
  
$objCpm->cpm_close(); 
Title: Re: I can't figure out how to make thumbs open in a new window
Post by: The_blue on August 26, 2009, 06:39:56 pm
Thanks!  :D
Title: Re: I can't figure out how to make thumbs open in a new window
Post by: jessalken on April 10, 2013, 08:23:28 pm
Hi! I'm having the same issue - sorry I'm not brilliant with code, but I thought this would do it? Please help!

<?php
  include "../gallery/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("../gallery/cpmfetch/cpmfetch_config.php");
  $options = array('windowtarget' => '_parent');
  $objCpm->cpm_viewLastAddedMedia(2,3);
  $objCpm->cpm_close();
?>