Support > cpg1.5 plugins
CPMFetch - problems fetching other lists.
(1/1)
Dankriss:
Hi guys
I have installed and got it working on a test site but I can only pull latest images... I have added other commands but it is not pulling them...
--- Code: ---<?php
include_once "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("./cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewLastUpdatedAlbumsFrom(1, 4, $options);
$objCpm->cpm_viewLastCommentedImages(1, 4, $options);
$objCpm->cpm_viewLastAddedMedia(1, 4, $options);
$objCpm->cpm_viewRandomMediaFrom("cat=1",1, 4, $options);
$objCpm->cpm_close();
?>
--- End code ---
And here is a link to the test site... http://nikmania.me.uk/copperminetest/welcome.php
This is my first time using PHP as well... good with html and css not so good with PHP.. :D
Kriss :)
Αndré:
--- Quote from: Dankriss on July 16, 2016, 09:14:39 pm ---$objCpm->cpm_viewLastUpdatedAlbumsFrom(1, 4, $options);
--- End quote ---
It doesn't work, as you haven't provided all required parameters:
--- Code: ---function cpm_viewLastUpdatedAlbumsFrom($source, $rows, $columns, $options="") {
--- End code ---
It needs to be something like
--- Code: ---$objCpm->cpm_viewLastUpdatedAlbumsFrom("cat=2", 1, 4, $options);
--- End code ---
--- Quote from: Dankriss on July 16, 2016, 09:14:39 pm ---$objCpm->cpm_viewLastCommentedImages(1, 4, $options);
$objCpm->cpm_viewRandomMediaFrom("cat=1",1, 4, $options);
--- End quote ---
You have no comments in your gallery and also category "1" (which is the ID of the user galleries category) doesn't contain any images. So what exactly should be displayed?
Dankriss:
Ok so I needed to tell it what catergory to take from...thank you.... comments and last viewed were in there already from the copy and paste I did from the help page.
Thanks I will now go and play with it...sorry for being so stupid... :)
Kriss :)
Navigation
[0] Message Index
Go to full version