|
|
|
|
|
|
constant cvs_version = "$Id: fnord.pike,v 1.19 2004/06/05 15:19:44 _cvs_dirix Exp $"; |
|
|
|
constant thread_safe=1; |
|
|
#include <module.h> |
inherit "module"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 "FNORD"; |
return ""; |
} |
|
|
|
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." |
"<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 |
|
|