Exluding a album from cpmFetch Exluding a album from cpmFetch
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Exluding a album from cpmFetch

Started by lurkalot, December 06, 2009, 01:09:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lurkalot

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,


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.
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Moonraid

This is what I did to mine and it only pulls from what albums i picked

$objCpm->cpm_viewLastAddedMedia(3,4,$options);

update to this

$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.

lurkalot

Quote from: 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

$objCpm->cpm_viewLastAddedMedia(3,4,$options);

update to this

$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.
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Moonraid

woops.. mybad..... use "alb" instead of "cat". just make sure ya imput the album number so it can find it.