This is a very neat module and complements:
http://drupal.org/project/link_checker

It would be great if the two could be merged, with options to check content_types/fields as necessary.

CommentFileSizeAuthor
#4 linkchecker.patch25.97 KBhy0kl
#4 linkchecker.install.patch5.3 KBhy0kl

Comments

momper’s picture

+1

jredding’s picture

I maintain link_checker and I'd like to merge it with this project. Yes/No?

So far what I can see is that we would need the following changes
1) the admin settings page would need to include CCK specific items, like which content types to search. A setting like this could also be beneficial for this module overall as people may not want to search every node.

2) The table needs to be expanded or a new table added. the link_checker module table has the following fields
vid (version id)
nid (node id)
delta (delta of the link as a single node may have multiple links)
last_checked (last time this link was checked so we can do rechecking of links)
status (HTTP status code)
field_name (which particular field is used for this link, a node could have multiple link fields)
error_count (threshold of how many times we recheck a link before calling it dead)

So far other than that its just a philosophy on how to merge these, which functions to reuse. You're link checking code looks a bit better so I'd just plug into that. Or in short my changes would be

1) Add administrative settings
2) Add CCK checking code into hook_cron
3) Pass URLs off to be checked as "tasks"
4) modify as appropriate such that the exact link in the URL is monitored (vid, nid, delta, field_name together make a key)

Thoughts?

jredding’s picture

ping.. ping..

hy0kl’s picture

StatusFileSize
new5.3 KB
new25.97 KB

Hi.
I merged link_checker and linkchecker, and modified the linkchecker module's code style just use drupal code style. So the patch is very big, I am sorry for it.
New module named linkchecker, it contains all of functionality of original link_checher and linkchecker modules.
Any question, please connect me. Thank you.

hy0kl’s picture

update the patch files.

hass’s picture

subscribe

janusman’s picture

subscribe

hass’s picture

Status: Active » Postponed

I'm working on a redesigned D6 version of this module - hopefully with CCK support in the first available DEV. Afterwards we can backport this to D5.

hass’s picture

Title: merge with link_checker? » Implement URL checking for CCK fields
Status: Postponed » Active

I need some help for the CCK stuff. I tried some time, but have not yet got what I need + I'm not sure about the table structure... Maybe create linkchecker_node_field with field_name, lid columns. I've committed the latest code to CVS for review, but CCK stuff is still missing. I've nevertheless added some conditions in linkchecker_nodeapi() where we need to scan the CCK fields for URLs first.

// TODO: Scan CCK text fields (http://drupal.org/project/cck).
if (module_exists('text')) {
  // Code goes here...
}
// TODO: Scan CCK link fields (http://drupal.org/project/link).
if (module_exists('link')) {
  // Code goes here...
}
hass’s picture

Version: 5.x-2.x-dev » 6.x-2.x-dev
Status: Patch (to be ported) » Fixed
hass’s picture

Version: 5.x-1.x-dev » 5.x-2.x-dev
Status: Active » Patch (to be ported)
hass’s picture

Version: 6.x-2.x-dev » 5.x-2.x-dev
Assigned: Unassigned »
Status: Fixed » Patch (to be ported)
hass’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.