From: Carsten K. <car...@ma...> - 2001-12-02 22:33:45
|
Hi Steve, It's working now and the fix has been checked in. A closing brace was missing from the 1.2 stdlib so it broke wiki even if you weren't using USE_LINK_ICONS. An icon for https is also now added for both 1.2 and 1.3 which had been omitted. I left this new functionality off by default anticipating some people do not want link icons. I've been thinking, maybe this kind of optional functionality should be include'ed in rather than inserting the actual code and cluttering up the main code? How about a folder inside lib, called "extensions" or "options" to differentiate between "plugins". Something like this: index.php 1.3 (config.php 1.2): // Wiki extensions. Uncomment any optional extensions you want to activate. //include ("lib/extensions/linkicons/config.php"); //include ("lib/extensions/autosplitwikiwords/config.php"); lib/extensions/linkicons/config.php: define("USE_LINK_ICONS", 1); lib/stdlib.php: ... if (!defined("USE_LINK_ICONS")) { $link['link'] = LinkURL($URL, $linkname); } else { include("lib/extensions/linkicons/linkicons.php"); } lib/extensions/linkicons/linkicons.php: if ($protoc == "mailto") { $link['link'] = "<img src=\"" . DATA_PATH . "/images/mailto.png\"> " . LinkURL($URL, $linkname); } elseif ($protoc == "http") { $link['link'] = "<img src=\"" . DATA_PATH . "/images/http.png\"> " . LinkURL($URL, $linkname); } elseif ($protoc == "https") { $link['link'] = "<img src=\"" . DATA_PATH . "/images/https.png\"> " . LinkURL($URL, $linkname); } elseif ($protoc == "ftp") { $link['link'] = "<img src=\"" . DATA_PATH . "/images/ftp.png\"> " . LinkURL($URL, $linkname); } else { $link['link'] = LinkURL($URL, $linkname); } Carsten On Sunday, December 2, 2001, at 03:15 pm, Steve Wainstead wrote: > > Hi Carsten... tried to test this out; I updated my copy from CVS, > uncommented the link icon define, but I don't get any icons. > > Could you pull a clean copy out of CVS in a new directory and test it? > > ~swain > > On Sat, 1 Dec 2001, Carsten Klapp wrote: |