Problem showing pictures from a few catagories Problem showing pictures from a few catagories
 

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

Problem showing pictures from a few catagories

Started by madhatt, April 10, 2007, 02:35:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

madhatt

Ok,

I have a issue where I want to use cpmfetch to grab all pics in a catagory called "outdoor pics" this is cat. 22

I want to show only pictures from this catagory. so I used the following code

<?php
  
include "../gallery/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewRandomMediaFrom("cat=22",5,1);
  
$objCpm->cpm_close();
?>


This does not work, for some reason it will not pull the pictures from this gallery and just leads to a empty page.

THE ODD THING.

if I use the exact same code but replace cat. 22 with another number like 3 it works just find!?!

<?php
  
include "../gallery/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewRandomMediaFrom("cat=3",5,1);
  
$objCpm->cpm_close();
?>


Can anyone help me with this?

My site is www.madhatt.com
gallery located at www.madhatt.com/gallery/

vuud

Quote from: madhatt on April 10, 2007, 02:35:27 AM
Ok,

I have a issue where I want to use cpmfetch to grab all pics in a catagory called "outdoor pics" this is cat. 22

I want to show only pictures from this catagory. so I used the following code

<?php
  
include "../gallery/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewRandomMediaFrom("cat=22",5,1);
  
$objCpm->cpm_close();
?>


This does not work, for some reason it will not pull the pictures from this gallery and just leads to a empty page.

THE ODD THING.

if I use the exact same code but replace cat. 22 with another number like 3 it works just find!?!

<?php
  
include "../gallery/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewRandomMediaFrom("cat=3",5,1);
  
$objCpm->cpm_close();
?>


Can anyone help me with this?

My site is www.madhatt.com
gallery located at www.madhatt.com/gallery/


I suspect it is because you have categories inside that category.  So technically, you have no images that match 22 for a category.

I get photos, then link them to an album, then link that to a category I believe.

You would have to specific the sub categories specifically...

"cat=2,3,4,5,6,7"

I am not sure how I would even fix the multiple category scenario...  But I will add it to my list
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

madhatt

That worked just fine, thanks a ton.

I have another question.  it would be nice if I could configure cpmfetch to have the shadow boxes like the rest of the pics on my site that are pulled from coppermine.


Thank you so much for your help

vuud

Quote from: madhatt on April 10, 2007, 05:14:12 AM
I have another question.  it would be nice if I could configure cpmfetch to have the shadow boxes like the rest of the pics on my site that are pulled from coppermine.

That's not a question.  Its a statement.

But anyway, yes it would be nice.  However, probably will not happen with cpmfetch directly.  Isn't there a way to do that without building a whole table around it?

I have to belive that there is a way to do it...  If there is, you could set a CSS tag to the cpmfetch call for the TD. 

Anyway, if you are dead set on it, you can extend CpmFetch yourself... get back a lovely array of photos, then code up the whole thing around it.  If you are decent with PHP, it should be trivial. 

You want to set the resulttype to be a resultset

then do a print_r on the array you get back to get an idea of what is in there.

After that it should be easy to do.

It is a cool effect.

Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

vuud

Quote from: madhatt on April 10, 2007, 05:14:12 AM
That worked just fine, thanks a ton.

I have another question.  it would be nice if I could configure cpmfetch to have the shadow boxes like the rest of the pics on my site that are pulled from coppermine.


Thank you so much for your help

This page:
http://cpmfetch.fistfullofcode.com/features/index.php

Has an example of the resultset data at the bottom.

Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco