coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: Thawane on November 05, 2008, 01:42:13 PM

Title: Last pictures not shown
Post by: Thawane on November 05, 2008, 01:42:13 PM
Hey! I finally got CPMFETCH to work! Or at least show. I have been looking for this forever, thank you vuud!
Anyways, I have now two problems.
1- The supposed last pictures shown aren't the last ones!! Here is my code:

<?php
  
include "./videos/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./videos/cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(1,2);
  
$objCpm->cpm_close();
?>

With this, I find myself with the 5th and 6th pictures (getting the 6th one first). I tried manipulating it so I tried this:

<?php
  
include "./videos/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./videos/cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(1,6);
  
$objCpm->cpm_close();
?>

And I get in last the first actual last picture.
Please help, I have been searching on the forum for the last hour!  ;D
Here is the link to my site: http://shakira-online.fr/index2.php (last pics shown at the bottom)
and the gallery: http://shakira-online.fr/videos/
There might be something but I don't get that muche of the PHP codes lol
Sorry if these questions were already asked!

PS: I have another question concerning img style but i see i have to open a new topic, i will open it later! :)

Thanks for those who will answer ^^
Title: Re: Last pictures not shown
Post by: Nibbler on November 05, 2008, 05:24:52 PM
Edit cpmfetch_dao.php and try changing


" ORDER BY p.ctime DESC LIMIT 0,$count";


to


" ORDER BY p.pid DESC LIMIT 0,$count";
Title: Re: Last pictures not shown
Post by: Thawane on November 06, 2008, 07:52:29 PM
It works, thank you!