forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: lurkalot on December 06, 2009, 01:09:06 pm

Title: Exluding a album from cpmFetch
Post by: lurkalot on December 06, 2009, 01:09:06 pm
Hi guys

On my site we run a image of the week.  I wanted to add a extra album to my gallery called "previous images of the week"  which is what I've done.

I use cpmFetch in a PHP block to pull all the latest images uploaded to my front page, code below,

Code: [Select]
echo '<div id="cpmfetch">';
chdir("../gallery/cpmfetch/");
include "cpmfetch.php";                   
$objCpm = new cpm();
$options = array("imageheight"=>"80","subtitle" => "<center>{{pTitle}} <br> <center> <FONT color=#1A5EFF size=2>Image By</FONT></STRONG>

{{pOwner_name}} <br>{{pHits}} Views <center> <FONT color=#3399FF size=2>Comments</FONT></STRONG> {{pComCount}} </center>");
$objCpm->cpm_viewLastAddedMedia(3,4,$options);
$objCpm->cpm_close();
chdir("../../");
echo '<a href="http://cameracraniums.com/gallery?action=gallery">View more latest images</a>';
echo '</div>';

My question is.  How do I exclude this album from cpmFetch?  When I moved these pics to the newly created "previous images of the week" album I don't want cpmFetch to grab them.  Can anyone guide me through this please.

My site www.cameracraniums.com  other info in my sig.
Title: Re: Exluding a album from cpmFetch
Post by: Moonraid on December 06, 2009, 06:31:42 pm
This is what I did to mine and it only pulls from what albums i picked

Code: [Select]
$objCpm->cpm_viewLastAddedMedia(3,4,$options);
update to this

Code: [Select]
$objCpm->cpm_viewLastAddedMedia("cat=1"3,4,$options);
now mine is just pullin from the first catagory but you can set it to pull from whatever catagory you want. IE: "cat=1,5,6,20" should pull from catagories 1, 5, 6, and 20 only.
Title: Re: Exluding a album from cpmFetch
Post by: lurkalot on December 06, 2009, 07:17:58 pm
This is what I did to mine and it only pulls from what albums i picked

Code: [Select]
$objCpm->cpm_viewLastAddedMedia(3,4,$options);
update to this

Code: [Select]
$objCpm->cpm_viewLastAddedMedia("cat=1"3,4,$options);
now mine is just pullin from the first catagory but you can set it to pull from whatever catagory you want. IE: "cat=1,5,6,20" should pull from catagories 1, 5, 6, and 20 only.

Thanks for the help. 

Trouble is I have 3 other albums in the same category.  The only way I'd get this to work is to add my album to bew category, and exclude it from the code you gave me. 

I'll copy that code though, it might come in handy. ;)

Cheers.
Title: Re: Exluding a album from cpmFetch
Post by: Moonraid on December 06, 2009, 07:55:31 pm
woops.. mybad..... use "alb" instead of "cat". just make sure ya imput the album number so it can find it.