coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: evildance on June 08, 2005, 10:43:16 AM

Title: How to automatically delete pics(or albuns) with date.
Post by: evildance on June 08, 2005, 10:43:16 AM
How to automatically delete pics(or albuns) with date.
Ex: 7 days later automatically delete.
Please teach me how to do.
Thanks!
Title: Re: How to automatically delete pics(or albuns) with date.
Post by: Abbas Ali on June 08, 2005, 01:20:37 PM
You will have to create a cron script for this which automatically gets executed once daily. This script will search for the pics that are older than 7 days and then delete them. It is not an easy job to create such a script and will require certain skills. You can ask if anybody is willing to do so for you.
Title: Re: How to automatically delete pics(or albuns) with date.
Post by: Joachim Müller on June 09, 2005, 07:48:23 AM
on most shared/virtual host (i.e. when webhosted) you're not allowed to run cron jobs anyway. There could be another method of triggering the delete script, which is on access over http: you would have to add some if/then switch to a coppermine page that performs the check if the auto-delete script has been run on this day already; if not, execute it. However, you would still have to come up with this code on your own - coppermine doesn't come with this sort of script out-of-the-box.
Title: Re: How to automatically delete pics(or albuns) with date.
Post by: Nibbler on June 09, 2005, 01:32:44 PM
There are functions in delete.php that can handle pic and album deletions cleanly. You'll just need a way to trigger the update as described above and select the appropriate pics based on their ctime.