restricting random images added in the past month restricting random images added in the past month
 

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]

Main Menu

restricting random images added in the past month

Started by Mr Tee, December 15, 2006, 08:14:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mr Tee

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

vuud

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

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

Mr Tee

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.


Mr Tee

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.

vuud

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
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

Mr Tee

 :) Well, that sounds fair enough. Many thanks. All good though.