From: Carsten K. <car...@ma...> - 2001-12-02 03:38:51
|
I've added an option to insert little image icons before external links to indicate the type of link (i.e. mailto, http, etc.) It's off by default to coincide with existing behavior but can enabled in index.php. Uncomment the following line to activate it: //define("USE_LINK_ICONS", 1); You can view a screen snapshot of it in action on my web site: <http://homepage.mac.com/carstenklapp/phpwiki/> Carsten |
From: Reini U. <ru...@x-...> - 2001-12-02 09:52:39
|
Carsten Klapp schrieb: > I've added an option to insert little image icons before external links to > indicate the type of link (i.e. mailto, http, etc.) > > It's off by default to coincide with existing behavior but can enabled in > index.php. Uncomment the following line to activate it: > //define("USE_LINK_ICONS", 1); > > You can view a screen snapshot of it in action on my web site: > <http://homepage.mac.com/carstenklapp/phpwiki/> "As the Chinese say, 1001 words is worth more than a picture." - John McCarthy -- http://www-formal.stanford.edu/jmc/sayings.html We use styles to visually seperate such links from the rest and to save bandwidth. -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |
From: Adam S. <ad...@pe...> - 2001-12-02 19:37:14
|
> We use styles to visually seperate such links from the rest and to > save bandwidth. i don't personally like those images that much either (moin does the same thing) because i think they disrupt the flow of text. however one good reason to support it is for color blind people that access your wiki. if you want wide participation you have to be prepared to make your wiki as available and useful to as many people as possible. adam. |
From: Steve W. <sw...@pa...> - 2001-12-02 20:15:47
|
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: > > I've added an option to insert little image icons before external links to > indicate the type of link (i.e. mailto, http, etc.) > > It's off by default to coincide with existing behavior but can enabled in > index.php. Uncomment the following line to activate it: > //define("USE_LINK_ICONS", 1); > > You can view a screen snapshot of it in action on my web site: > > <http://homepage.mac.com/carstenklapp/phpwiki/> > > Carsten > > > _______________________________________________ > Phpwiki-talk mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwiki-talk > --- http://www.panix.com/~swain/ "Without music to decorate it, time is just a bunch of boring production deadlines or dates by which bills must be paid." -- Frank Zappa |
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: |
From: Steve W. <sw...@pa...> - 2001-12-02 23:26:47
|
Hmm. I must be doing something wrong. I got a fresh copy from CVS, uncommented the line for USE_LINK_ICONS, edited HomePage and inserted: http://www.example.com/ but there is no icon in front of the link. Did I miss something in the instructions? ~swain On Sun, 2 Dec 2001, Carsten Klapp wrote: > > 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: > > > _______________________________________________ > Phpwiki-talk mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwiki-talk > --- http://www.panix.com/~swain/ "Without music to decorate it, time is just a bunch of boring production deadlines or dates by which bills must be paid." -- Frank Zappa |