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

christian.ridderstrom at gmail.com christian.ridderstrom at gmail.com
Sun May 28 15:21:26 CDT 2006


Hi Patrick

A while back you said that having a "?action=validate-links" could be very 
useful etc, see below. Should I add something to the PITS regarding this?

I know you thought this would make a good recipe, but maybe adding it to 
the PITS is good for now.  Btw, maybe PITS entries should have a special 
tag or category marking them as useful to implement as recipes. That way
people wanting to contribute and hack PHP can search for good recipe 
ideas.

/Christian

>> 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).

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr


More information about the pmwiki-users mailing list