I have created a new helper module for Linkchecker which highlights broken links with different colors according to the response code. This allows broken links to stand out in large blocks of text and helps content managers determine which links may or may not need to be fixed.



caesius’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev
hass’s picture

This is a very cool feature I thought about in past, too. After some thinking I focused on other things as it seems to be difficult for internal, relative and absolute paths. The patch #1441574: Port D6 access bypass bugfixes to D7 may also help you to better detect all links as a short review of your sandbox have shown me your code may not find *all* links. I may be wrong, but you are looking for absolute links only if I remember correctly and linkchecker allows a lot more like pathauto and other input filtered links. To get this feature in we first need to fix #1441574: Port D6 access bypass bugfixes to D7 and make sure that all links are getting highlighted.

I'm not sure if it may be more easier/reliable to implement this with an input filter that adds the css classes to the links just on output. With DOM you can add classes really easy. I also wished we would be able to do the same in the edit form - at least in WYSIWYG editors.

hass’s picture

Ok, the access bypass has been committed.

The idea about the feature here is as follows:

  • Variant 1: Add an array of urls to js settings and highlight the links if the user is an author, otherwise not. It may be extremly difficult to parse the website for urls.
  • Variant 2: This may be circumvented by an input filter that will add css classes to the links. This may be impossible if a link is not in an a-tag. The filter must also ordered as very last filter. Additional I would add an inline CSS if the author views the node.

Variant 2 should be the fastest and most reliable. I'm open to other ideas. Are you able to develop this feature?

hass’s picture

@caesius: Are you working on this feature?

hass’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

No patch provided.