Roxen.git
/
server
/
modules
/
tags
/
indirect_href.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/modules/tags/indirect_href.pike:1:
// This is a roxen module. (c) Informationsvvarna AB 1996. // This module makes it possible to write symbolic names instead of // absoulte hrefs. // Written by Mattias Wingstedt, <wing@infovav.se>, please refer // to him for further info.
-
string cvs_version = "$Id: indirect_href.pike,v 1.
4
1996/12/
02
04
:
32
:
48
per
Exp $";
+
string cvs_version = "$Id: indirect_href.pike,v 1.
5
1996/12/
07
11
:
37
:
54
neotron
Exp $";
#include <module.h> inherit "module"; inherit "roxenlib"; mapping hrefs; string tagname; void create() {
Roxen.git/server/modules/tags/indirect_href.pike:21:
"[name] = [URL]\n" ); defvar( "tagname", "newa", "Tagname", TYPE_STRING, "Name of the tag\n" "<tag name=[name]>foo</tag> will be replaced with\n" "<a href=[URL]>foo</a>" ); } array (mixed) register_module() {
-
return ({ MODULE_PARSER, "Indirect href", "Indirect href. Adds a new tag (with a configurable name, if the name is changed, the module has to be reloaded for the namechange to take effect), with a single
arguemnt
, name=string. It then uses the name to index a database of URLs, and inserts a <a href=...> tag instead. This can be very useful, since you can move all links to a document at once. It also allows the special case 'name=random'. If this is used, a random link will be selected from the database.", });
+
return ({ MODULE_PARSER, "Indirect href", "Indirect href. Adds a new tag (with a configurable name, if the name is changed, the module has to be reloaded for the namechange to take effect), with a single
argument
, name=string. It then uses the name to index a database of URLs, and inserts a <a href=...> tag instead. This can be very useful, since you can move all links to a document at once. It also allows the special case 'name=random'. If this is used, a random link will be selected from the database.
"
+
"Example: <pre> roxen=http://www.roxen.com/\n"
+
" infovav=http://www.infovav.se/</pre>"
, });
} void start() { array (string) lines, foo; string line; string variable, value; string dir = ""; mapping all = ([ ]);