From: Jeff D. <da...@da...> - 2002-02-13 17:33:40
|
John Kershaw said: >> however you'd have to do a rule which said something >>like if tag matchs "^(ftp|http://).*\.(gif|jpg|jpeg|png)$" then it's an >>image link. other wise it's just a normal anchor. > > That looks probable - where would I stick it? Somewhere in > transform.php? In LinkBracketLink(), I think (lib/stdlib.php). Since, it seems this feature is really only useful for admin(s), and that a finite set of images will be used for the image links, maybe the best way to go is to use the new image-button features in Theme.php. Eg: something like [ button:Top | HomePage ] Then, if you have a Top.png in the current themes buttons directory, that will be used. (If Top.png can't be found, then link will contain the text "Top", but CSS will be used to make it look like a button, if possible.) (This is how the action buttons (PageHistory, EditPage, etc... are currently produced.) (See Theme::makeButton().) |