Pulling from wrong category? (Tell me my code is wrong!) Pulling from wrong category? (Tell me my code is wrong!)
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Pulling from wrong category? (Tell me my code is wrong!)

Started by troykristoffer, April 04, 2007, 02:26:09 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

troykristoffer

Okay...so... I have this code working on this page: http://www.pinkjams.com/joomlatest/index-test.php
<?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.

vuud

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