coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: farmerjeffe on March 07, 2007, 01:31:09 AM

Title: windowtarget problems
Post by: farmerjeffe on March 07, 2007, 01:31:09 AM
this is my code for my "updates" for my website for the gallery so far:

<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$options = array( "windowtarget" => "_blank" );
$objCpm->cpm_viewLastAddedMediaFrom 14$source "cat=8,12:album=19,21,26,25" );
$objCpm->cpm_close();
?>


I have followed the instructions but the picture links still open in the parent target!?!?
Title: Re: windowtarget problems
Post by: Nibbler on March 07, 2007, 01:41:58 AM
You have to actually give it the options...


$objCpm->cpm_viewLastAddedMediaFrom ( 1, 4, "cat=8,12:album=19,21,26,25", $options);
Title: Re: windowtarget problems
Post by: vuud on March 07, 2007, 01:42:24 AM
Quote from: farmerjeffe on March 07, 2007, 01:31:09 AM
this is my code for my "updates" for my website for the gallery so far:

<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$options = array( "windowtarget" => "_blank" );
$objCpm->cpm_viewLastAddedMediaFrom 14$source "cat=8,12:album=19,21,26,25" );
$objCpm->cpm_close();
?>


I have followed the instructions but the picture links still open in the parent target!?!?


You defined the options correctly... you just did nothing with it after that.

The $options array has to be passed as a parameter into the functions you are using it with
Title: Re: windowtarget problems
Post by: farmerjeffe on March 07, 2007, 01:44:41 AM
Ah thanks you two!!

I have one last question. I have been kicking myself trying to figure out how the hell to show when it was uploaded and who by underneath  each image but i just cant figure it out!

I promise i have read the Docs in the download AND on the fistfullofcodes site!!

Gah sorry

appreciate it if you could hlep. Sorry.
Title: Re: windowtarget problems
Post by: vuud on March 07, 2007, 01:46:40 AM
Quote from: farmerjeffe on March 07, 2007, 01:44:41 AM
Ah thanks you two!!

I have one last question. I have been kicking myself trying to figure out how the hell to show when it was uploaded and who by underneath  each image but i just cant figure it out!

I promise i have read the Docs in the download AND on the fistfullofcodes site!!

Gah sorry

appreciate it if you could hlep. Sorry.

Ah you promise you read the docs...

and yet...

http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s03.html

Title: Re: windowtarget problems
Post by: farmerjeffe on March 07, 2007, 01:47:48 AM
I read that, got confused. Im not lying. Yet i just spotted that the information goes in the options array! I was pondering over where to write the code!!!

Thanks!!
Title: Re: windowtarget problems
Post by: farmerjeffe on March 07, 2007, 01:51:47 AM
Ok so im practising what comes up by just typing in %d and seein gif it shows the album description and i get an error, heres my code:

<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$options = array( "windowtarget" => "_blank" "subtitle" => "%d" );
$objCpm->cpm_viewLastAddedMediaFrom 14$options$source "cat=8,12:album=19,21,26,25" );
$objCpm->cpm_close();
?>


What am i doing wrong?

thanks

adam
Title: Re: windowtarget problems
Post by: Nibbler on March 07, 2007, 01:52:36 AM
Wrong way round I think

$objCpm->cpm_viewLastAddedMediaFrom ( 1, 4, "cat=8,12:album=19,21,26,25", $options);
Title: Re: windowtarget problems
Post by: farmerjeffe on March 07, 2007, 01:58:02 AM
I just tryed that but still has the same error and this is my code now:

<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$options = array( "windowtarget" => "_blank" "subtitle" => "%d" );
$objCpm->cpm_viewLastAddedMediaFrom 14"cat=8,12:album=19,21,26,25"$options);
$objCpm->cpm_close();
?>
Title: Re: windowtarget problems
Post by: farmerjeffe on March 07, 2007, 02:16:47 AM
Hey i just figure dout what was wrong! was missing a comma to seperate the options!


thanks for you help guys!!

adam
Title: Re: windowtarget problems
Post by: vuud on March 07, 2007, 02:26:11 AM
Quote from: farmerjeffe on March 07, 2007, 02:16:47 AM
Hey i just figure dout what was wrong! was missing a comma to seperate the options!


thanks for you help guys!!

adam

Good. 

You need to work on posting as a knee jerk reaction...   If you get an error try to work it out first.

Regards,

Vuud
Title: Re: windowtarget problems
Post by: farmerjeffe on March 07, 2007, 02:27:10 AM
Yeh sorry! my bad! Is there a way of making the subtitles closer to the the images!? cause there pretty far down underneath!
Title: Re: windowtarget problems
Post by: farmerjeffe on March 07, 2007, 02:32:21 AM
and lastly (last thing i promise) i cant seem to find how to show the text so it has a property on each line

E.G.

My video
Posted by Adam
March 07
Title: Re: windowtarget problems
Post by: vuud on March 07, 2007, 02:32:39 AM
Quote from: farmerjeffe on March 07, 2007, 02:27:10 AM
Yeh sorry! my bad! Is there a way of making the subtitles closer to the the images!? cause there pretty far down underneath!

Post your code and a link to it happening.  They should not be that far down.
Title: Re: windowtarget problems
Post by: vuud on March 07, 2007, 02:33:34 AM
Quote from: farmerjeffe on March 07, 2007, 02:32:21 AM
and lastly (last thing i promise) i cant seem to find how to show the text so it has a property on each line

E.G.

My video
Posted by Adam
March 07

You are going to be the inspiration for rate / limiting connections to SMF

Insert <BR /> tags...  It just outputs HTML
Title: Re: windowtarget problems
Post by: farmerjeffe on March 07, 2007, 02:37:09 AM
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$options = array( "windowtarget" => "_blank""subtitle" => " %a <br> %w " );
$objCpm->cpm_viewLastAddedMediaFrom 14"cat=8,12:album=19,21,26,25"$options);
$objCpm->cpm_close();
?>



that is my code.
Title: Re: windowtarget problems
Post by: vuud on March 07, 2007, 02:49:26 AM
Quote from: farmerjeffe on March 07, 2007, 02:37:09 AM
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$options = array( "windowtarget" => "_blank""subtitle" => " %a <br> %w " );
$objCpm->cpm_viewLastAddedMediaFrom 14"cat=8,12:album=19,21,26,25"$options);
$objCpm->cpm_close();
?>



that is my code.


Nothing looks weird there.  Without a screenshot or a link though, I can't tell you if what you are seeing is normal.

Title: Re: windowtarget problems
Post by: farmerjeffe on March 07, 2007, 02:51:05 AM
Well it has one line of texts spacing between the image and the text??
Title: Re: windowtarget problems
Post by: vuud on March 07, 2007, 03:00:28 AM
Quote from: farmerjeffe on March 07, 2007, 02:51:05 AM
Well it has one line of texts spacing between the image and the text??

It adds a <BR> to the img tag... Not sure if it does more than one though.  Does your HTML source show anything strange like that?