[pmwiki-users] How to check for missing link targets?

Patrick R. Michaud pmichaud at pobox.com
Wed Dec 14 18:21:27 CST 2005


On Thu, Dec 15, 2005 at 12:58:59AM +0100, chr at home.se wrote:
> Hi
> 
> As an aside, I'm using a separate file manager (called IPFM [1]) to let
> the user's to manage files. To keep things simple, they have to refer to
> uploaded files using the prefix 'uploads:' which simply maps to
> 	uploads: = http://wiki.lyx.org/uploads
> 
> So here is how it is used:
> 
> 	uploads:/aFile.txt
> 
> Now to the question. I'd like the user to get some indication when the
> target doesn't exist, similar to how Attach: works.
> 
> I can see two solutions:
> * Some kind of special 'uploads:' directive
> * A general mechanism for checking if an (possibly external) link target 
>   actually exists.
> 
> Any thoughts on this?   I might be ok to require some extra action 
> (perhaps action=validate-links) in order to show what targets don't exist.

For this I'd do a special directive that checks the filesystem. 

Note that in the general case the phrase "link target" implies to me 
"fetch via url" which is expensive to do for every page display.

However, having an "?action=validate-links" could be *very* helpful in
general for all link targets (sounds like a Cookbook recipe to me).

Pm




More information about the pmwiki-users mailing list