View Full Version : Old uploaded images not being removed
July 2nd, 2009, 12:23 PM
Hi, we have our ads set to run for a maximum of 14 days. I just noticed that our public_html/classifieds/data/* folders totalled almost 1GB in size. I did some digging and found 100s of images uploaded by users dating back for months - i.e. way over the 14 days their ads were online for. Isn't the script meant to remove the uploaded images once the ad has been removed? Help! :o
July 2nd, 2009, 06:17 PM
That depends now what version your using.
Like if you use the sendnotice.php script that expires ads but they are not removed. Now newer code there is an option that triggers if you visit the admin panel that ads older than 2 weeks are removed.
You can view the approval que and hit the expired que to see whats still there.
July 3rd, 2009, 09:30 AM
Hi Chuck, thanks for replying. We're running 3.04.
We use sendnotice.php to send out the notices. But you're saying that the script doesn't remove the images that were uploaded? Surely if an ad gets remove, or a user deletes the ad, they that should take the images with it too?
How else can we remove all these old images automatically? Via AdminCP?
Sorry I'm confused :)
July 3rd, 2009, 09:43 AM
You as admin need to remove the ads they are not removed but only expired using the sendnotice script. There is in 3.x I beleive if you expire ads and visit the admin panel ads over 2 weeks are removed.
July 3rd, 2009, 09:44 AM
Thanks, but where do I go in admin to remove them? Does this also remove the uploaded images, the original, large and thumb?
July 3rd, 2009, 09:55 AM
Yes it removes the images and you dont need to go anywhere to delete ads over 2 weeks old. Ads newer than two weeks should be in the expired que in approve images selection.
July 3rd, 2009, 09:56 AM
Great so it triggers from loading the home page.
Does it remove all images, not just the thumb/large ones but the original uploaded file too?
July 3rd, 2009, 09:57 AM
Yes as answered it removes the ads with images.
July 3rd, 2009, 10:08 AM
Ok thanks Chuck.
Looking at the expired ads I see ones older than 2 weeks old. Should these have been removed? I see ones going back to March 2009. Is there a SQL command to remove these in bulk perhaps?
July 3rd, 2009, 04:17 PM
You can not use a mysql query. The scripts need to remove things so images are removed.
If your version of the script has the removal code they should remove if they are older than 2 weeks but I cant tell you exactly when that was added.
You can always hit delete in the expired que to remove them. You must make sure you run sendnotice to expire the ads otherwise nothing will ever happen they will remain in your site.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.