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

Customizing the Verify output

Quote Reply
Customizing the Verify output
First, let me explain why I am playing with this. I have a category, "Other/Dead_Links" which I move links into if they appear to be down for more than a temporary blip. Occasionally I'll delete them (if I know for sure the page has been replaced by something else or is gone permanently), but I usually use that as just a holding bin of sorts. A few reasons:

- I hate to delete links after all the work spent finding and indexing them!

- They often turn out to only be down temporarily.

- Sometimes visitors look through the dead links category and happen to know the new location of the site. I'm very appreciate of these people. Smile

- It's clearly set off from other categories, so the links are kept out of view from most people.

Ok, that all works find and dandy. However, when verifying links, about half of those I am working with are in the dead links category. I already know about those, so I'd rather not have to page through them while looking for new ones to work on.

I have done a couple of things:

1) I tweaked nph-verify.cgi to print the dead links category below the URL in the screen for the particular status code. That gives me a visual reminder that that link has already been taken care of.

I did this by changing line 417 to:

Code:
$SQLquery = "select ID,URL,Date_Checked,Status,CategoryID from Links ...
and added the following to around line 480:

Code:
my $category = "";
if ($row[4] == "354") {
$category = "Dead Links";
}
finally, adding
$category
to line 487 or whatever line it is with the checkbox and link info. 354 is the categoryID for the Dead Links.

2) I got to thinking that I could make the section optional which prints out the individual link info. I added an "else" after the "if" statement above and wrapped it around the appropriate loop. That effectively kept it from showing the dead links, but they were still being calculated in the total for the status code and for each page. So, some pages would show just one link (from the non-354 category), which still was far from optimal. Besides, then my dead links wouldn't show up through verify options if I did want to edit them...

3) I then decided, based on looking at how things are set up in sub html_verify_analysis of Admin_HTML.pm ($group_counts is what I am after), that I could make my own fake status code -- an appropriately named 666 -- that would set each of the dead links in its own category. This works! Of course, that will be lost next time I run the verifier... I'd rather not have to stay on top of that manually, as you can probably imagine.

So, what I think would be the perfect solution, although I can't think of any way at present to accomplish it, is to add a condition that if the categoryID is 354, then the status code is set to 666, at least from the standpoint of the admin display and editing. Probably no reason to change the status data in the database. By pulling the 354's out before $group_counts does its thing, my hope is that the individual status code counts would be calculated correctly, as they were in method #3 above.

Does that make sense?

Thanks as always for any thoughts.

Dan

Subject Author Views Date
Thread Customizing the Verify output Dan Kaplan 6343 Sep 28, 2000, 7:46 AM
Thread Re: Customizing the Verify output
pugdog 6260 Sep 28, 2000, 10:34 AM
Thread Re: Customizing the Verify output
Dan Kaplan 6254 Sep 28, 2000, 2:29 PM
Thread Re: Customizing the Verify output
Dan Kaplan 6217 Oct 2, 2000, 3:53 PM
Thread Re: Customizing the Verify output
Dan Kaplan 6228 Oct 4, 2000, 8:37 PM
Thread Re: Customizing the Verify output
Dan Kaplan 6198 Oct 10, 2000, 2:25 PM
Thread Re: Customizing the Verify output
macagy 6172 Oct 11, 2000, 9:44 AM
Thread Re: Customizing the Verify output
Dan Kaplan 6181 Oct 11, 2000, 10:04 AM
Thread Re: Customizing the Verify output
macagy 6191 Oct 11, 2000, 7:13 PM
Post Re: Customizing the Verify output
Dan Kaplan 6149 Oct 11, 2000, 7:19 PM
Thread Re: Customizing the Verify output
pugdog 6188 Oct 10, 2000, 10:30 PM
Post Re: Customizing the Verify output
Dan Kaplan 6190 Oct 11, 2000, 9:07 AM