Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Mass Deletion of Add Link Requests

Quote Reply
Mass Deletion of Add Link Requests
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.
Quote Reply
Re: [gravitydex] Mass Deletion of Add Link Requests In reply to
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
Code:
sub {
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:

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!
Quote Reply
Re: [Andy] Mass Deletion of Add Link Requests In reply to
I'm lazy, so I do it via phpmyadmin :)
Blacknight Solutions - Hosting
Search.ie
Armchair.ie
Quote Reply
Re: [blacknight] Mass Deletion of Add Link Requests In reply to
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!