Roxen.git / server / modules / tags / obox.pike

version» Context lines:

Roxen.git/server/modules/tags/obox.pike:1: - // The outlined box module, Copyright © 1996 - 2000, Roxen IS. + // The outlined box module, Copyright © 1996 - 2009, Roxen IS.   //   // Fredrik Noring et al   //   // Several modifications by Francesco Chemolli.       - constant cvs_version = "$Id: obox.pike,v 1.35 2001/03/08 14:35:47 per Exp $"; + constant cvs_version = "$Id$";   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>&lt;obox&gt;</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=\"\" width=\"%d\" height=\"%d\"%s>", +  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)
Roxen.git/server/modules/tags/obox.pike:92:    args->bgcolor ? " bgcolor=\""+args->bgcolor+"\"" : "",    args->outlinecolor,    empty,    args->outlinecolor,    empty,    args->bgcolor ? " bgcolor=\""+args->bgcolor+"\"" : "",    args->outlinecolor,    empty,    args->left ? " width=\""+args->left+"\"" : "",    (args->fixedleft ? -  String.strmult ("&nbsp;", (int) args->fixedleft) : "&nbsp;"), +  ("&nbsp;"*(int)args->fixedleft) : "&nbsp;"),    args->right ? " width=\""+args->right+"\"" : "",    (args->fixedright ? -  String.strmult ("&nbsp;", (int) args->fixedright) : "&nbsp;"), +  ("&nbsp;"*(int)args->fixedright) : "&nbsp;"),    args->outlinecolor,    empty);    case "caption":    return sprintf("<tr%s><td colspan=\"2\"><font size=\"-3\">&nbsp;</font></td>\n"    "<td rowspan=\"3\" nowrap=\"nowrap\">&nbsp;<b>" /* bgcolor */    "%s%s%s" /* titlecolor, title, titlecolor */    "</b>&nbsp;</td>\n"    "<td colspan=\"2\"><font size=\"-3\">&nbsp;</font></td></tr>\n"    "<tr bgcolor=\"%s\">" /* outlinecolor */    "<td colspan=\"2\">\n"
Roxen.git/server/modules/tags/obox.pike:128:    args->titlecolor ? "<font color=\""+args->titlecolor+"\">" : "",    args->title,    args->titlecolor ? "</font>" : "",    args->outlinecolor,    empty,    empty,    args->outlinecolor,    empty,    args->left ? " width=\""+args->left+"\"" : "",    (args->fixedleft ? -  String.strmult ("&nbsp;", (int) args->fixedleft) : "&nbsp;"), +  ("&nbsp;"*(int)args->fixedleft) : "&nbsp;"),    args->right ? " width=\""+args->right+"\"" : "",    (args->fixedright ? -  String.strmult ("&nbsp;", (int) args->fixedright) : "&nbsp;"), +  ("&nbsp;"*(int)args->fixedright) : "&nbsp;"),    args->outlinecolor,    empty);    }   }      string simpletag_obox(string name, mapping args, string contents)   {    string s;       // Set the defaults...
Roxen.git/server/modules/tags/obox.pike:183:    horiz_line(args) + "</table>\n";       return s;   }         TAGDOCUMENTATION   #ifdef manual   constant tagdoc=([   "obox": ([ -  "standard":#"<desc cont='cont'><p><short> +  "standard":#"<desc type='cont'><p><short>    This tag creates an outlined box.</short>   </p></desc>      <attr name='align' value='left|right'><p>    Vertical alignment of the box.</p>   </attr>      <attr name='bgcolor' value='color'><p>    Color of the background and title label.</p>   </attr>
Roxen.git/server/modules/tags/obox.pike:260: Inside #if defined(manual)
  <title>Sample box</title>      This is just a sample box.      </obox>   </ex>      </attr>",       -  "svenska":#"<desc cont='cont'><p><short> +  "svenska":#"<desc type='cont'><p><short>    Denna tagg skapar en ramlåda runt dess innehåll.</short>   </p></desc>      <attr name='align' value='left|right'><p>    Ramlådans vertikala position.</p>   </attr>      <attr name='bgcolor' value='färg'><p>    Färgen på bakgrunden samt titeln.</p>   </attr>