I have been very neglectful of my directory for the past several months and there has been an accumulation of over 17,000 link requests, with probably about 99% of them being spam. I just want to delete all the new requests and start over with a clean slate. Is there an easy way to do this? Going through the Gossamer Links Admin is very time consuming. Thanks for your help.
Sep 2, 2010, 10:25 AM
Veteran / Moderator (18441 posts)
Sep 2, 2010, 10:25 AM
Post #2 of 4
Views: 3890
Hi,
Before doing any of this, PLEASE BACKUP YOUR DATABASE!
You could try this plugin:
http://www.gossamer-threads.com/...nks_P304684/#p304684
To get a list of the records to delete, try doing this:
1) Add a new global:
get_old_unvalidated
my $back;
my $sth = $DB->table('Links')->select( ['ID'], { isValidated => "No" } );
while (my $id = $sth->fetchrow) {
$back .= "$id,";
}
$back =~ s/,$//;
return $back;
}..then make a new template called get_ids.html , and place the following content in it:
Then, run from your browser with:
page.cgi?p=get_ids
This should then give you a list of all the linkID's you wanna delete (the unvalidated ones) .. just pass this (long) list of ID's to the plugin I mentioned earlier, and it should get rid of them all for you :)
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!
Before doing any of this, PLEASE BACKUP YOUR DATABASE!
You could try this plugin:
http://www.gossamer-threads.com/...nks_P304684/#p304684
To get a list of the records to delete, try doing this:
1) Add a new global:
get_old_unvalidated
Code:
sub { my $back;
my $sth = $DB->table('Links')->select( ['ID'], { isValidated => "No" } );
while (my $id = $sth->fetchrow) {
$back .= "$id,";
}
$back =~ s/,$//;
return $back;
}
Code:
<%get_old_unvalidated%>Then, run from your browser with:
page.cgi?p=get_ids
This should then give you a list of all the linkID's you wanna delete (the unvalidated ones) .. just pass this (long) list of ID's to the plugin I mentioned earlier, and it should get rid of them all for you :)
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!
Sep 3, 2010, 2:59 AM
Veteran / Moderator (18441 posts)
Sep 3, 2010, 2:59 AM
Post #4 of 4
Views: 3867
You have to be careful when doing it that way though, as it can cause rogue entries in the CatLinks table, and also messes up the Category "link counts" ;)
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!
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!