[pmwiki-devel] Wiki links with title/alt text attribute

John Rankin john.rankin at affinity.co.nz
Wed May 4 15:56:51 CDT 2011


On 3/05/11 10:38 PM, Petko Yotov wrote:
> On Tuesday 03 May 2011 11:46:58, Petko Yotov wrote :
>> Do you also use a custom MakePageName function? Because in the original
>> one, the # character and what follows it is removed at the very beginning,
> Please ignore this part, I now see that you posted your custom function in an
> earlier message.
For completeness, the local customisation to let LinkPage take advantage 
of the $alt text that
MakeLink sets was equally easy. Perhaps this feature could move into the 
core at some point.
The changes to pmwiki.php are:

- add '$LinkAlt' and $alt to the str_replace arrays at the penultimate 
line of function LinkPage

- change $LinkPageExistsFmt and $LinkPageCreateFmt

At the moment, I am using a custom LinkPage function. So far, this has 
not had any side-effects
that I can detect.

Technically, the change is simple. The question is whether the markup is 
suitable.

[[page name"alt text" | link text]] and [[link text -> page name"alt text"]]
look and feel acceptable to me.

JR

-- 
John Rankin
Affinity Limited
T 64 4 495 3737
F 64 4 473 7991
M 021 RANKIN
john.rankin at affinity.co.nz
www.affinity.co.nz




More information about the pmwiki-devel mailing list