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. Copyright © 1996-1999 Idonex AB. * * This module makes it possible to write symbolic names instead of * absoulte hrefs. * * made by Mattias Wingstedt <peter@idonex.se> -96 */
-
constant cvs_version = "$Id: indirect_href.pike,v 1.
10
1999
/
12
/
09
21
:
40
:
56
nilsson Exp $";
+
constant cvs_version = "$Id: indirect_href.pike,v 1.
11
2000
/
02
/
10
07
:
13
:
28
nilsson Exp $";
constant thread_safe=1; #include <module.h> inherit "module"; inherit "roxenlib"; mapping hrefs; string tagname; void create()
Roxen.git/server/modules/tags/indirect_href.pike:26:
//This pollutes namespace and makes the life hard on the manual writers. //Thus it's turned of for normal users. defvar( "tagname", "ai", "Tagname", TYPE_STRING|VAR_EXPERT, "Name of the tag\n" "<tag name=[name]>foo</tag> will be replaced with\n" "<a href=[URL]>foo</a>" "if the name is changed, the module has to be reloaded for the " "namechange to take effect)" ); }
-
array
(mixed) register_
module
()
-
{
-
return ({
MODULE_PARSER
,
"Indirect href"
,
+
constant
module
_
type
=
MODULE_PARSER
;
+
constant
module_name =
"Indirect href"
;
+
constant module_doc =
"Indirect href. Adds a new container <tt><ai></tt>" ", 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"
-
" idonex=http://www.idonex.se/</pre>"
, })
;
-
}
+
" idonex=http://www.idonex.se/</pre>";
// Dynamic tagname, hence dynamic documentation. mapping tagdocumentation() { return ([tagname:"<desc cont>ai</desc>"]); } void start() { array (string) lines; string variable, value;