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: Pulling from wrong category? (Tell me my code is wrong!)  (Read 4016 times)

0 Members and 1 Guest are viewing this topic.

troykristoffer

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Pulling from wrong category? (Tell me my code is wrong!)
« on: April 04, 2007, 02:26:09 am »

Okay...so... I have this code working on this page: http://www.pinkjams.com/joomlatest/index-test.php
Code: [Select]
<?php
  
include "../multimedia/video/cpmfetch2/cpmfetch.php";
  
$objCpm = new cpm("../multimedia/video/cpmfetch2/cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(3,1"cat=10");
  
$objCpm->cpm_close();
?>

As you can see, I only want videos from Category 10 showing up. From the documentation I can find, (I am using version 1.9.12 of cpmfetch, but the links on the website for the documentation of that version is broken, and I'm reading old documentation that is included with the download.) it says I did it correctly. But if you look the top two thumbnails, which are yellow speakers are for audio files which are in category 11. (a quick look-see at the file and you can see that.)

Can you tell me what I'm doing wrong?

Keep in mind, that while I'm not completely ignorant, I'm not really a coder. It's like if I went to spain. I could understand about 1 word in every 100, but I wouldn't be able to survive. Hehe.
« Last Edit: April 06, 2007, 06:58:49 pm by vuud »
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Pulling from wrong category? (Tell me my code is wrong!)
« Reply #1 on: April 04, 2007, 04:47:25 am »

Okay...so... I have this code working on this page: http://www.pinkjams.com/joomlatest/index-test.php
Code: [Select]
<?php
  
include "../multimedia/video/cpmfetch2/cpmfetch.php";
  
$objCpm = new cpm("../multimedia/video/cpmfetch2/cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(3,1"cat=10");
  
$objCpm->cpm_close();
?>

As you can see, I only want videos from Category 10 showing up. From the documentation I can find, (I am using version 1.9.12 of cpmfetch, but the links on the website for the documentation of that version is broken, and I'm reading old documentation that is included with the download.) it says I did it correctly.

Neither the old documenation, nor the new one shows that function call as accepting a source parameter like you did there.

Quote
But if you look the top two thumbnails, which are yellow speakers are for audio files which are in category 11. (a quick look-see at the file and you can see that.)

Can you tell me what I'm doing wrong?

You probably want this function:
$objCpm->cpm_viewLastAddedMediaFrom("cat=10",3,1);

Quote
Keep in mind, that while I'm not completely ignorant, I'm not really a coder. It's like if I went to spain. I could understand about 1 word in every 100, but I wouldn't be able to survive. Hehe.

Yeah, the doc's are in a strange place right now... for functions I would definately look at the new docs... the old docs have a bit more explaining in them.  I am working on the new ones a bit each day, so hopefully...

Hope this helps you
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

troykristoffer

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Pulling from wrong category? (Tell me my code is wrong!)
« Reply #2 on: April 06, 2007, 12:51:22 am »

Worked like a charm! Thanks! :)
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 16 queries.