It would be great if Linkchecker could also check <img> tags. Broken image links can be a pain to ferret out.
Example:
<img source="/files/oldstuff/foo.jpg">
If that request fails, it goes into the list of broken links, perhaps with a "link type" of "Image"?
Putting this out for comments from the author and +1s for anyone else who might benefit from an extension of the code.
TC
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | linkchecker_extract_images-D5.patch | 1.53 KB | hass |
| #2 | linkchecker_extract_images-D6.patch | 1.89 KB | hass |
Comments
Comment #1
hass commentedI already thought about this... may become part of #417354: Support links in object/embed like youtube videos, but I thought we need to rename the module to "url checker" if we extend it in such directions :-)
Comment #2
hass commentedSee the patch attached. It's missing the 301 auto-update part we need to fix #451456: 301 auto-update could break links.
Comment #3
fralenuvol commentedHi I tried your patch and wanted to add a little fix.
In PHP5 the handling of array_merge has changed so we need to type-cast each parameter in order to avoid PHP warnings:
on line 892 of linkchecker.module
Change
To
Comment #4
hass commentedI've turned off notices as D6 isn't E_ALL save... I wonder why we need to type cast an array() to an array()... do you know why PHP5 warns? Looking through core - I cannot find any array_merge() that type cast the variables!?
Comment #5
hass commentedOh, the reason for this notice must be the
[5]... if no link has been found the array is empty and the subarray does not exist...Comment #6
hass commented@fralenuvol: Than you very for this important hint. I've reworked all this stuff and committed a re-worked patch with many more features.
#427906, #417354: Extract links from various configurable HTML tags (a|area|img|iframe|object|param|embed)
Comment #7
hass commented@fralenuvol: Do you know if type casting works in PHP4?