Roxen.git / server / modules / examples / fnord.pike

version» Context lines:

Roxen.git/server/modules/examples/fnord.pike:1:   // 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 varion of the module. - string cvs_version = "$Id: fnord.pike,v 1.4 1997/08/31 03:47:18 peter Exp $"; + string cvs_version = "$Id: fnord.pike,v 1.5 1998/03/08 13:48:48 per Exp $";      // Tell Roxen that this module is threadsafe. That is there is no   // request specific data in global variables.   int thread_safe=1;      #include <module.h>   inherit "module";         // Documentation:
Roxen.git/server/modules/examples/fnord.pike:51:   // actually get to it,</FNORD> complete source for the ...      // The way the normally hidden text is made visible is by including   // "fnord" in the prestates (i.e. add "/(fnord)" before the "filename"   // part of the URL).      // Michael A. Patton <>          + array register_module();         // First, check the 'request_id->prestate' multiset for the presence   // of 'fnord'. If it is there, show the contents, otherwise, if there   // is an 'alt' text, display it, if not, simply return an empty string      string tag_fnord(string tag, mapping m, string q, object request_id )   { -  +  if(m->help) // This is a standard argument. +  return register_module()[2];    if (request_id->prestate->fnord)    return "<SAMP>"+q+"</SAMP>";    else if (m->alt)    return m->alt;    else    return "";   }         // This function is needed in _all_ modules. The first index in the