Roxen.git
/
server
/
modules
/
examples
/
fnord.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/modules/examples/fnord.pike:1:
// This is a roxen module. Copyright © 1996 - 2001, Roxen IS. // This is a small sample module. It is intended to show a simple example // of a container. // This variable is shown in the configinterface as the version of the module.
-
constant cvs_version = "$Id: fnord.pike,v 1.
17
2002
/
06
/
14
10
:
21
:
57
nilsson
Exp $";
+
constant cvs_version = "$Id: fnord.pike,v 1.
18
2004
/
05
/
23
15
:
08
:
56
_cvs_dirix
Exp $";
// Tell Roxen that this module is threadsafe. That is there is no // request specific data in global variables. constant thread_safe=1; // Include and inherit code that is needed in every module. #include <module.h> inherit "module"; // Some defines for the translation system // //<locale-token project="mod_fnord">LOCALE</locale-token>
-
#define LOCALE(X,Y)
_STR_LOCALE("mod_fnord",X,Y)
+
//
#define LOCALE(X,Y) _STR_LOCALE("mod_fnord",X,Y)
// end of the locale related stuff // Documentation: // The purpose of this module is to allow comments in the SPML source // that are invisible to average viewers, but can be seen with the // right magic incantation. Fnord! The special text is rendered in // the "sample" font, if available, which makes it possible for // someone looking at the mixed output to distinguish text that is for // public consumption from that which is restricted.
Roxen.git/server/modules/examples/fnord.pike:73:
// is an 'alt' text, display it, if not, simply return an empty string string simpletag_fnord(string tag_name, mapping arguments, string contents, RequestID id ) { if (id->prestate->fnord) return contents; if (arguments->alt) return arguments->alt; if (arguments["show-fnord"])
-
return
LOCALE(5,
"FNORD"
)
;
+
return "FNORD";
return ""; } // Some constants that are needed to register the module in the RXML parser. constant module_type = MODULE_TAG; constant module_name = "Fnord!"; constant module_doc = ("Adds an extra container tag, <fnord> that's supposed " "to make things invisible unless the \"fnord\" prestate is present."