Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Exluding a album from cpmFetch  (Read 4698 times)

0 Members and 1 Guest are viewing this topic.

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.
Exluding a album from cpmFetch
« 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.
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Moonraid

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Exluding a album from cpmFetch
« Reply #1 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.
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.
Re: Exluding a album from cpmFetch
« Reply #2 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.
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Moonraid

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Exluding a album from cpmFetch
« Reply #3 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.