Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Possible to Mass Validate links?

(Page 1 of 2)
> >
Quote Reply
Possible to Mass Validate links?
Hi, I've been away for a while and my links database has about 2,000 links waiting to be validated. Most of them appear to be junk, for example Chinese furniture shops etc!

Is the some way I can export the links waiting to be validated in to excel?

I can then quickly erase all the junk entries and upload the remaining good ones back to Links - and then use the standard method of validating.

PugDog? Anyone? Got some ideas?

JeffB
GT customer for 6 years (and counting!)
Quote Reply
Re: [jeffb] Possible to Mass Validate links? In reply to
It really depends on how good you are with sql, and computer stuff, how comfortable you will be with really heavy tricks.

You can dump tables in admin->database->export area. If you do that, you can export your Links database to a file with all the insert commands, download the file, cut off the top of it (old links) and then quickly delete lines from the list, and then do a delete from prefix_Links where ID => first_link_delete and ID <= last link deleted, then reimport the "good" links using a a cut/past to the SQL monitor box. If there are only a few links you want to keep, after looking at the list, you could do something like:

update Links set isValidated = "Yes" where ID IN ( ) ; I'm not sure the _exact_ command, then you could just

delete from Links where isValidated = 'No'

I'm being a bit sketchy, since all these are pretty dangerous, as they require direct database manipulation.

You can also issue your own SQL commnad to export only the links where isValidated = No, which will cut down the size of your export file drasticly, and let you pick up unvalidate files you might have missed.

The *best* way to fix things, would be to use th IN() list method, once you get the "good" ID's. The reason is that it uses the data already in the database, with an update and a delete. Once you set all the good links to isValidated you can get rid of all the bad links that have isValidated="No". It also does not required deleting good data from the database then reimporting it, which has some risk to it.

If you are going to use the IN method, you can go to the sql monitor in links, and simply ask:

select * from prefix_Links where isValidated="No"

and then do a cut/paste from the results screen into an editor, and take down a list of the "good" ID's that you probably want to keep.

If you can tell the good/bad from just the title and URL, just ask for:

select ID,Title,URL from prefix_Links where isValidated="No"

It would be a really quick 2-finger type delete pattern from there on <G>. Use a block-select/delete to remove the Title, URL data from the editor, change \n to \n, via a regex search/replace, and insert that into the IN (...) portion of the update.

I do something very similar when trying to add new links in bulk, and assign them categories.


PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Possible to Mass Validate links? In reply to
Thanks for your long reply, I appreciate your efforts.

I was wondering if an easier (and safer!) solution would be to manipulate the way Links displays the validation pages. If Links could be changed so it displayed just the link titles and a delete check box. You could quickly see which titles didn't match your site's content and then click the delete button.

This could be done by creating a plug-in/hack which creates a new validation page. This validation page displays only the link's title and a delete check box. Once you've nuked all the bad links using this validation page, you can then go back to the traditional validation page to validate the remaining links.

What do you think PugDog (or anyone else!)?

Cheers,

Jeffb

JeffB
GT customer for 6 years (and counting!)

Last edited by:

jeffb: May 23, 2003, 5:03 AM
Quote Reply
Re: [jeffb] Possible to Mass Validate links? In reply to
That wouldn't be hard. All it would require is a quick plugin that would run something similar to;

SELECT * FROM prefix_Links WHERE isValidated = 'No'

Then display a list, which can be clicked on to find out more details on the links awaiting. I have nothing to do at this particular minute, so I'll try and knock something up for you Smile

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: [jeffb] Possible to Mass Validate links? In reply to
Ok...I'm hoping this is what you wanted Smile Please find the plugin attached (not guaranteed to be bug free, but it seems to work for me on a test 2.1.2 installation)

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] Possible to Mass Validate links? In reply to
Hmm you don't need to use chomp() when looping an array of numbers. Also instead of using that loop it would be more efficient to use IN() as then you only need to do one query.
Quote Reply
Re: [Paul] Possible to Mass Validate links? In reply to
Feel free to make the adjustments Tongue For the sake of 4,000-5,000 links, I'm not sure if it is worth the time to change it.

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] Possible to Mass Validate links? In reply to
So you'd prefer to do 5000 chomps and 5000 queries instead of 1?...eek.

Last edited by:

Paul: May 23, 2003, 11:40 AM
Quote Reply
Re: [Paul] Possible to Mass Validate links? In reply to
As I said, feel free to make the changes. I just wrote a working skeleton on which to base updates etc Wink

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] Possible to Mass Validate links? In reply to
Andy/Paul - thanks for all your help Cool

Andy I haven't tried your plugin yet (due to a short holiday I had!) but I was wondering if it just displayed the titles of the links? This would make it quick and easy to spot inappropriate submissions. I was thinking of something like this ([ ] = check box)....

