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, Copyright © 1996 - 2004, Roxen IS. // // Fredrik Noring et al // // Several modifications by Francesco Chemolli.
-
constant cvs_version = "$Id: obox.pike,v 1.
40
2004
/
06
/
30
16
:
59
:
25
mast Exp $";
+
constant cvs_version = "$Id: obox.pike,v 1.
41
2008
/
08
/
15
12
:
33
:
55
mast Exp $";
constant thread_safe=1; #include <module.h> // #include <roxen.h> inherit "module"; // begin locale stuff //<locale-token project="mod_obox">LOCALE</locale-token> //<locale-token project="mod_obox">SLOCALE</locale-token> #define SLOCALE(X,Y) _STR_LOCALE("mod_obox",X,Y)
Roxen.git/server/modules/tags/obox.pike:22:
constant module_type = MODULE_TAG; LocaleString module_name = LOCALE(1,"Tags: Outlined box"); LocaleString module_doc = LOCALE(2,"This module provides the <tt><obox></tt> tag that " "draws outlined boxes."); constant unit_gif = "/internal-roxen-unit";
-
static
string img_placeholder (mapping args)
+
protected
string img_placeholder (mapping args)
{ int width=((int)args->outlinewidth)||1; return sprintf("<img src=\"%s\" alt=\"\" " // border:1 is here to work around a buggy rendering in NS4. "style=\"display:block; border:1;\" " "width=\"%d\" height=\"%d\"%s>", unit_gif, width, width, (args->noxml?"":" /")); }
-
static
string handle_title(string name, mapping junk_args,
+
protected
string handle_title(string name, mapping junk_args,
string contents, mapping args) { args->title=contents; return ""; }
-
static
string horiz_line(mapping args)
+
protected
string horiz_line(mapping args)
{ args->fixedleft=""; return sprintf("<tr><td colspan=\"5\" bgcolor=\"%s\">\n" "%s</td></tr>\n", args->outlinecolor, img_placeholder(args)); }
-
static
string title(mapping args)
+
protected
string title(mapping args)
{ if (!args->title) return horiz_line(args); string empty=img_placeholder(args); if (!args->left && !args->fixedleft) if (args->width && !args->fixedright) args->fixedleft = "7"; else args->left = "20"; if (!args->right && !args->fixedright)