ns_register_adptag registers a procedure to be called when the specified beginning and ending tags are used in an ADP. The tag is the beginning tag to look for, and the endtag is the ending tag to look for. The adpstring is an ADP that will be called when AOLserver encounters the specified tags when processing an ADP.
There are two ways to use ns_register_adptag, with and without the endtag parameter:
If the endtag parameter is specified, the string of characters between the beginning tag (tag) and the ending tag (endtag) is passed to the adpstring. The return value of the ADP will be sent to the browser in place of the string of text that was specified between the beginning and ending tags.
The string is not parsed, which means that you cannot include ADP tags in the string unless you execute ns_adp_parse on the string inside the ADP that processes the registered ADP tag.
If endtag is not specified, then no closing tag is required. The ADP will be called every time the specified tag is encountered.
Note: This function is best used in a .tcl file rather than an .adp file, because the parser will be confused by the <% ... %> syntax even though they are in braces.