Roxen.git
/
server
/
modules
/
tags
/
obox.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/modules/tags/obox.pike:1:
// The outlined box module // // Fredrik Noring et al // // Several modifications by Francesco Chemolli.
-
constant cvs_version = "$Id: obox.pike,v 1.
16
1999/
10
/
04
11
:
34
:
33
nilsson Exp $";
+
constant cvs_version = "$Id: obox.pike,v 1.
17
1999/
12
/
08
14
:
14
:
14
nilsson Exp $";
constant thread_safe=1; #include <module.h> inherit "module"; inherit "roxenlib";
-
+
TAGDOCUMENTATION
+
#ifdef manual
+
constant tagdoc=(["obox": ([
+
"standard":"<desc cont>Outlined box</desc>",
+
"svenska":"<desc cont>Ramlåda</desc>"]) ]);
+
#endif
+
constant unit_gif = "/internal-roxen-unit";
-
static private int loaded;
-
-
static private string doc()
-
{
-
return !loaded?"":replace(Stdio.read_bytes("modules/tags/doc/obox")||"",
-
({ "{", "}" }), ({ "<", ">" }));
-
}
-
+
static string img_placeholder (mapping args) { int width=((int)args->outlinewidth)||1; return sprintf("<img src=\"%s\" alt=\"\" width=\"%d\" height=\"%d\"%s>", unit_gif, width, width, (args->noxml?"":" /")); } static string handle_title(string name, mapping junk_args, string contents, mapping args)
Roxen.git/server/modules/tags/obox.pike:135:
args->outlinecolor, empty); } } string container_obox(string name, mapping args, string contents, object request_id) { string s;
-
if (args->help) {
-
args->right = 250;
-
args->title = "The Outlined Box container tag";
-
contents = doc();
-
}
-
+
// Set the defaults... args->outlinecolor = args->outlinecolor || "#000000"; args->style = args->style || "groupbox"; if (!args->title) { contents=parse_html(contents,([]),(["title":handle_title,]),args); } s = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"" + (args->align?" align=\""+args->align+"\"":"") + (args->width ? " width=" + args->width : "") +
Roxen.git/server/modules/tags/obox.pike:188:
array register_module() { return ({ MODULE_PARSER, ([ "standard":"Outlined box", "svenska":"Ramlåda", ]), ([ "standard":
-
"This is a container tag making outlined boxes.
<p>
"
-
"<tt><obox help></obox></tt> gives help.\n\n "
-
+doc()
,
+
"This is a container tag making outlined boxes.",
"svenska": "<tt><obox help></obox></tt> är en tag som ramar " "in det som står i den. <obox title=exempel>innehåll</obox>", ]), 0, 1 }); }
-
-
void start(int num, object configuration)
-
{
-
loaded = 1;
-
}
-
-
mapping query_container_callers()
-
{
-
return ([ "obox":container_obox, ]);
-
}
+