Advanced search  

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]

Pages: [1]   Go Down

Author Topic: restricting random images added in the past month  (Read 5236 times)

0 Members and 1 Guest are viewing this topic.

Mr Tee

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 70
    • The Studio Online
restricting random images added in the past month
« 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

Code: [Select]
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
« Last Edit: December 16, 2006, 09:49:03 am by GauGau »
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: restricting random images added in the past month
« Reply #1 on: December 15, 2006, 05:09:56 pm »

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

Code: [Select]
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

Logged
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

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 70
    • The Studio Online
Re: restricting random images added in the past month
« Reply #2 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.

Logged

Mr Tee

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 70
    • The Studio Online
Re: restricting random images added in the past month
« Reply #3 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.
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: restricting random images added in the past month
« Reply #4 on: December 15, 2006, 07:43:17 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
Logged
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

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 70
    • The Studio Online
Re: restricting random images added in the past month
« Reply #5 on: December 15, 2006, 07:59:08 pm »

 :) Well, that sounds fair enough. Many thanks. All good though.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.