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

version» Context lines:

Roxen.git/server/modules/tags/indirect_href.pike:1:   // This is a roxen module. Copyright © 1996 - 2000, Roxen IS.   //   // This module makes it possible to write symbolic names instead of   // absoulte hrefs.   //   // made by Mattias Wingstedt      #pragma strict_types    - constant cvs_version = "$Id: indirect_href.pike,v 1.23 2000/09/01 23:41:06 nilsson Exp $"; + constant cvs_version = "$Id: indirect_href.pike,v 1.24 2000/09/10 16:35:07 nilsson Exp $";   constant thread_safe = 1;   #include <module.h>      inherit "module";      void create()   {    defvar( "hrefs", "roxen = http://www.roxen.com\n"    "community = http://community.roxen.com", "Indirect hrefs",    TYPE_TEXT_FIELD, "The URL database with the syntax:<br>\n"    "[name] = [URL]\n" );    /*    defvar( "tagname", "ai", "Tag name", TYPE_STRING,    "The name of the tag." );    */   }    - constant module_type = MODULE_PARSER; + constant module_type = MODULE_TAG;   constant module_name = "Indirect href";   //constant module_unique = 0;   constant module_doc =   #"Indirect href. Adds a new tag <tt>&lt;ai&nbsp;name=\"\"&gt;&lt;/ai&gt;</tt> that works like   <tt>&lt;a&nbsp;href=\"\"&gt;&lt;/a&gt;</tt> but uses a symbolic name instead of a URL. The   symbolic name is translated to a proper URL and the tag rewritten to a   proper <tt>&lt;a&nbsp;href=\"\"&gt;&lt;/a&gt;</tt> tag. The translation between symbolic names and   URLs is stored in a module variable. The advantage of this module is that   each URL will only be stored in one place and it becomes very easy to   change it, no matter how many links use it. As an extra bonus the name