|
|
|
|
|
|
constant cvs_version = "$Id: fnord.pike,v 1.17 2004/06/30 16:58:58 mast Exp $"; |
|
|
|
constant thread_safe=1; |
|
|
#include <module.h> |
inherit "module"; |
|
|
|
|
#define LOCALE(X,Y) _DEF_LOCALE("mod_fnord",X,Y) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string simpletag_fnord(string tag_name, mapping arguments, string contents, |
RequestID id ) |
{ |
if (id->prestate->fnord) |
return contents; |
if (arguments->alt) |
return arguments->alt; |
return ""; |
} |
|
|
|
constant module_type = MODULE_TAG; |
LocaleString module_name = LOCALE(1,"Fnord!"); |
LocaleString module_doc = |
LOCALE(2,"Adds an extra container tag, <fnord> that's supposed " |
"to make things invisible unless the \"fnord\" prestate is present." |
"<p>This module is here as an example of how to write a " |
"very simple RXML-parsing module.</p>" ); |
|
|
|
|
|
TAGDOCUMENTATION; |
#ifdef manual |
constant tagdoc=(["fnord":#"<desc type='cont'>The fnord container tag hides its " |
"contents for the user, unless the fnord prestate is used.</desc>" |
"<attr name=alt value=string>An alternate text that should be written " |
"in place of the hidden text.</attr>"]); |
#endif |
|
|