Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Validation buglet

Quote Reply
Validation buglet
Ok... I need to post this so I can enter it into the FAQ.

The more I play with the sites, the more little things I find that I wasn't dealing with before due to the specific nature of the customizations I've made to my primary sites.

but, for those who might not suspect it -- when a site is Modified, and added to the Validation database, it's put AT THE END of the list of links waiting to be validated.

This means, that new links, with the "Validate" flag set are listed first, with the links pending "Modify" listed after all those have been dealt with.

If you are like me, and have lots of dead links pending never to be validated, you might not realize that you are missing the "Modify" links!!

You need to make a few changes to the the Admin_HTML.pm file to get around this.

1) Make a backup copy of the file in case you screw up!
2) Change the sub html_validate_form { as below:

3) change the order of these 4 lines at the top of the routine:
Code:
$to_modify = $val->query ( { mh => 10, so => 'DESC', sb => 'ID', Mode => 'Modify' } );
$numhits = $val->hits;
$to_validate = $val->query ( { mh => 10 - $numhits, so => 'DESC', sb => 'ID', Mode => 'Validate' } );
$numhits = $numhits + $val->hits;
I've also changed a few of the parameters to show the NEWEST links first.

4) Then, you need to move the block of code:
Code:
foreach $record (@{$to_modify}) {
... yada...yada...yada...
}
from where it is, near the end of the routine, to immediately above the line:
Code:
foreach $record (@{$to_validate}) {
5) This will yank the "Modify" records FIRST, then the "Validate" records.
When you move the 'foreach' loop, make sure you grab the closing brace, and move the whole loop.

Simple... not a big deal, but it does make a difference in keeping the database "updated" in the proper order. IMHO ... modifications need to go before "validations" since the records are already public.



http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: Validation buglet In reply to
I just installed a new version 1.13 site, and this worked just fine with that.
If you follow the instructions above, you should have no problems changing the display order. (I like to know my codes work <G>).

I have a new version of the Editor/Password logon routine to be posted tonight as well. Minor fixes, and some additional template features.

http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/