Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Files in the AddImages Folder

Quote Reply
Files in the AddImages Folder
Hello, I am totally new to this tool, I have been asked to help out a web site and this is one tool they use.

I have found that there are over 10,000 images in the ../links/pages/AddImages folder and they are all *.png files.

Are these files required for anything, maybe a plugin? I don't want to delete them and have a problem, but we cannot do a backup on our ISP because of to many files and this directory seems to be one of the bigger in terms of number of files.

They have GL 3.3.0 installed on their site.


Thanks,
Phil W.
Quote Reply
Re: [philwojo] Files in the AddImages Folder In reply to
Hi,

Those can all be removed. I thought I re-wrote that plugin to generate the images dynamically. However, looking at the latest version I have, thats not the case.

Anyhow, they are just CAPTCHA images that are created for when people are adding a listing (so can safely be removed)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Files in the AddImages Folder In reply to
Thanks for following up, I was wrong on the number that there were, it was over 220,000, not 10,000 like I had thought at first.

I will delete them now.

Phil
Quote Reply
Re: [philwojo] Files in the AddImages Folder In reply to
Wow! Thats either a very active site, or one that doesn't get cleaning done on it very much Whistle

Ideally you probably want to create a little script on a cronjob, that will remove them weekly:

Code:
#!/usr/bin/perl

use strict;

print "Content-Type: text/html \n\n";

use File::Find;

find(\&file_names, "/path/to/AddImages/folder");

sub file_names {

if ($File::Find::name =~ /\.png$/) {
unlink($File::Find::name);
}

}

That will go through the folder, and then remove any images. Hope that helps

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Files in the AddImages Folder In reply to
Not a super busy site, but they haven't had anyone to maintain anything in a long time. The person doing it kind of dropped out a few years ago now and I am literally just starting to look at things.

I appreciate the reply and I will see if I can get that working. I have a bit of knowledge with ISPs and CRON jobs, but not a lot to be honest.

I appreciate the assistance though, I might post back if I have further questions.

thanks,
Phil
Quote Reply
Re: [philwojo] Files in the AddImages Folder In reply to
No problem. Feel free to post if you have any more questions. I don't check back here too often, but I'll reply when I do see any new questions.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Files in the AddImages Folder In reply to
One quick question, I would just save that file with a .pl extension correct, then upload it to the site and point a CRON job to it?
Quote Reply
Re: [philwojo] Files in the AddImages Folder In reply to
Hi,

Yeah, I would save it in the /cgi-bin/links/admin/cron/ folder, as "clean_addimages.cgi" (generally we use .cgi as the extension, as that is what GLinks uses).

Then, the cronjob would look something like:

Code:
10 0 * * * /full/path/to/cgi-bin/links/admin/cron/clean_addimages.cgi

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Files in the AddImages Folder In reply to
Thanks, all set now, I tested it and it is working as expected, really appreciate the assistance.

Phil