coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: Mr Tee on December 15, 2006, 08:14:44 AM

Title: restricting random images added in the past month
Post by: Mr Tee on December 15, 2006, 08:14:44 AM
Can I restrict the random imagaes shown to the past 30 days, rather than a random selection from the entire gallery? I Have this at the moment

include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewRandomMedia  (1,4,$styleguide);
$objCpm->cpm_close();


I have looked around but can't find what to add to it to do this.

Thanks
Title: Re: restricting random images added in the past month
Post by: vuud on December 15, 2006, 05:09:56 PM
Quote from: Mr Tee on December 15, 2006, 08:14:44 AM
Can I restrict the random imagaes shown to the past 30 days, rather than a random selection from the entire gallery? I Have this at the moment

include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewRandomMedia  (1,4,$styleguide);
$objCpm->cpm_close();


I have looked around but can't find what to add to it to do this.

Thanks

No, currently there is nothing to set a "within x days" to return the images.

There is a function that will return a list of categories and albums updated in the last x days, but not the same.

ViewLastAddedMedia will start with the newest and go back, so while not specific to a date range, does show the newest

Title: Re: restricting random images added in the past month
Post by: Mr Tee on December 15, 2006, 05:17:17 PM
OK, thanks for that. I already have a series of images showing via ViewLastAddedMedia. However, it seems the members of my site find it quite refreshing to see images added a year ago that they had forgotten, so maybe I will leave it alone.  :)

I have only just started to use cpmfetch, should have added it a long time ago. Thanks for the time and effort you have given to it.

Title: Re: restricting random images added in the past month
Post by: Mr Tee on December 15, 2006, 05:49:39 PM
Is there any way yet of adding the ammount of comments an image has received under each image? %n or%C only seems to work for total comments in an album.
Title: Re: restricting random images added in the past month
Post by: vuud on December 15, 2006, 07:43:17 PM
Quote from: Mr Tee on December 15, 2006, 05:49:39 PM
Is there any way yet of adding the ammount of comments an image has received under each image? %n or%C only seems to work for total comments in an album.

No
Title: Re: restricting random images added in the past month
Post by: Mr Tee on December 15, 2006, 07:59:08 PM
 :) Well, that sounds fair enough. Many thanks. All good though.