Code:


[ ] HotSex is here - click now
[ ] Chinese Furniture
[ ] Celebrity Fan site <<-- good one!
[ ] PornoWorld


Click here to delete links <<-- this would be a button


See what I mean? Once I had done this quick "clean out" of bad links, I would then go back to the normal validation system to validate the remaining links.

I'm sure this would be a popular plug-in, and I feel we are so close now Wink

JeffB
GT customer for 6 years (and counting!)
Quote Reply
Re: [jeffb] Possible to Mass Validate links? In reply to
Try installing the current plugin, and then overwriting the old .pm file (located in admin/Plugins/Installed/) with the attached one.

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] Possible to Mass Validate links? In reply to
Thanks - I've now installed your plugin and given it a quick test.

It seems to work fine. I'm not sure what the difference was between the first .pm file and the second one you sent me - they seem to do the same thing? or did you find a bug?

The main issue is that your plugin validates the links, but I'm looking for a quick way to delete them. How easy would it be to change it to "Delete" instead of "Validate"?

Thanks Andy Cool

JeffB
GT customer for 6 years (and counting!)
Quote Reply
Re: [jeffb] Possible to Mass Validate links? In reply to
The one I uploaded simply got rid of the 'view details' part, so there was less space.

Try this one. It should 'delete' rather than validate (make sure you have a backup of your database first, in case it messes something up, or worst case scenario, and deletes all your links Crazy)

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] Possible to Mass Validate links? In reply to
Woot! Cool Smile

It works like a dream - I'm nuking all that Chinese spam as we speak! Thanks Andy!

Now let's start talking about your plugin, version 1.1 Wink

/me off to find a Javascript random number generator - another hurdle for the spammers.

JeffB
GT customer for 6 years (and counting!)
Quote Reply
Re: [jeffb] Possible to Mass Validate links? In reply to
>>>/me off to find a Javascript random number generator - another hurdle for the spammers. <<<

May as well wait for my Add_RandImage plugin, which I'll be releasing probably today :)

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] Possible to Mass Validate links? In reply to
Mr Burns "excellent" Tongue

Let me know when it comes out - sounds very, very interesting.

JeffB
GT customer for 6 years (and counting!)
Quote Reply
Re: [jeffb] Possible to Mass Validate links? In reply to
http://www.gossamer-threads.com/...i?post=244489#244489

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] Possible to Mass Validate links? In reply to
hi Andy, how do I install this ? I tried from the Plugin Downloads area but couldn't do it.
Quote Reply
Re: [Sire] Possible to Mass Validate links? In reply to
Hi. You need to download the .tar file in this post;

http://www.gossamer-threads.com/...i?post=243833#243833 (download to your PC, and then install it through Plugins > Plugin Manager)

...and then;

http://www.gossamer-threads.com/...i?post=243833#244306 (download the updated .pm and upload into your /admin/Plugins folder)

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] Possible to Mass Validate links? In reply to
Someone just asked me to update this .tar. I've updated it, so it should work by just downloading the plugin from here;

http://www.ultranerds.com/...e_Plugins/index.html

I've cleaned out the code, and added in a "limit" option (so you can define which fields are NOT allowed to be modified).

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] Possible to Mass Validate links? In reply to
Call me crazy... but this plugin deletes links, not validates them... or at least I cant see where it validates them in 2.2
Quote Reply
Re: [Stephan99] Possible to Mass Validate links? In reply to
Hi,

You are indeed correct. I made a change for jeffb, so that it deleted them. Sorry Frown

Quote:
The main issue is that your plugin validates the links, but I'm looking for a quick way to delete them. How easy would it be to change it to "Delete" instead of "Validate"?


I've updated this to version 1.5 now (attached). This should **validate** links now <G>

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] Possible to Mass Validate links? In reply to
Thanks Andy!

Appreciate it
Quote Reply
Re: [Andy] Possible to Mass Validate links? In reply to
In Reply To:
Hi,

You are indeed correct. I made a change for jeffb, so that it deleted them. Sorry Frown

Quote:
The main issue is that your plugin validates the links, but I'm looking for a quick way to delete them. How easy would it be to change it to "Delete" instead of "Validate"?



I've updated this to version 1.5 now (attached). This should **validate** links now <G>

Cheers


This plugin works with Links sql 3.1.0?

Thanks, hegu
Quote Reply
Re: [hegu] Possible to Mass Validate links? In reply to
Should work fine. I looked at the source code and nothing stood out as incompatible with 3.x. It's a very simple plugin, so in case it has any peculiarities it would be very easy to fix.

Philip
------------------
Limecat is not pleased.
> >