Auto deleting uploads...

Support about Download MOD for phpBB 2
Antworten
Jibal
Beiträge: 2
Registriert: Mo 05.Nov, 2007 10:05

Auto deleting uploads...

Beitrag von Jibal »

Hello,

I'm currently using PHPbb 2.0.22 + Download Mod 5.2.1 and I'm looking for a hack/addon/script for the admin part of Download MOD that could allow me to automaticaly delete every files which are older than one month and with no "click" (ie not downloaded this current month).

I've searched on the forum but as, unfortunaly, I don't speak German (BTW I'm French), I couldn't find anything relating to my problem.

So if someone can give me even a squeleton of such a script, I would be grateful for that.

Thanks in advance and best regards.
Benutzeravatar
oxpus
Administrator
Beiträge: 28737
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

I'm currently using phpBB 2.0.22 + Download Mod 5.2.1
You should better update your mod to fix all security leaks.
automaticaly delete every files which are older than one month and with no "click"
There's no pruning function implemented in the mod to drop downloads!
To do this, you need a script which you can use as a cronjob (recommended) to really delete all old files and the database settings for this.
Otherwise the script woll do this only on every page load of your board and if there are many downloads which must be deleted at once, the user may wait a longer time to get the wanted forum page.

At least I've not really the time to create such a script which you can use via crontab, because this must do a lot of work to drop a download without be able to use the "easy" phpbb functions!

BTW: Why you will drop old downloads after a month?
And which date the script must use? The upload date or last edit date?
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Jibal
Beiträge: 2
Registriert: Mo 05.Nov, 2007 10:05

Beitrag von Jibal »

You should better update your mod to fix all security leaks.
No, I don't want to as:
- This site is for a LAN usage only so the risk of security issues is relativly low,
- I have made a lot of modifications on several scripts to fit my needs and I don't want (/can't ?) to bring them back on the updated scripts.

I can't use cronjob 'cause this site is set on a Windows 2000 server. I only want a script that administrators can periodically launch from the Download Admin Panel.

I want to drop "old" downloads after a month because our disk space is limited and , for the concern of my site, uploads older than a month (ie the upload date as there's never update on them) and not downloaded for a while (the "click") become irrelevant.

I know this represent some work (Indeed I also begun to write a script) as as well as the files have to be deleted from the upload directory, there's also several tables to update (DOWNLOADS_TABLE, DL_STATS_TABLE, DL_COMMENTS_TABLE and DL_NOTRAF_TABLE, as far as I've seen).

I only wanted to know if this or something approaching has already been done as some hack/addon or by one of the members of this list.

If this is not the case then, too bad, I will continue on my own.

Anyway, thanks for your help.
Antworten