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: Problem showing pictures from a few catagories  (Read 4783 times)

0 Members and 1 Guest are viewing this topic.

madhatt

  • Coppermine novice
  • *
  • Country: 00
  • Offline Offline
  • Posts: 20
Problem showing pictures from a few catagories
« 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

Code: [Select]
<?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!?!

Code: [Select]
<?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/
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Problem showing pictures from a few catagories
« Reply #1 on: April 10, 2007, 03:10:47 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

Code: [Select]
<?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!?!

Code: [Select]
<?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
Logged
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

  • Coppermine novice
  • *
  • Country: 00
  • Offline Offline
  • Posts: 20
Re: Problem showing pictures from a few catagories
« Reply #2 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
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Problem showing pictures from a few catagories
« Reply #3 on: April 10, 2007, 05:31:23 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.

Logged
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

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Problem showing pictures from a few catagories
« Reply #4 on: April 10, 2007, 06:05:21 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.

Logged
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
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 16 queries.