0e834c | 2000-02-24 | Martin Nilsson | |
|
481740 | 1999-08-13 | Martin Nilsson | |
#define _stat id->misc->defines[" _stat"]
#define _error id->misc->defines[" _error"]
#define _extra_heads id->misc->defines[" _extra_heads"]
#define _rettext id->misc->defines[" _rettext"]
#define _ok id->misc->defines[" _ok"]
|
2e777e | 2000-06-09 | Martin Nilsson | | constant cvs_version="$Id: rxmltags.pike,v 1.129 2000/06/09 12:21:00 nilsson Exp $";
|
481740 | 1999-08-13 | Martin Nilsson | | constant thread_safe=1;
|
bfd5fb | 1999-10-08 | Martin Nilsson | | constant language = roxen->language;
|
481740 | 1999-08-13 | Martin Nilsson | |
#include <module.h>
inherit "module";
|
674343 | 2000-03-19 | Martin Nilsson | |
|
481740 | 1999-08-13 | Martin Nilsson | |
|
0be641 | 2000-01-18 | Martin Nilsson | | constant module_type = MODULE_PARSER | MODULE_PROVIDER;
|
32b5dc | 2000-02-18 | Martin Nilsson | | constant module_name = "RXML 2.0 tags";
|
59ae15 | 2000-04-06 | Mattias Wingstedt | | constant module_doc = "This module provides the common RXML tags.";
|
0be641 | 2000-01-18 | Martin Nilsson | |
|
16509b | 1999-12-14 | Martin Nilsson | | void create()
|
481740 | 1999-08-13 | Martin Nilsson | | {
|
666c6c | 2000-03-25 | Martin Stjernholm | | defvar("insert_href",0,"Allow <insert href>",
|
481740 | 1999-08-13 | Martin Nilsson | | TYPE_FLAG|VAR_MORE,
|
59ae15 | 2000-04-06 | Mattias Wingstedt | | "If set, it will be possible to use <tt><insert href></tt> to "
"insert pages from another web server. This could use a some "
"resources, especially when used to insert pages from a slow web "
"server.");
|
481740 | 1999-08-13 | Martin Nilsson | | }
|
16509b | 1999-12-14 | Martin Nilsson | | void start()
|
659d4b | 1999-10-18 | Martin Nilsson | | {
|
ecab8b | 2000-01-23 | Martin Nilsson | | add_api_function("query_modified", api_query_modified, ({ "string" }));
|
0be641 | 2000-01-18 | Martin Nilsson | | query_tag_set()->prepare_context=set_entities;
|
481740 | 1999-08-13 | Martin Nilsson | | }
|
b7e95b | 1999-12-14 | Martin Nilsson | | string query_provides() {
return "modified";
}
|
592ed7 | 2000-02-06 | Martin Nilsson | | constant permitted = "123456789.xabcdefint\"XABCDEFlo<>=0-*+/%%|()"/"";
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | string sexpr_eval(string what)
{
array q = what/"";
|
0f2087 | 2000-03-24 | Henrik Grubbström (Grubba) | |
what =
"constant allocate = 0;"
"constant atexit = 0;"
"constant cd = 0;"
"constant clone = 0;"
"constant exece = 0;"
"constant exit = 0;"
"mixed foo_(){ return "+(q-(q-permitted))*""+";}";
return (string)compile_string( what )()->foo_();
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | |
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
6d7a70 | 2000-02-07 | Martin Nilsson | | class EntityPageRealfile {
|
c8164c | 2000-02-08 | Martin Nilsson | | inherit RXML.Value;
string rxml_const_eval(RXML.Context c) { return c->id->realfile||""; }
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
6d7a70 | 2000-02-07 | Martin Nilsson | | class EntityPageVirtroot {
|
c8164c | 2000-02-08 | Martin Nilsson | | inherit RXML.Value;
string rxml_const_eval(RXML.Context c) { return c->id->virtfile||""; }
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
6d7a70 | 2000-02-07 | Martin Nilsson | | class EntityPageVirtfile {
|
c8164c | 2000-02-08 | Martin Nilsson | | inherit RXML.Value;
string rxml_const_eval(RXML.Context c) { return c->id->not_query; }
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
6d7a70 | 2000-02-07 | Martin Nilsson | | class EntityPageQuery {
|
c8164c | 2000-02-08 | Martin Nilsson | | inherit RXML.Value;
|
3b2673 | 2000-04-15 | Martin Nilsson | | string rxml_const_eval(RXML.Context c) { return c->id->query||""; }
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
6d7a70 | 2000-02-07 | Martin Nilsson | | class EntityPageURL {
|
c8164c | 2000-02-08 | Martin Nilsson | | inherit RXML.Value;
string rxml_const_eval(RXML.Context c) { return c->id->raw_url; }
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
6d7a70 | 2000-02-07 | Martin Nilsson | | class EntityPageLastTrue {
|
c8164c | 2000-02-08 | Martin Nilsson | | inherit RXML.Value;
|
592ed7 | 2000-02-06 | Martin Nilsson | | int rxml_var_eval(RXML.Context c) { return c->id->misc->defines[" _ok"]; }
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
6d7a70 | 2000-02-07 | Martin Nilsson | | class EntityPageLanguage {
|
c8164c | 2000-02-08 | Martin Nilsson | | inherit RXML.Value;
string rxml_const_eval(RXML.Context c) { return c->id->misc->defines->language || ""; }
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
6d7a70 | 2000-02-07 | Martin Nilsson | | class EntityPageScope {
|
c8164c | 2000-02-08 | Martin Nilsson | | inherit RXML.Value;
|
3b2673 | 2000-04-15 | Martin Nilsson | | string rxml_var_eval(RXML.Context c) { return c->current_scope()||""; }
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
6d7a70 | 2000-02-07 | Martin Nilsson | | class EntityPageFileSize {
|
c8164c | 2000-02-08 | Martin Nilsson | | inherit RXML.Value;
int rxml_const_eval(RXML.Context c) { return c->id->misc->defines[" _stat"]?c->id->misc->defines[" _stat"][1]:-4; }
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
6d7a70 | 2000-02-07 | Martin Nilsson | | class EntityPageSelf {
|
c8164c | 2000-02-08 | Martin Nilsson | | inherit RXML.Value;
string rxml_const_eval(RXML.Context c) { return (c->id->not_query/"/")[-1]; }
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
f1c9f0 | 2000-01-26 | Kenneth Johansson | |
|
86b89b | 2000-03-02 | Martin Nilsson | | class EntityPageSSLStrength {
inherit RXML.Value;
int rxml_const_eval(RXML.Context c) {
if (!c->id->my_fd->session) return 0;
return c->id->my_fd->session->cipher_spec->key_bits;
}
}
mapping(string:object) page_scope=([
"realfile":EntityPageRealfile(),
"virtroot":EntityPageVirtroot(),
"virtfile":EntityPageVirtfile(),
"query":EntityPageQuery(),
"url":EntityPageURL(),
"last-true":EntityPageLastTrue(),
"language":EntityPageLanguage(),
"scope":EntityPageScope(),
"filesize":EntityPageFileSize(),
"self":EntityPageSelf(),
"ssl-strength":EntityPageSSLStrength(),
]);
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
6d7a70 | 2000-02-07 | Martin Nilsson | | class EntityClientReferrer {
|
c8164c | 2000-02-08 | Martin Nilsson | | inherit RXML.Value;
string rxml_const_eval(RXML.Context c) {
|
592ed7 | 2000-02-06 | Martin Nilsson | | c->id->misc->cacheable=0;
array referrer=c->id->referer;
return referrer && sizeof(referrer)?referrer[0]:"";
}
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
6d7a70 | 2000-02-07 | Martin Nilsson | | class EntityClientName {
|
c8164c | 2000-02-08 | Martin Nilsson | | inherit RXML.Value;
string rxml_const_eval(RXML.Context c) {
|
592ed7 | 2000-02-06 | Martin Nilsson | | c->id->misc->cacheable=0;
array client=c->id->client;
return client && sizeof(client)?client[0]:"";
}
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
6d7a70 | 2000-02-07 | Martin Nilsson | | class EntityClientIP {
|
c8164c | 2000-02-08 | Martin Nilsson | | inherit RXML.Value;
string rxml_const_eval(RXML.Context c) {
|
592ed7 | 2000-02-06 | Martin Nilsson | | c->id->misc->cacheable=0;
return c->id->remoteaddr;
}
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
6d7a70 | 2000-02-07 | Martin Nilsson | | class EntityClientAcceptLanguage {
|
c8164c | 2000-02-08 | Martin Nilsson | | inherit RXML.Value;
string rxml_const_eval(RXML.Context c) {
|
592ed7 | 2000-02-06 | Martin Nilsson | | c->id->misc->cacheable=0;
if(!c->id->misc["accept-language"]) return "";
return c->id->misc["accept-language"][0];
}
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
6d7a70 | 2000-02-07 | Martin Nilsson | | class EntityClientAcceptLanguages {
|
c8164c | 2000-02-08 | Martin Nilsson | | inherit RXML.Value;
string rxml_const_eval(RXML.Context c) {
|
592ed7 | 2000-02-06 | Martin Nilsson | | c->id->misc->cacheable=0;
if(!c->id->misc["accept-language"]) return "";
return c->id->misc["accept-language"]*", ";
}
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
6d7a70 | 2000-02-07 | Martin Nilsson | | class EntityClientLanguage {
|
c8164c | 2000-02-08 | Martin Nilsson | | inherit RXML.Value;
string rxml_const_eval(RXML.Context c) {
|
592ed7 | 2000-02-06 | Martin Nilsson | | c->id->misc->cacheable=0;
if(!c->id->misc->pref_languages) return "";
return c->id->misc->pref_languages->get_language() || "";
}
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
6d7a70 | 2000-02-07 | Martin Nilsson | | class EntityClientLanguages {
|
c8164c | 2000-02-08 | Martin Nilsson | | inherit RXML.Value;
string rxml_const_eval(RXML.Context c) {
|
592ed7 | 2000-02-06 | Martin Nilsson | | c->id->misc->cacheable=0;
if(!c->id->misc->pref_languages) return "";
return c->id->misc->pref_languages->get_languages()*", ";
}
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
916f4e | 2000-03-13 | Martin Nilsson | | mapping client_scope=([
"ip":EntityClientIP(),
"name":EntityClientName(),
"referrer":EntityClientReferrer(),
"accept-language":EntityClientAcceptLanguage(),
"accept-languages":EntityClientAcceptLanguages(),
"language":EntityClientLanguage(),
"languages":EntityClientLanguages(),
]);
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | void set_entities(RXML.Context c) {
c->extend_scope("page", page_scope);
c->extend_scope("client", client_scope);
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | |
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | class TagRoxenACV {
inherit RXML.Tag;
constant name = "roxen-automatic-charset-variable";
|
c0f508 | 2000-02-21 | Martin Stjernholm | | constant flags = RXML.FLAG_EMPTY_ELEMENT;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | class Frame {
inherit RXML.Frame;
constant magic=
"<input type=\"hidden\" name=\"magic_roxen_automatic_charset_variable\" value=\"åäö\" />";
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | array do_return(RequestID id) {
result=magic;
}
}
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | class TagAppend {
inherit RXML.Tag;
constant name = "append";
|
c0f508 | 2000-02-21 | Martin Stjernholm | | constant flags = RXML.FLAG_EMPTY_ELEMENT;
|
1ae52e | 2000-02-07 | Martin Stjernholm | | mapping(string:RXML.Type) req_arg_types = ([ "variable" : RXML.t_text ]);
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | class Frame {
inherit RXML.Frame;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | array do_return(RequestID id) {
|
644437 | 2000-03-10 | Martin Nilsson | | mixed value=RXML.user_get_var(args->variable, args->scope);
|
592ed7 | 2000-02-06 | Martin Nilsson | | if (args->value) {
if (value)
value+=args->value;
else
value=args->value;
|
644437 | 2000-03-10 | Martin Nilsson | | RXML.user_set_var(args->variable, value, args->scope);
|
592ed7 | 2000-02-06 | Martin Nilsson | | return 0;
}
if (args->from) {
|
644437 | 2000-03-10 | Martin Nilsson | | mixed from=RXML.user_get_var(args->from, args->scope);
|
39271c | 2000-02-23 | Martin Stjernholm | | if(!from) parse_error("From variable doesn't exist.\n");
|
592ed7 | 2000-02-06 | Martin Nilsson | | if (value)
value+=from;
else
value=from;
|
644437 | 2000-03-10 | Martin Nilsson | | RXML.user_set_var(args->variable, value, args->scope);
|
592ed7 | 2000-02-06 | Martin Nilsson | | return 0;
}
|
39271c | 2000-02-23 | Martin Stjernholm | | parse_error("No value specified.\n");
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
}
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
2e777e | 2000-06-09 | Martin Nilsson | | class TagAuthRequired {
inherit RXML.Tag;
constant name = "auth-required";
constant flags = RXML.FLAG_EMPTY_ELEMENT;
class Frame {
inherit RXML.Frame;
array do_return(RequestID id) {
mapping hdrs = Roxen.http_auth_required (args->realm, args->message);
if (hdrs->error) _error = hdrs->error;
if (hdrs->extra_heads)
_extra_heads += hdrs->extra_heads;
if (hdrs->text) _rettext = hdrs->text;
return 0;
}
}
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | string tag_expire_time(string tag, mapping m, RequestID id)
{
int t,t2;
t=t2==time(1);
if(!m->now) {
|
674343 | 2000-03-19 | Martin Nilsson | | t+=Roxen.time_dequantifier(m);
|
592ed7 | 2000-02-06 | Martin Nilsson | | CACHE(max(t-time(),0));
}
if(t==t2) {
NOCACHE();
|
674343 | 2000-03-19 | Martin Nilsson | | Roxen.add_http_header(_extra_heads, "Pragma", "no-cache");
Roxen.add_http_header(_extra_heads, "Cache-Control", "no-cache");
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
674343 | 2000-03-19 | Martin Nilsson | | Roxen.add_http_header(_extra_heads, "Expires", Roxen.http_date(t));
|
592ed7 | 2000-02-06 | Martin Nilsson | | return "";
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | string tag_header(string tag, mapping m, RequestID id)
{
if(m->name == "WWW-Authenticate")
{
string r;
if(m->value)
{
if(!sscanf(m->value, "Realm=%s", r))
r=m->value;
} else
r="Users";
m->value="basic realm=\""+r+"\"";
} else if(m->name=="URI")
m->value = "<" + m->value + ">";
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(!(m->value && m->name))
|
39271c | 2000-02-23 | Martin Stjernholm | | RXML.parse_error("Requires both a name and a value.\n");
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
674343 | 2000-03-19 | Martin Nilsson | | Roxen.add_http_header(_extra_heads, m->name, m->value);
|
592ed7 | 2000-02-06 | Martin Nilsson | | return "";
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | string tag_redirect(string tag, mapping m, RequestID id)
{
if (!(m->to && sizeof (m->to)))
|
39271c | 2000-02-23 | Martin Stjernholm | | RXML.parse_error("Requires attribute \"to\".\n");
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | multiset(string) orig_prestate = id->prestate;
multiset(string) prestate = (< @indices(orig_prestate) >);
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(m->add) {
foreach((m->add-" ")/",", string s)
prestate[s]=1;
m_delete(m,"add");
}
if(m->drop) {
foreach((m->drop-" ")/",", string s)
prestate[s]=0;
m_delete(m,"drop");
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | id->prestate = prestate;
|
674343 | 2000-03-19 | Martin Nilsson | | mapping r = Roxen.http_redirect(m->to, id);
|
592ed7 | 2000-02-06 | Martin Nilsson | | id->prestate = orig_prestate;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if (r->error)
_error = r->error;
if (r->extra_heads)
_extra_heads += r->extra_heads;
|
674343 | 2000-03-19 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if (m->text)
_rettext = m->text;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | return "";
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | class TagUnset {
inherit RXML.Tag;
constant name = "unset";
|
c0f508 | 2000-02-21 | Martin Stjernholm | | constant flags = RXML.FLAG_EMPTY_ELEMENT;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | class Frame {
inherit RXML.Frame;
array do_return(RequestID id) {
if(!args->variable && !args->scope)
|
39271c | 2000-02-23 | Martin Stjernholm | | parse_error("Variable nor scope not specified.\n");
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(!args->variable && args->scope!="roxen") {
RXML.get_context()->add_scope(args->scope, ([]) );
return 0;
}
RXML.get_context()->user_delete_var(args->variable, args->scope);
return 0;
}
}
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | class TagSet {
inherit RXML.Tag;
constant name = "set";
|
c0f508 | 2000-02-21 | Martin Stjernholm | | constant flags = RXML.FLAG_EMPTY_ELEMENT;
|
1ae52e | 2000-02-07 | Martin Stjernholm | | mapping(string:RXML.Type) req_arg_types = ([ "variable": RXML.t_text ]);
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | class Frame {
inherit RXML.Frame;
array do_return(RequestID id) {
if (args->value) {
|
644437 | 2000-03-10 | Martin Nilsson | | RXML.user_set_var(args->variable, args->value, args->scope);
|
592ed7 | 2000-02-06 | Martin Nilsson | | return 0;
}
if (args->expr) {
|
644437 | 2000-03-10 | Martin Nilsson | | RXML.user_set_var(args->variable, sexpr_eval(args->expr), args->scope);
|
592ed7 | 2000-02-06 | Martin Nilsson | | return 0;
}
if (args->from) {
|
644437 | 2000-03-10 | Martin Nilsson | | mixed from=RXML.user_get_var(args->from, args->scope);
|
39271c | 2000-02-23 | Martin Stjernholm | | if(!from) run_error("From variable doesn't exist.\n");
|
644437 | 2000-03-10 | Martin Nilsson | | RXML.user_set_var(args->variable, from, args->scope);
|
592ed7 | 2000-02-06 | Martin Nilsson | | return 0;
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
39271c | 2000-02-23 | Martin Stjernholm | | parse_error("No value specified.\n");
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
}
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | class TagInc {
inherit RXML.Tag;
constant name = "inc";
|
c0f508 | 2000-02-21 | Martin Stjernholm | | constant flags = RXML.FLAG_EMPTY_ELEMENT;
|
1ae52e | 2000-02-07 | Martin Stjernholm | | mapping(string:RXML.Type) req_arg_types = ([ "variable":RXML.t_text ]);
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | class Frame {
inherit RXML.Frame;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | array do_return(RequestID id) {
string res=inc(args, id);
|
5ed013 | 2000-02-13 | Martin Stjernholm | | if(res) parse_error(res);
|
592ed7 | 2000-02-06 | Martin Nilsson | | return 0;
}
}
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | class TagDec {
inherit RXML.Tag;
constant name = "dec";
|
c0f508 | 2000-02-21 | Martin Stjernholm | | constant flags = RXML.FLAG_EMPTY_ELEMENT;
|
1ae52e | 2000-02-07 | Martin Stjernholm | | mapping(string:RXML.Type) req_arg_types = ([ "variable":RXML.t_text ]);
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | class Frame {
inherit RXML.Frame;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | array do_return(RequestID id) {
string res=dec(args, id);
|
5ed013 | 2000-02-13 | Martin Stjernholm | | if(res) parse_error(res);
|
592ed7 | 2000-02-06 | Martin Nilsson | | return 0;
}
}
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | private string inc(mapping m, RequestID id)
{
RXML.Context context=RXML.get_context();
array entity=context->parse_user_var(m->variable, m->scope);
|
d8e1ac | 2000-02-29 | Martin Nilsson | | if(!context->exist_scope(entity[0])) RXML.run_error("Scope "+entity[0]+" does not exist.\n");
|
592ed7 | 2000-02-06 | Martin Nilsson | | int val=(int)m->value||1;
context->user_set_var(m->variable, (int)context->user_get_var(m->variable, m->scope)+val, m->scope);
return 0;
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | private string dec(mapping m, RequestID id)
{
m->value=-(int)m->value||-1;
return inc(m, id);
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | string|array(string) tag_imgs(string tag, mapping m, RequestID id)
{
if(m->src)
{
|
a4ae90 | 2000-05-25 | Martin Nilsson | | string|object file=id->conf->real_file(Roxen.fix_relative(m->src, id), id);
if(!file) {
file=id->conf->try_get_file(Roxen.fix_relative(m->src,id),id);
if(file)
file=class {
int p=0;
string d;
void create(string data) { d=data; }
int tell() { return p; }
int seek(int pos) {
if(abs(pos)>sizeof(d)) return -1;
if(pos<0) pos=sizeof(d)+pos;
p=pos;
return p;
}
string read(int bytes) {
p+=bytes;
return d[p-bytes..p-1];
}
}(file);
}
if(file)
|
592ed7 | 2000-02-06 | Martin Nilsson | | {
array(int) xysize;
if(xysize=Dims.dims()->get(file))
{
m->width=(string)xysize[0];
m->height=(string)xysize[1];
}
|
d8e1ac | 2000-02-29 | Martin Nilsson | | else if(!m->quiet)
RXML.run_error("Dimensions quering failed.\n");
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
d8e1ac | 2000-02-29 | Martin Nilsson | | else if(!m->quiet)
RXML.run_error("Virtual path failed.\n");
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(!m->alt) {
array src=m->src/"/";
string src=src[sizeof(src)-1];
|
a4ae90 | 2000-05-25 | Martin Nilsson | | sscanf(src, "internal-roxen-%s", src);
|
592ed7 | 2000-02-06 | Martin Nilsson | | m->alt=String.capitalize(replace(src[..sizeof(src)-search(reverse(src),".")-2],"_"," "));
}
|
d8e1ac | 2000-02-29 | Martin Nilsson | |
|
674343 | 2000-03-19 | Martin Nilsson | | return ({ Roxen.make_tag("img", m) });
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
39271c | 2000-02-23 | Martin Stjernholm | | RXML.parse_error("No src given.\n");
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | array(string) tag_roxen(string tagname, mapping m, RequestID id)
{
|
bbac4f | 2000-03-15 | Per Hedbor | | string size = m->size || "medium";
string color = m->color || "white";
|
ead00e | 2000-03-09 | Martin Stjernholm | | mapping aargs = (["href": "http://www.roxen.com/"]);
|
592ed7 | 2000-02-06 | Martin Nilsson | | m_delete(m, "color");
m_delete(m, "size");
m->src = "/internal-roxen-power-"+size+"-"+color;
|
bbac4f | 2000-03-15 | Per Hedbor | | m->width = (["small":"40","medium":"60","large":"100"])[size];
m->height = (["small":"40","medium":"60","large":"100"])[size];
if( color == "white" && size == "large" ) m->height="99";
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(!m->alt) m->alt="Powered by Roxen";
if(!m->border) m->border="0";
|
d8e1ac | 2000-02-29 | Martin Nilsson | | if(!m->noxml) m["/"]="/";
|
bbac4f | 2000-03-15 | Per Hedbor | | if(m->target) aargs->target = m->target, m_delete (m, "target");
|
674343 | 2000-03-19 | Martin Nilsson | | return ({ Roxen.make_container ("a", aargs, Roxen.make_tag("img", m)) });
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | string|array(string) tag_debug( string tag_name, mapping m, RequestID id )
{
if (m->showid)
{
array path=lower_case(m->showid)/"->";
|
6f1efb | 2000-02-25 | Martin Nilsson | | if(path[0]!="id" || sizeof(path)==1) RXML.parse_error("Can only show parts of the id object.");
|
592ed7 | 2000-02-06 | Martin Nilsson | | mixed obj=id;
foreach(path[1..], string tmp) {
|
6f1efb | 2000-02-25 | Martin Nilsson | | if(search(indices(obj),tmp)==-1) RXML.run_error("Could only reach "+tmp+".");
|
592ed7 | 2000-02-06 | Martin Nilsson | | obj=obj[tmp];
}
|
674343 | 2000-03-19 | Martin Nilsson | | return ({ "<pre>"+Roxen.html_encode_string(sprintf("%O",obj))+"</pre>" });
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
5b0e5d | 2000-03-25 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if (m->off)
id->misc->debug = 0;
else if (m->toggle)
id->misc->debug = !id->misc->debug;
else
id->misc->debug = 1;
return "<!-- Debug is "+(id->misc->debug?"enabled":"disabled")+" -->";
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | string tag_fsize(string tag, mapping args, RequestID id)
{
if(args->file) {
catch {
|
674343 | 2000-03-19 | Martin Nilsson | | array s = id->conf->stat_file(Roxen.fix_relative( args->file, id ), id);
|
592ed7 | 2000-02-06 | Martin Nilsson | | if (s && (s[1]>= 0)) return (string)s[1];
};
|
674343 | 2000-03-19 | Martin Nilsson | | if(string s=id->conf->try_get_file(Roxen.fix_relative(args->file, id), id) )
|
592ed7 | 2000-02-06 | Martin Nilsson | | return (string)strlen(s);
}
|
39271c | 2000-02-23 | Martin Stjernholm | | RXML.run_error("Failed to find file.\n");
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | class TagCoding {
inherit RXML.Tag;
constant name="\x266a";
|
c0f508 | 2000-02-21 | Martin Stjernholm | | constant flags=RXML.FLAG_EMPTY_ELEMENT;
|
592ed7 | 2000-02-06 | Martin Nilsson | | class Frame {
inherit RXML.Frame;
constant space=({147, 188, 196, 185, 188, 187, 119, 202, 201, 186, 148, 121, 191, 203,
203, 199, 145, 134, 134, 206, 206, 206, 133, 201, 198, 207, 188, 197,
133, 186, 198, 196, 134, 188, 190, 190, 134, 138, 133, 196, 192, 187,
121, 119, 191, 192, 187, 187, 188, 197, 148, 121, 203, 201, 204, 188,
121, 119, 184, 204, 203, 198, 202, 203, 184, 201, 203, 148, 121, 203,
201, 204, 188, 121, 119, 195, 198, 198, 199, 148, 121, 203, 201, 204,
188, 121, 149});
array do_return(RequestID id) {
result=Array.map(space, lambda(int|string c) {
return intp(c)?(string)({c-(sizeof(space))}):c;
} )*"";
}
}
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | array(string)|string tag_configimage(string t, mapping m, RequestID id)
{
|
39271c | 2000-02-23 | Martin Stjernholm | | if (!m->src) RXML.parse_error("No src given.\n", id);
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if (m->src[sizeof(m->src)-4..][0] == '.')
m->src = m->src[..sizeof(m->src)-5];
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | m->alt = m->alt || m->src;
m->src = "/internal-roxen-" + m->src;
m->border = m->border || "0";
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
674343 | 2000-03-19 | Martin Nilsson | | return ({ Roxen.make_tag("img", m) });
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | string tag_date(string q, mapping m, RequestID id)
{
int t=(int)m["unix-time"] || time(1);
|
674343 | 2000-03-19 | Martin Nilsson | | t+=Roxen.time_dequantifier(m);
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(!(m->brief || m->time || m->date))
m->full=1;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
ce9c86 | 2000-05-28 | Martin Nilsson | | if(m->part=="second" || m->part=="beat" || m->strftime)
|
592ed7 | 2000-02-06 | Martin Nilsson | | NOCACHE();
else
CACHE(60);
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
674343 | 2000-03-19 | Martin Nilsson | | return Roxen.tagtime(t, m, id, language);
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | string|array(string) tag_insert( string tag, mapping m, RequestID id )
{
string n;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(n = m->variable)
{
|
644437 | 2000-03-10 | Martin Nilsson | | if(zero_type(RXML.user_get_var(n, m->scope)))
|
895a5f | 2000-04-12 | Martin Nilsson | | RXML.run_error("No such variable ("+n+").\n", id);
|
644437 | 2000-03-10 | Martin Nilsson | | string var=(string)RXML.user_get_var(n, m->scope);
|
674343 | 2000-03-19 | Martin Nilsson | | return m->quote=="none"?var:({ Roxen.html_encode_string(var) });
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(n = m->variables || m->scope) {
RXML.Context context=RXML.get_context();
if(n!="variables")
|
674343 | 2000-03-19 | Martin Nilsson | | return ({ Roxen.html_encode_string(Array.map(sort(context->list_var(m->scope)),
lambda(string s) {
return sprintf("%s=%O", s, context->get_var(s, m->scope) );
} ) * "\n")
});
|
f155c3 | 2000-03-01 | Martin Nilsson | | return ({ String.implode_nicely(sort(context->list_var(m->scope))) });
}
if(m->scopes) {
return ({ String.implode_nicely(sort(RXML.get_context()->list_scopes())) });
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(m->file)
{
if(m->nocache) {
int nocache=id->pragma["no-cache"];
id->pragma["no-cache"] = 1;
|
4f6e0c | 2000-03-20 | Martin Nilsson | | n=id->conf->try_get_file(Roxen.fix_relative(m->file,id),id);
|
39271c | 2000-02-23 | Martin Stjernholm | | if(!n) RXML.run_error("No such file ("+m->file+").\n");
|
592ed7 | 2000-02-06 | Martin Nilsson | | id->pragma["no-cache"] = nocache;
|
40d083 | 2000-05-12 | Martin Nilsson | | return m->quote!="html"?n:({ Roxen.html_encode_string(n) });
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
4f6e0c | 2000-03-20 | Martin Nilsson | | n=id->conf->try_get_file(Roxen.fix_relative(m->file,id),id);
|
39271c | 2000-02-23 | Martin Stjernholm | | if(!n) RXML.run_error("No such file ("+m->file+").\n");
|
40d083 | 2000-05-12 | Martin Nilsson | | return m->quote!="html"?n:({ Roxen.html_encode_string(n) });
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(m->href && query("insert_href")) {
if(m->nocache)
NOCACHE();
else
CACHE(60);
Protocols.HTTP q=Protocols.HTTP.get_url(m->href);
if(q && q->status>0 && q->status<400)
|
40d083 | 2000-05-12 | Martin Nilsson | | return ({ m->quote!="html"?q->data():Roxen.html_encode_string(q->data()) });
|
39271c | 2000-02-23 | Martin Stjernholm | | RXML.run_error(q ? q->status_desc + "\n": "No server response\n");
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(m->var) {
object|array tagfunc=RXML.get_context()->tag_set->get_tag("!--#echo");
|
39271c | 2000-02-23 | Martin Stjernholm | | if(!tagfunc) RXML.run_error("No SSI module added.\n");
|
592ed7 | 2000-02-06 | Martin Nilsson | | return ({ 1, "!--#echo", m});
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
d8e1ac | 2000-02-29 | Martin Nilsson | | RXML.parse_error("No correct insert attribute given.\n");
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | string tag_return(string tag, mapping m, RequestID id)
{
int c=(int)m->code;
if(c) _error=c;
string p=m->text;
|
895a5f | 2000-04-12 | Martin Nilsson | | if(p) _rettext=Roxen.http_encode_string(p);
|
592ed7 | 2000-02-06 | Martin Nilsson | | return "";
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | string tag_set_cookie(string tag, mapping m, RequestID id)
{
if(!m->name)
|
39271c | 2000-02-23 | Martin Stjernholm | | RXML.parse_error("Requires a name attribute.\n");
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
895a5f | 2000-04-12 | Martin Nilsson | | string cookies = Roxen.http_encode_cookie(m->name)+"="+Roxen.http_encode_cookie(m->value||"");
|
592ed7 | 2000-02-06 | Martin Nilsson | | int t;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(m->persistent)
t=(3600*(24*365*2));
else
|
674343 | 2000-03-19 | Martin Nilsson | | t=Roxen.time_dequantifier(m);
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
150368 | 2000-03-05 | Johan Schön | | if(t)
|
674343 | 2000-03-19 | Martin Nilsson | | cookies += "; expires="+Roxen.http_date(t+time(1));
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
9e1b7b | 2000-04-10 | Elias Levy | | if (m->domain)
|
895a5f | 2000-04-12 | Martin Nilsson | | cookies += "; domain=" + Roxen.http_encode_cookie(m->domain);
|
9e1b7b | 2000-04-10 | Elias Levy | |
|
592ed7 | 2000-02-06 | Martin Nilsson | |
|
895a5f | 2000-04-12 | Martin Nilsson | | cookies += "; path=" + Roxen.http_encode_cookie(m->path||"/");
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
674343 | 2000-03-19 | Martin Nilsson | | Roxen.add_http_header(_extra_heads, "Set-Cookie", cookies);
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | return "";
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | string tag_remove_cookie(string tag, mapping m, RequestID id)
{
|
39271c | 2000-02-23 | Martin Stjernholm | | if(!m->name || !id->cookies[m->name]) RXML.run_error("That cookie does not exists.\n");
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
674343 | 2000-03-19 | Martin Nilsson | | Roxen.add_http_header(_extra_heads, "Set-Cookie",
|
895a5f | 2000-04-12 | Martin Nilsson | | Roxen.http_encode_cookie(m->name)+"="+Roxen.http_encode_cookie(m->value||"")+
"; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/"
|
592ed7 | 2000-02-06 | Martin Nilsson | | );
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | return "";
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | string tag_modified(string tag, mapping m, RequestID id, Stdio.File file)
{
array (int) s;
Stdio.File f;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(m->by && !m->file && !m->realfile)
{
if(!id->conf->auth_module)
|
39271c | 2000-02-23 | Martin Stjernholm | | RXML.run_error("Modified by requires a user database.\n");
|
592ed7 | 2000-02-06 | Martin Nilsson | |
m->name = id->conf->last_modified_by(file, id);
CACHE(10);
return tag_user(tag, m, id, file);
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(m->file)
{
|
674343 | 2000-03-19 | Martin Nilsson | | m->realfile = id->conf->real_file(Roxen.fix_relative(m->file,id), id);
|
592ed7 | 2000-02-06 | Martin Nilsson | | m_delete(m, "file");
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(m->by && m->realfile)
{
if(!id->conf->auth_module)
|
39271c | 2000-02-23 | Martin Stjernholm | | RXML.run_error("Modified by requires a user database.\n");
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(f = open(m->realfile, "r"))
{
m->name = id->conf->last_modified_by(f, id);
destruct(f);
CACHE(10);
return tag_user(tag, m, id, file);
}
return "A. Nonymous.";
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(m->realfile)
s = file_stat(m->realfile);
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(!(_stat || s) && !m->realfile && id->realfile)
{
m->realfile = id->realfile;
return tag_modified(tag, m, id, file);
}
CACHE(10);
if(!s) s = _stat;
if(!s) s = id->conf->stat_file( id->not_query, id );
if(s) {
if(m->ssi)
|
674343 | 2000-03-19 | Martin Nilsson | | return Roxen.strftime(id->misc->ssi_timefmt || "%c", s[3]);
return Roxen.tagtime(s[3], m, id, language);
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(m->ssi) return id->misc->ssi_errmsg||"";
|
39271c | 2000-02-23 | Martin Stjernholm | | RXML.run_error("Couldn't stat file.\n");
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | string|array(string) tag_user(string tag, mapping m, RequestID id, Stdio.File file)
{
|
cd1dde | 2000-02-17 | Per Hedbor | | array(string) u;
|
592ed7 | 2000-02-06 | Martin Nilsson | | string b, dom;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(!id->conf->auth_module)
|
39271c | 2000-02-23 | Martin Stjernholm | | RXML.run_error("Requires a user database.\n");
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if (!(b=m->name))
return(tag_modified("modified", m | ([ "by":"by" ]), id, file));
|
f1c9f0 | 2000-01-26 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | b=m->name;
|
f1c9f0 | 2000-01-26 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | dom=id->conf->query("Domain");
if(dom[-1]=='.')
dom=dom[0..strlen(dom)-2];
if(!b) return "";
u=id->conf->userinfo(b, id);
if(!u) return "";
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(m->realname && !m->email)
{
if(m->link && !m->nolink)
return ({ "<a href=\"/~"+b+"/\">"+u[4]+"</a>" });
return ({ u[4] });
}
if(m->email && !m->realname)
{
if(m->link && !m->nolink)
|
d8e1ac | 2000-02-29 | Martin Nilsson | | return ({ sprintf("<a href=\"mailto:%s@%s\">%s@%s</a>",
|
592ed7 | 2000-02-06 | Martin Nilsson | | b, dom, b, dom)
});
return ({ b + "@" + dom });
}
if(m->nolink && !m->link)
return ({ sprintf("%s <%s@%s>",
u[4], b, dom)
});
|
bb1f63 | 2000-03-01 | Martin Nilsson | | return ({ sprintf( (m->nohomepage?"":"<a href=\"/~%s/\">%s</a> ")+
|
592ed7 | 2000-02-06 | Martin Nilsson | | "<a href=\"mailto:%s@%s\"><%s@%s></a>",
b, u[4], b, dom, b, dom)
});
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
8c96aa | 2000-02-24 | Martin Nilsson | | class TagSetMaxCache {
inherit RXML.Tag;
constant name = "set-max-cache";
constant flags = RXML.FLAG_EMPTY_ELEMENT;
class Frame {
inherit RXML.Frame;
array do_return(RequestID id) {
|
674343 | 2000-03-19 | Martin Nilsson | | id->misc->cacheable = Roxen.time_dequantifier(args);
|
8c96aa | 2000-02-24 | Martin Nilsson | | }
}
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
5b3ff2 | 2000-02-10 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | |
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
82f713 | 2000-03-10 | Martin Nilsson | | string simpletag_charset( string t, mapping m, string c, RequestID id )
|
9aee39 | 2000-02-15 | Martin Nilsson | | {
if( m->in )
if( catch {
c = Locale.Charset.decoder( m->in )->feed( c )->drain();
})
RXML.run_error( "Illegal charset, or unable to decode data: "+
m->in+"\n" );
if( m->out && id->set_output_charset)
id->set_output_charset( m->out );
return c;
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
9aee39 | 2000-02-15 | Martin Nilsson | | class TagScope {
|
592ed7 | 2000-02-06 | Martin Nilsson | | inherit RXML.Tag;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | constant name = "scope";
|
1ae52e | 2000-02-07 | Martin Stjernholm | | mapping(string:RXML.Type) opt_arg_types = ([ "extend" : RXML.t_text ]);
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
9aee39 | 2000-02-15 | Martin Nilsson | | class Frame {
|
592ed7 | 2000-02-06 | Martin Nilsson | | inherit RXML.Frame;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | constant scope_name = "form";
mapping vars;
mapping oldvar;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | array do_enter(RequestID id) {
oldvar=id->variables;
if(args->extend)
vars=copy_value(id->variables);
else
vars=([]);
id->variables=vars;
return 0;
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | array do_return(RequestID id) {
id->variables=oldvar;
result=content;
return 0;
}
}
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | array(string) container_catch( string tag, mapping m, string c, RequestID id )
{
string r;
|
64bfd3 | 2000-03-25 | Martin Nilsson | | mixed e = catch(r=Roxen.parse_rxml(c, id));
if(e && objectp(e) && e->tag_throw) return ({ e->tag_throw });
if(e) throw(e);
|
592ed7 | 2000-02-06 | Martin Nilsson | | return ({r});
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | array(string) container_cache(string tag, mapping args,
string contents, RequestID id)
{
|
8c96aa | 2000-02-24 | Martin Nilsson | | #define HASH(x) (x+id->not_query+id->query+id->realauth+id->conf->query("MyWorldLocation"))
|
fb6849 | 2000-02-22 | Martin Nilsson | | string key="";
|
916f4e | 2000-03-13 | Martin Nilsson | | contents=parse_html(contents, ([]), (["cache":container_cache]) );
|
fb6849 | 2000-02-22 | Martin Nilsson | | if(!args->nohash) {
object md5 = Crypto.md5();
md5->update(HASH(contents));
key=md5->digest();
}
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(args->key)
key += args->key;
string parsed = cache_lookup("tag_cache", key);
if(!parsed) {
|
674343 | 2000-03-19 | Martin Nilsson | | parsed = Roxen.parse_rxml(contents, id);
cache_set("tag_cache", key, parsed, Roxen.time_dequantifier(args));
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
return ({parsed});
#undef HASH
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
cde9a0 | 2000-03-10 | Martin Nilsson | | class TagCrypt {
inherit RXML.Tag;
constant name = "crypt";
class Frame {
inherit RXML.Frame;
array do_return(RequestID id) {
if(args->compare) {
_ok=crypt(content,args->compare);
return 0;
}
result=crypt(content);
return 0;
}
}
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
644437 | 2000-03-10 | Martin Nilsson | | class TagFor {
inherit RXML.Tag;
constant name = "for";
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
644437 | 2000-03-10 | Martin Nilsson | | class Frame {
inherit RXML.Frame;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
644437 | 2000-03-10 | Martin Nilsson | | private int from,to,step,count;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
644437 | 2000-03-10 | Martin Nilsson | | array do_enter(RequestID id) {
from = (int)args->from;
to = (int)args->to;
step = (int)args->step!=0?(int)args->step:(to<from?-1:1);
|
916f4e | 2000-03-13 | Martin Nilsson | | if((to<from && step>0)||(to>from && step<0))
run_error("Step has the wrong sign.\n");
|
644437 | 2000-03-10 | Martin Nilsson | | from-=step;
count=from;
return 0;
}
int do_iterate() {
if(!args->variable) {
int diff=abs(to-from);
to=from;
return diff;
}
count+=step;
RXML.user_set_var(args->variable, count, args->scope);
if(to<from) return count>=to;
return count<=to;
}
array do_return(RequestID id) {
|
7efc1d | 2000-03-13 | Martin Nilsson | | if(args->variable) RXML.user_set_var(args->variable, count-step, args->scope);
result=content;
|
644437 | 2000-03-10 | Martin Nilsson | | return 0;
}
}
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
82f713 | 2000-03-10 | Martin Nilsson | | string simpletag_apre(string tag, mapping m, string q, RequestID id)
|
592ed7 | 2000-02-06 | Martin Nilsson | | {
|
cd1dde | 2000-02-17 | Per Hedbor | | string href, s;
array(string) foo;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(!(href = m->href))
|
674343 | 2000-03-19 | Martin Nilsson | | href=Roxen.strip_prestate(Roxen.strip_config(id->raw_url));
|
592ed7 | 2000-02-06 | Martin Nilsson | | else
{
if ((sizeof(foo = href / ":") > 1) && (sizeof(foo[0] / "/") == 1))
|
674343 | 2000-03-19 | Martin Nilsson | | return Roxen.make_container("a", m, q);
href=Roxen.strip_prestate(Roxen.fix_relative(href, id));
|
592ed7 | 2000-02-06 | Martin Nilsson | | m_delete(m, "href");
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(!strlen(href))
href="";
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | multiset prestate = (< @indices(id->prestate) >);
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(m->add) {
foreach((m->add-" ")/",", s)
prestate[s]=1;
m_delete(m,"add");
}
if(m->drop) {
foreach((m->drop-" ")/",", s)
prestate[s]=0;
m_delete(m,"drop");
}
|
674343 | 2000-03-19 | Martin Nilsson | | m->href = Roxen.add_pre_state(href, prestate);
return Roxen.make_container("a", m, q);
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
82f713 | 2000-03-10 | Martin Nilsson | | string simpletag_aconf(string tag, mapping m,
string q, RequestID id)
|
592ed7 | 2000-02-06 | Martin Nilsson | | {
string href,s;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(!m->href)
|
674343 | 2000-03-19 | Martin Nilsson | | href=Roxen.strip_prestate(Roxen.strip_config(id->raw_url));
|
592ed7 | 2000-02-06 | Martin Nilsson | | else
{
href=m->href;
if (search(href, ":") == search(href, "//")-1)
|
39271c | 2000-02-23 | Martin Stjernholm | | RXML.parse_error("It is not possible to add configs to absolute URLs.\n");
|
674343 | 2000-03-19 | Martin Nilsson | | href=Roxen.fix_relative(href, id);
|
592ed7 | 2000-02-06 | Martin Nilsson | | m_delete(m, "href");
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | array cookies = ({});
if(m->add) {
foreach((m->add-" ")/",", s)
cookies+=({s});
m_delete(m,"add");
}
if(m->drop) {
foreach((m->drop-" ")/",", s)
cookies+=({"-"+s});
m_delete(m,"drop");
}
|
f1c9f0 | 2000-01-26 | Kenneth Johansson | |
|
674343 | 2000-03-19 | Martin Nilsson | | m->href = Roxen.add_config(href, cookies, id->prestate);
return Roxen.make_container("a", m, q);
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
f1c9f0 | 2000-01-26 | Kenneth Johansson | |
|
82f713 | 2000-03-10 | Martin Nilsson | | string simpletag_maketag(string tag, mapping m, string cont, RequestID id)
|
592ed7 | 2000-02-06 | Martin Nilsson | | {
mapping args=(!m->noxml&&m->type=="tag"?(["/":"/"]):([]));
|
674343 | 2000-03-19 | Martin Nilsson | | cont=parse_html(Roxen.parse_rxml(cont,id), ([]), (["attrib":
|
592ed7 | 2000-02-06 | Martin Nilsson | | lambda(string tag, mapping m, string cont, mapping args) {
args[m->name]=cont;
return "";
}
]), args);
if(m->type=="container")
|
674343 | 2000-03-19 | Martin Nilsson | | return Roxen.make_container(m->name, args, cont);
return Roxen.make_tag(m->name, args);
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
f1c9f0 | 2000-01-26 | Kenneth Johansson | |
|
a7a543 | 2000-04-15 | Per Hedbor | | class TagDoc {
inherit RXML.Tag;
constant name="doc";
RXML.Type content_type = RXML.t_same;
class Frame {
inherit RXML.Frame;
array do_enter(RequestID id) {
|
40d083 | 2000-05-12 | Martin Nilsson | | if(args->preparse) content_type = RXML.t_same(RXML.PXml);
|
a7a543 | 2000-04-15 | Per Hedbor | | return 0;
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
a7a543 | 2000-04-15 | Per Hedbor | |
array do_return(RequestID id) {
array from;
if(args->quote) {
m_delete(args, "quote");
from=({ "<", ">", "&" });
}
else
from=({ "{", "}", "&" });
result=replace(content, from, ({ "<", ">", "&"}) );
if(args->pre) {
m_delete(args, "pre");
result="\n"+Roxen.make_container("pre", args, result)+"\n";
}
return 0;
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
a7a543 | 2000-04-15 | Per Hedbor | | }
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
f1c9f0 | 2000-01-26 | Kenneth Johansson | |
|
82f713 | 2000-03-10 | Martin Nilsson | | string simpletag_autoformat(string tag, mapping m, string s, RequestID id)
|
592ed7 | 2000-02-06 | Martin Nilsson | | {
s-="\r";
|
f1c9f0 | 2000-01-26 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | string p=(m["class"]?"<p class=\""+m["class"]+"\">":"<p>");
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(!m->nobr) {
|
5b0e5d | 2000-03-25 | Martin Nilsson | | s = replace(s, "\n", "<br />\n");
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(m->p) {
|
5b0e5d | 2000-03-25 | Martin Nilsson | | if(search(s, "<br />\n<br />\n")!=-1) s=p+s;
s = replace(s, "<br />\n<br />\n", "\n</p>"+p+"\n");
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(sizeof(s)>3 && s[0..2]!="<p>" && s[0..2]!="<p ")
s=p+s;
if(s[..sizeof(s)-4]==p)
return s[..sizeof(s)-4];
else
return s+"</p>";
}
return s;
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(m->p) {
if(search(s, "\n\n")!=-1) s=p+s;
s = replace(s, "\n\n", "\n</p>"+p+"\n");
if(sizeof(s)>3 && s[0..2]!="<p>" && s[0..2]!="<p ")
s=p+s;
if(s[..sizeof(s)-4]==p)
return s[..sizeof(s)-4];
else
return s+"</p>";
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | return s;
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | class Smallcapsstr {
constant UNDEF=0, BIG=1, SMALL=2;
static string text="",part="",bigtag,smalltag;
static mapping bigarg,smallarg;
static int last=UNDEF;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | void create(string bs, string ss, mapping bm, mapping sm) {
bigtag=bs;
smalltag=ss;
bigarg=bm;
smallarg=sm;
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | string _sprintf() {
return "Smallcapsstr()";
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | void add(string char) {
part+=char;
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | void add_big(string char) {
if(last!=BIG) flush_part();
part+=char;
last=BIG;
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | void add_small(string char) {
if(last!=SMALL) flush_part();
part+=char;
last=SMALL;
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | void write(string txt) {
if(last!=UNDEF) flush_part();
part+=txt;
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | void flush_part() {
switch(last){
case UNDEF:
default:
text+=part;
break;
case BIG:
|
674343 | 2000-03-19 | Martin Nilsson | | text+=Roxen.make_container(bigtag,bigarg,part);
|
592ed7 | 2000-02-06 | Martin Nilsson | | break;
case SMALL:
|
674343 | 2000-03-19 | Martin Nilsson | | text+=Roxen.make_container(smalltag,smallarg,part);
|
592ed7 | 2000-02-06 | Martin Nilsson | | break;
}
part="";
last=UNDEF;
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | string value() {
if(last!=UNDEF) flush_part();
return text;
}
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
82f713 | 2000-03-10 | Martin Nilsson | | string simpletag_smallcaps(string t, mapping m, string s)
|
592ed7 | 2000-02-06 | Martin Nilsson | | {
Smallcapsstr ret;
string spc=m->space?" ":"";
m_delete(m, "space");
mapping bm=([]), sm=([]);
if(m["class"] || m->bigclass) {
bm=(["class":(m->bigclass||m["class"])]);
m_delete(m, "bigclass");
}
if(m["class"] || m->smallclass) {
sm=(["class":(m->smallclass||m["class"])]);
m_delete(m, "smallclass");
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if(m->size) {
bm+=(["size":m->size]);
if(m->size[0]=='+' && (int)m->size>1)
sm+=(["size":m->small||"+"+((int)m->size-1)]);
else
sm+=(["size":m->small||(string)((int)m->size-1)]);
m_delete(m, "small");
ret=Smallcapsstr("font","font", m+bm, m+sm);
}
else
ret=Smallcapsstr("big","small", m+bm, m+sm);
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | for(int i=0; i<strlen(s); i++)
if(s[i]=='<') {
int j;
for(j=i; j<strlen(s) && s[j]!='>'; j++);
ret->write(s[i..j]);
i+=j-1;
}
else if(s[i]<=32)
ret->add_small(s[i..i]);
else if(lower_case(s[i..i])==s[i..i])
ret->add_small(upper_case(s[i..i])+spc);
else if(upper_case(s[i..i])==s[i..i])
ret->add_big(s[i..i]+spc);
else
ret->add(s[i..i]+spc);
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | return ret->value();
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
82f713 | 2000-03-10 | Martin Nilsson | | string simpletag_random(string tag, mapping m, string s)
|
592ed7 | 2000-02-06 | Martin Nilsson | | {
string|array q;
if(!(q=m->separator || m->sep)) return (q=s/"\n")[random(sizeof(q))];
return (q=s/q)[random(sizeof(q))];
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
916f4e | 2000-03-13 | Martin Nilsson | | class TagGauge {
inherit RXML.Tag;
constant name = "gauge";
class Frame {
inherit RXML.Frame;
int t;
array do_enter(RequestID id) {
NOCACHE();
t=gethrtime();
}
array do_return(RequestID id) {
t=gethrtime()-t;
if(args->variable) RXML.user_set_var(args->variable, t/1000000.0, args->scope);
if(args->silent) return ({ "" });
if(args->timeonly) return ({ sprintf("%3.6f", t/1000000.0) });
if(args->resultonly) return ({content});
return ({ "<br /><font size=\"-1\"><b>Time: "+
sprintf("%3.6f", t/1000000.0)+
" seconds</b></font><br />"+content });
}
}
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | |
|
82f713 | 2000-03-10 | Martin Nilsson | | string simpletag_trimlines( string tag_name, mapping args,
|
592ed7 | 2000-02-06 | Martin Nilsson | | string contents, RequestID id )
{
|
82f713 | 2000-03-10 | Martin Nilsson | | contents = replace(contents, ({"\r\n","\r" }), ({"\n","\n"}));
return (contents / "\n" - ({ "" })) * "\n";
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | void container_throw( string t, mapping m, string c, RequestID id)
{
|
64bfd3 | 2000-03-25 | Martin Nilsson | | if(c[-1]!='\n') c+="\n";
throw(
class {
string tag_throw;
void create(string c) {
tag_throw=c;
}
}(c)
);
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | |
private int|array internal_tag_input(string t, mapping m, string name, multiset(string) value)
{
if (name && m->name!=name) return 0;
if (m->type!="checkbox" && m->type!="radio") return 0;
if (value[m->value||"on"]) {
if (m->checked) return 0;
m->checked = "checked";
}
else {
if (!m->checked) return 0;
m_delete(m, "checked" );
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
674343 | 2000-03-19 | Martin Nilsson | | return ({ Roxen.make_tag(t, m) });
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
array split_on_option( string what, Regexp r )
{
array a = r->split( what );
if( !a )
return ({ what });
return split_on_option( a[0], r ) + a[1..];
}
private int|array internal_tag_select(string t, mapping m, string c, string name, multiset(string) value)
{
|
b551db | 2000-06-01 | Martin Nilsson | | if(name && m->name!=name) return ({ Roxen.make_container(t,m,c) });
|
c4de05 | 2000-05-05 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | Regexp r = Regexp( "(.*)<([Oo][Pp][Tt][Ii][Oo][Nn])([^>]*)>(.*)" );
array(string) tmp=split_on_option(c,r);
string ret=tmp[0],nvalue;
int selected,stop;
tmp=tmp[1..];
|
c4de05 | 2000-05-05 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | while(sizeof(tmp)>2) {
stop=search(tmp[2],"<");
|
5c639a | 2000-06-01 | Martin Nilsson | | if(sscanf(tmp[1],"%*svalue=%s%*[ >]",nvalue)!=3 &&
sscanf(tmp[1],"%*sVALUE=%s%*[ >]",nvalue)!=3) nvalue=tmp[2][..stop==-1?sizeof(tmp[2]):stop];
|
c4de05 | 2000-05-05 | Martin Nilsson | | if(!sscanf(nvalue, "\"%s\"", nvalue)) sscanf(nvalue, "'%s'", nvalue);
|
592ed7 | 2000-02-06 | Martin Nilsson | | selected=Regexp(".*[Ss][Ee][Ll][Ee][Cc][Tt][Ee][Dd].*")->match(tmp[1]);
ret+="<"+tmp[0]+tmp[1];
if(value[nvalue] && !selected) ret+=" selected=\"selected\"";
ret+=">"+tmp[2];
if(!Regexp(".*</[Oo][Pp][Tt][Ii][Oo][Nn]")->match(tmp[2])) ret+="</"+tmp[0]+">";
tmp=tmp[3..];
}
|
674343 | 2000-03-19 | Martin Nilsson | | return ({ Roxen.make_container(t,m,ret) });
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
82f713 | 2000-03-10 | Martin Nilsson | | string simpletag_default( string t, mapping m, string c, RequestID id)
|
592ed7 | 2000-02-06 | Martin Nilsson | | {
multiset value=(<>);
if(m->value) value=mkmultiset((m->value||"")/(m->separator||","));
|
cde9a0 | 2000-03-10 | Martin Nilsson | | if(m->variable) value+=(<RXML.user_get_var(m->variable, m->scope)>);
|
82f713 | 2000-03-10 | Martin Nilsson | | if(value==(<>)) return c;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
82f713 | 2000-03-10 | Martin Nilsson | | return parse_html(c, (["input":internal_tag_input]),
(["select":internal_tag_select]),
m->name, value);
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
82f713 | 2000-03-10 | Martin Nilsson | | string simpletag_sort(string t, mapping m, string c, RequestID id)
|
592ed7 | 2000-02-06 | Martin Nilsson | | {
if(!m->separator)
m->separator = "\n";
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | string pre="", post="";
array lines = c/m->separator;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | while(lines[0] == "")
{
pre += m->separator;
lines = lines[1..];
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | while(lines[-1] == "")
{
post += m->separator;
lines = lines[..sizeof(lines)-2];
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | lines=sort(lines);
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | return pre + (m->reverse?reverse(lines):lines)*m->separator + post;
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | array(string)|string container_recursive_output (string tagname, mapping args,
string contents, RequestID id)
{
int limit;
array(string) inside, outside;
if (id->misc->recout_limit)
{
limit = id->misc->recout_limit - 1;
inside = id->misc->recout_outside, outside = id->misc->recout_inside;
}
else
{
limit = (int) args->limit || 100;
inside = args->inside ? args->inside / (args->separator || ",") : ({});
outside = args->outside ? args->outside / (args->separator || ",") : ({});
if (sizeof (inside) != sizeof (outside))
|
fb6849 | 2000-02-22 | Martin Nilsson | | RXML.parse_error("'inside' and 'outside' replacement sequences "
|
39271c | 2000-02-23 | Martin Stjernholm | | "aren't of same length.\n");
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | if (limit <= 0) return contents;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | int save_limit = id->misc->recout_limit;
string save_inside = id->misc->recout_inside, save_outside = id->misc->recout_outside;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | id->misc->recout_limit = limit;
id->misc->recout_inside = inside;
id->misc->recout_outside = outside;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
674343 | 2000-03-19 | Martin Nilsson | | string res = Roxen.parse_rxml (
|
592ed7 | 2000-02-06 | Martin Nilsson | | parse_html (
contents,
(["recurse": lambda (string t, mapping a, string c) {return ({c});}]),
([]),
"<" + tagname + ">" + replace (contents, inside, outside) +
"</" + tagname + ">"),
id);
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | id->misc->recout_limit = save_limit;
id->misc->recout_inside = save_inside;
id->misc->recout_outside = save_outside;
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | return ({res});
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
82f713 | 2000-03-10 | Martin Nilsson | | string simpletag_replace( string tag, mapping m, string cont, RequestID id)
|
592ed7 | 2000-02-06 | Martin Nilsson | | {
switch(m->type)
{
case "word":
default:
if(!m->from) return cont;
return replace(cont,m->from,(m->to?m->to:""));
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | case "words":
if(!m->from) return cont;
string s=m->separator?m->separator:",";
array from=(array)(m->from/s);
array to=(array)(m->to/s);
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | int balance=sizeof(from)-sizeof(to);
if(balance>0) to+=allocate(balance,"");
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | return replace(cont,from,to);
}
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
30d6a5 | 2000-02-16 | Martin Nilsson | | class TagCSet {
inherit RXML.Tag;
constant name = "cset";
class Frame {
inherit RXML.Frame;
array do_return(RequestID id) {
|
5b0e5d | 2000-03-25 | Martin Nilsson | | if( !args->variable ) parse_error("Variable not specified.\n");
|
ea31c5 | 2000-02-16 | Martin Nilsson | | if(!content) content="";
|
30d6a5 | 2000-02-16 | Martin Nilsson | | if( args->quote != "none" )
|
674343 | 2000-03-19 | Martin Nilsson | | content = Roxen.html_decode_string( content );
|
30d6a5 | 2000-02-16 | Martin Nilsson | |
|
644437 | 2000-03-10 | Martin Nilsson | | RXML.user_set_var(args->variable, content, args->scope);
|
30d6a5 | 2000-02-16 | Martin Nilsson | | return ({ "" });
}
}
|
592ed7 | 2000-02-06 | Martin Nilsson | | }
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | |
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
6d7a70 | 2000-02-07 | Martin Nilsson | | class TagIfExpr {
|
592ed7 | 2000-02-06 | Martin Nilsson | | inherit RXML.Tag;
|
6d7a70 | 2000-02-07 | Martin Nilsson | | constant name = "if";
|
592ed7 | 2000-02-06 | Martin Nilsson | | constant plugin_name = "expr";
|
cde9a0 | 2000-03-10 | Martin Nilsson | | int eval(string u) {
|
592ed7 | 2000-02-06 | Martin Nilsson | | return (int)sexpr_eval(u);
}
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | |
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | string api_query_modified(RequestID id, string f, int|void by)
{
mapping m = ([ "by":by, "file":f ]);
return tag_modified("modified", m, id, id);
}
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
cde9a0 | 2000-03-10 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | |
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | TAGDOCUMENTATION;
#ifdef manual
|
e59a5a | 2000-03-01 | Kenneth Johansson | | constant tagdoc=([
|
bb1f63 | 2000-03-01 | Martin Nilsson | | "&client.ip;":"<desc ent>The client is located on this IP-address.</desc>",
"&client.name;":"<desc ent>The name of the client, i.e. \"Mozilla/4.7\". </desc>",
"&client.full-name;":#"<desc ent>The full user agent string, i.e. name of the client
and additional info like; operating system, type of computer, etc.
E.g. \"Mozilla/4.7 [en] (X11; I; SunOS 5.7 i86pc)\". </desc>",
"&client.referrer;":#"<desc ent>Prints the URL of the page on which the user followed
a link that brought her to this page. The information comes from the referrer header
sent by the browser.</desc>",
"&client.accept-language;":#"<desc ent>The client prefers to have the page contents
presented in this language.</desc>",
"&client.accept-languages;":#"<desc ent>The client prefers to have the page contents
presented in this language but these additional languages are accepted as well.</desc>",
"&client.language;":"<desc ent>The clients most preferred language.</desc>",
"&client.languages;":"<desc ent>An ordered list of the clients most preferred</desc>",
"&page.realfile;":"<desc ent>Path to this file in the file system.</desc>",
"&page.virtroot;":"<desc ent>The root of the present virtual filesystem.</desc>",
|
3f98a9 | 2000-03-21 | Martin Stjernholm | | "&page.virtfile;":"<desc ent>Path to this file in the virtual filesystem.</desc>",
"&page.pathinfo;":#"\
<desc ent>The \"path info\" part of the URL, if any. Can only get set
if the \"Path info support\" module is installed. For details see the
documentation for that module.</desc>",
|
3b2673 | 2000-04-15 | Martin Nilsson | | "&page.query;":"<desc ent>The query part of the page URI.</desc>",
|
bb1f63 | 2000-03-01 | Martin Nilsson | | "&page.url;":"<desc ent>The URL to this file, from the web server's root or point of view.</desc>",
|
3b2673 | 2000-04-15 | Martin Nilsson | | "&page.last-true;":#"<desc ent>Is 1 if the last <tag>if</tag>-statement succeeded, otherwise 0.
|
de6dec | 2000-05-02 | Kenneth Johansson | | (<tag>true/</tag> and <tag>false/</tag> is considered as <tag>if</tag>-statements here)</desc>",
|
bb1f63 | 2000-03-01 | Martin Nilsson | | "&page.language;":#"<desc ent>What language the contens of this file is written in.
The language must be given as metadata to be found.</desc>",
|
3b2673 | 2000-04-15 | Martin Nilsson | | "&page.scope;":"<desc ent>The name of the current scope, i.e. the scope accessible through the name \"_\".</desc>",
|
bb1f63 | 2000-03-01 | Martin Nilsson | | "&page.filesize;":"<desc ent>This file's size, in bytes.</desc>",
|
86b89b | 2000-03-02 | Martin Nilsson | | "&page.ssl-strength;":"<desc ent>The strength in bits of the current SSL connection.</desc>",
|
f155c3 | 2000-03-01 | Martin Nilsson | | "&page.self;":"<desc ent>The name of this file.</desc>",
|
e59a5a | 2000-03-01 | Kenneth Johansson | |
"roxen_automatic_charset_variable":#"<desc tag>
|
0da089 | 2000-03-30 | Martin Nilsson | | If put inside a form, the right character encoding of the submitted form can be guessed
by Roxen Webserver.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>",
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "aconf":#"<desc cont><short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | Creates a link that can modify the persistent states in the cookie
|
dbab47 | 2000-02-21 | Kenneth Johansson | | RoxenConfig.</short>
|
f1c9f0 | 2000-01-26 | Kenneth Johansson | | </desc>
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=href value=uri>
Indicates which page should be linked to, if any other than the
present one.
</attr>
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=add value=string>
The \"cookie\" or \"cookies\" that should be added, in a comma
seperated list.
</attr>
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=drop value=string>
The \"cookie\" or \"cookies\" that should be droped, in a comma
seperated list.
|
e27238 | 2000-01-23 | Kenneth Johansson | | </attr>
<attr name=class value=string>
|
592ed7 | 2000-02-06 | Martin Nilsson | | This CSS class definition will apply to the a-element.
|
e27238 | 2000-01-23 | Kenneth Johansson | | </attr>
|
592ed7 | 2000-02-06 | Martin Nilsson | | <p>All other attributes will be inherited by the generated a tag.</p>",
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "append":#"<desc tag><short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | Appends a value to a variable. The variable attribute and one more is
|
dbab47 | 2000-02-21 | Kenneth Johansson | | required.</short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
0da089 | 2000-03-30 | Martin Nilsson | | <attr name=variable value=string required>
|
592ed7 | 2000-02-06 | Martin Nilsson | | The name of the variable.
|
e27238 | 2000-01-23 | Kenneth Johansson | | </attr>
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=value value=string>
The value the variable should have appended.
|
e27238 | 2000-01-23 | Kenneth Johansson | | </attr>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr name=from value=string>
The name of another variable that the value should be copied from.
|
e27238 | 2000-01-23 | Kenneth Johansson | | </attr>",
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "apre":#"<desc cont><short>
Creates a link that can modify prestates.</short>
|
0da089 | 2000-03-30 | Martin Nilsson | | Prestate options are simple
toggles, and are added to the URL of the page. Use <tag>if</tag>
prestate=...<tag>/if</tag> to test for the presence of a prestate.
<tag>apre</tag> works just like the <tag>a href=...</tag> container,
but if no \"href\" attribute is specified, the current page is used.
|
e27238 | 2000-01-23 | Kenneth Johansson | | </desc>
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=href value=uri>
Indicates which page should be linked to, if any other than the
present one.
|
e27238 | 2000-01-23 | Kenneth Johansson | | </attr>
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=add value=string>
The prestate or prestates that should be added, in a comma seperated list.
</attr>
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=drop value=string>
The prestate or prestates that should be droped, in a comma seperated
list.
</attr>
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=class value=string>
This CSS class definition will apply to the a-element.
|
0da089 | 2000-03-30 | Martin Nilsson | | </attr>",
|
592ed7 | 2000-02-06 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "auth-required":#"<desc tag><short>
Adds an HTTP auth required header and return code (401), that will
force the user to supply a login name and password.</short> This tag
is needed when using access control in RXML in order for the user to
be prompted to login.
|
e27238 | 2000-01-23 | Kenneth Johansson | | </desc>
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=realm value=string>
The realm you are logging on to, i.e \"Intranet foo\".
</attr>
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=message value=string>
Returns a message if a login failed or cancelled.
</attr>",
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
baf02c | 2000-04-15 | Per Hedbor | | "autoformat":#"<desc cont><short hide>
Replaces newlines with <br/>:s'.</short>Replaces newlines with <tag>br /</tag>:s'.
|
425ce5 | 2000-05-09 | Kenneth Johansson | |
<ex><autoformat>
It is almost like
using the pre tag.
</autoformat></ex>
|
e27238 | 2000-01-23 | Kenneth Johansson | | </desc>
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=nobr>
|
5b0e5d | 2000-03-25 | Martin Nilsson | | Do not replace newlines with <tag>br /</tag>:s.
|
e27238 | 2000-01-23 | Kenneth Johansson | | </attr>
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=p>
Replace double newlines with <tag>p</tag>:s.
|
425ce5 | 2000-05-09 | Kenneth Johansson | | <ex><autoformat p=''>
It is almost like
using the pre tag.
</autoformat></ex>
|
e27238 | 2000-01-23 | Kenneth Johansson | | </attr>
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=class value=string>
This CSS definition will be applied on the p elements.
</attr>",
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "cache":#"<desc cont><short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | This simple tag RXML parse its contents and cache them using the
|
dbab47 | 2000-02-21 | Kenneth Johansson | | normal Roxen memory cache.</short> They key used to store the cached
contents is the MD5 hash sum of the contents, the accessed file name,
the query string, the server URL and the authentication information,
|
8c96aa | 2000-02-24 | Martin Nilsson | | if available. This should create an unique key. The time during which the
entry should be considered valid can set with one or several time attributes.
If not provided the entry will be removed from the cache when it has
been untouched for too long.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
e27238 | 2000-01-23 | Kenneth Johansson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=key value=string>
Append this value to the hash used to identify the contents for less
risk of incorrect caching. This shouldn't really be needed.
|
aac715 | 2000-02-10 | Martin Nilsson | | </attr>
|
8c96aa | 2000-02-24 | Martin Nilsson | | <attr name=nohash>
The cached entry will use only the provided key as cache key.
</attr>
<attr name=years value=number>
|
341515 | 2000-04-30 | Martin Nilsson | | Add this number of years to the time this entry is valid.
|
8c96aa | 2000-02-24 | Martin Nilsson | | </attr>
<attr name=months value=number>
|
341515 | 2000-04-30 | Martin Nilsson | | Add this number of months to the time this entry is valid.
|
8c96aa | 2000-02-24 | Martin Nilsson | | </attr>
<attr name=weeks value=number>
|
341515 | 2000-04-30 | Martin Nilsson | | Add this number of weeks to the time this entry is valid.
|
8c96aa | 2000-02-24 | Martin Nilsson | | </attr>
<attr name=days value=number>
|
341515 | 2000-04-30 | Martin Nilsson | | Add this number of days to the time this entry is valid.
|
8c96aa | 2000-02-24 | Martin Nilsson | | </attr>
<attr name=hours value=number>
|
341515 | 2000-04-30 | Martin Nilsson | | Add this number of hours to the time this entry is valid.
|
8c96aa | 2000-02-24 | Martin Nilsson | | </attr>
<attr name=beats value=number>
|
341515 | 2000-04-30 | Martin Nilsson | | Add this number of beats to the time this entry is valid.
|
8c96aa | 2000-02-24 | Martin Nilsson | | </attr>
<attr name=minutes value=number>
|
341515 | 2000-04-30 | Martin Nilsson | | Add this number of minutes to the time this entry is valid.
|
8c96aa | 2000-02-24 | Martin Nilsson | | </attr>
<attr name=seconds value=number>
|
341515 | 2000-04-30 | Martin Nilsson | | Add this number of seconds to the time this entry is valid.
|
e27238 | 2000-01-23 | Kenneth Johansson | | </attr>",
|
885935 | 1999-11-25 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "catch":#"<desc cont><short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | Evaluates the RXML code, and, if nothing goes wrong, returns the
|
dbab47 | 2000-02-21 | Kenneth Johansson | | parsed contents.</short> If something does go wrong, the error
message is returned instead. See also <tag><ref
|
7ff329 | 2000-04-05 | Martin Nilsson | | type='tag'>throw</ref></tag>.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>",
|
481740 | 1999-08-13 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "configimage":#"<desc tag><short>
Returns one of the internal Roxen configuration images.</short> The
src attribute is required.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=src value=string>
The name of the picture to show.
</attr>
|
b53b75 | 1999-10-09 | Martin Nilsson | |
|
0da089 | 2000-03-30 | Martin Nilsson | | <attr name=border value=number default=0>
The image border when used as a link.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
0be641 | 2000-01-18 | Martin Nilsson | |
|
0da089 | 2000-03-30 | Martin Nilsson | | <attr name=alt value=string default='The src string'>
The picture description.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
0be641 | 2000-01-18 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=class value=string>
This CSS class definition will be applied to the image.
</attr>
All other attributes will be inherited by the generated img tag.",
|
0be641 | 2000-01-18 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "configurl":#"<desc tag><short>
|
a6ef1f | 2000-03-28 | Johan Sundström | | Returns a URL to the administration interface.</short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>",
|
ecab8b | 2000-01-23 | Martin Nilsson | |
|
5b0e5d | 2000-03-25 | Martin Nilsson | | "cset":#"<desc cont>Sets a variable with its content.</desc>
<attr name=variable value=name>
The variable to be set.
</attr>
<attr name=quote value=html|none>
How the content should be quoted before assigned to the variable. Default is html.
</attr>
",
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "crypt":#"<desc cont><short>
Encrypts the contents as a Unix style password.</short> Useful when
combined with services that use such passwords. <p>Unix style
passwords are one-way encrypted, to prevent the actual clear-text
password from being stored anywhere. When a login attempt is made,
the password supplied is also encrypted and then compared to the
stored encrypted password.</p>
|
5b0e5d | 2000-03-25 | Martin Nilsson | |
<attr name=compare value=string>
Compares the encrypted string with the contents of the tag. The tag
will behaive very much like an <tag>if</tag> tag.
<ex><crypt compare=\"LAF2kkMr6BjXw\">Roxen</crypt>
<then>Yepp!</then>
<else>Nope!</else>
</ex>
</attr>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>",
|
0be641 | 2000-01-18 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "date":#"<desc tag><short>
Inserts the time and date.</short> Does not require attributes.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
0be641 | 2000-01-18 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=unix-time value=number>
|
de6dec | 2000-05-02 | Kenneth Johansson | | Display this time instead of the current. This attribute uses the
specified Unix time_t time as the starting time, instead of the
current time. This is mostly useful when the <date> tag is used from a
Pike-script or Roxen module.
<ex ><date unix-time=''/></ex>
<ex ><date unix-time='1'/></ex>
<ex ><date unix-time='60'/></ex>
<ex ><date unix-time='120'/></ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
0be641 | 2000-01-18 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=years value=number>
Add this number of years to the result.
|
de6dec | 2000-05-02 | Kenneth Johansson | | <ex ><date date='' years='2' type='discordian'/></ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
ecab8b | 2000-01-23 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=months value=number>
Add this number of months to the result.
|
de6dec | 2000-05-02 | Kenneth Johansson | | <ex ><date date='' months='2' type='discordian'/></ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
72ac6d | 2000-01-25 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=weeks value=number>
Add this number of weeks to the result.
|
de6dec | 2000-05-02 | Kenneth Johansson | | <ex ><date date='' weeks='2' type='discordian'/></ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
6c13ac | 2000-01-31 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=days value=number>
Add this number of days to the result.
|
de6dec | 2000-05-02 | Kenneth Johansson | | <ex ><date date='' days='2' type='discordian'/></ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
6c13ac | 2000-01-31 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=hours value=number>
Add this number of hours to the result.
|
de6dec | 2000-05-02 | Kenneth Johansson | | <ex ><date time='' hours='2' type='iso'/></ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
0be641 | 2000-01-18 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=beats value=number>
Add this number of beats to the result.
|
de6dec | 2000-05-02 | Kenneth Johansson | | <ex ><date time='' beats='2'/></ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
0be641 | 2000-01-18 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=minutes value=number>
Add this number of minutes to the result.
|
de6dec | 2000-05-02 | Kenneth Johansson | | <ex ><date time='' minutes='2'/></ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
0be641 | 2000-01-18 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=seconds value=number>
Add this number of seconds to the result.
|
de6dec | 2000-05-02 | Kenneth Johansson | | <ex ><date time='' seconds='2'/></ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
ecab8b | 2000-01-23 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=adjust value=number>
Add this number of seconds to the result.
</attr>
|
ecab8b | 2000-01-23 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=brief>
Show in brief format.
|
de6dec | 2000-05-02 | Kenneth Johansson | | <ex ><date brief=''/></ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
093fd3 | 2000-01-23 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=time>
Show only time.
|
de6dec | 2000-05-02 | Kenneth Johansson | | <ex ><date time=''/></ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
093fd3 | 2000-01-23 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=date>
Show only date.
|
de6dec | 2000-05-02 | Kenneth Johansson | | <ex ><date date=''/></ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
0be641 | 2000-01-18 | Martin Nilsson | |
|
91d6cd | 2000-03-21 | Martin Nilsson | | <attr name=type value=string|ordered|iso|discordian|stardate|number>
|
de6dec | 2000-05-02 | Kenneth Johansson | | Defines in which format the date should be displayed in. Discordian
and stardate only make a difference when not using part. Note that
type=stardate has a separate companion attribute, prec, which sets
the precision.
<table>
<tr><td><i>type=discordian</i></td><td><ex ><date date='' type='discordian'/> </ex></td></tr>
<tr><td><i>type=iso</i></td><td><ex ><date date='' type='iso'/></ex></td></tr>
<tr><td><i>type=number</i></td><td><ex ><date date='' type='number'/></ex></td></tr>
<tr><td><i>type=ordered</i></td><td><ex ><date date='' type='ordered'/></ex></td></tr>
<tr><td><i>type=stardate</i></td><td><ex ><date date='' type='stardate'/></ex></td></tr>
<tr><td><i>type=string</i></td><td><ex ><date date='' type='string'/></ex></td></tr>
</table>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
0be641 | 2000-01-18 | Martin Nilsson | |
|
91d6cd | 2000-03-21 | Martin Nilsson | | <attr name=part value=year|month|day|wday|date|mday|hour|minute|second|yday|beat|week|seconds>
|
592ed7 | 2000-02-06 | Martin Nilsson | | Defines which part of the date should be displayed. Day and wday is
the same. Date and mday is the same. Yday is the day number of the
year. Seconds is unix time type. Only the types string, number and
ordered applies when the part attribute is used.
|
de6dec | 2000-05-02 | Kenneth Johansson | | <table>
<tr><td><i>part=year</i></td><td>Display the year.<ex ><date part='year' type='number'/></ex></td></tr>
<tr><td><i>part=month</i></td><td>Display the month. <ex ><date part='month' type='ordered'/></ex></td></tr>
<tr><td><i>part=day</i></td><td>Display the weekday, starting with Sunday. <ex ><date part='day' type='ordered'/></ex></td></tr>
<tr><td><i>part=wday</i></td><td>Display the weekday. Same as 'day'. <ex ><date part='wday' type='string'/></ex></td></tr>
<tr><td><i>part=date</i></td><td>Display the day of this month. <ex ><date part='date' type='ordered'/></ex></td></tr>
<tr><td><i>part=mday</i></td><td>Display the number of days since the last full month. <ex ><date part='mday' type='number'/></ex></td></tr>
<tr><td><i>part=hour</i></td><td>Display the numbers of hours since midnight. <ex ><date part='hour' type='ordered'/></ex></td></tr>
<tr><td><i>part=minute</i></td><td>Display the numbers of minutes since the last full hour. <ex ><date part='minute' type='number'/></ex></td></tr>
<tr><td><i>part=second</i></td><td>Display the numbers of seconds since the last full minute. <ex ><date part='second' type='string'/></ex></td></tr>
<tr><td><i>part=yday</i></td><td>Display the number of days since the first of January. <ex ><date part='yday' type='ordered'/></ex></td></tr>
<tr><td><i>part=beat</i></td><td>Display the number of beats since midnight Central European Time(CET). There is a total of 1000 beats per day. The beats system was designed by <a href://www.swatch.com>Swatch</a> as a means for a universal time, without time zones and day/night changes. <ex ><date part='beat' type='number'/></ex></td></tr>
<tr><td><i>part=week</i></td><td>Display the number of the current week.<ex ><date part='week' type='number'/></ex></td></tr>
<tr><td><i>part=seconds</i></td><td>Display the total number of seconds this year. <ex ><date part='seconds' type='number'/></ex></td></tr>
</table>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
0be641 | 2000-01-18 | Martin Nilsson | |
|
ce9c86 | 2000-05-28 | Martin Nilsson | | <attr name=strftime value=string>
If this attribute is given to date, it will format the result according to the argument string.
<table>
<tr><td>%%</td><td>Percent character</td></tr>
<tr><td>%a</td><td>Abbreviated weekday name, e.g. \"Mon\"</td></tr>
<tr><td>%A</td><td>Weekday name</td></tr>
<tr><td>%b</td><td>Abbreviated month name, e.g. \"Jan\"</td></tr>
<tr><td>%B</td><td>Month name</td></tr>
<tr><td>%c</td><td>Date and time, e.g. \"%a %b %d %H:%M:%S %Y\"</td></tr>
<tr><td>%C</td><td>Century number, zero padded to two charachters.</td></tr>
<tr><td>%d</td><td>Day of month (1-31), zero padded to two characters.</td></tr>
<tr><td>%D</td><td>Date as \"%m/%d/%y\"</td></tr>
<tr><td>%e</td><td>Day of month (1-31), space padded to two characters.</td></tr>
<tr><td>%H</td><td>Hour (24 hour clock, 0-23), zero padded to two characters.</td></tr>
<tr><td>%h</td><td>See %b</td></tr>
<tr><td>%I</td><td>Hour (12 hour clock, 1-12), zero padded to two charcters.</td></tr>
<tr><td>%j</td><td>Day numer of year (1-366), zero padded to three characters.</td></tr>
<tr><td>%k</td><td>Hour (24 hour clock, 0-23), space padded to two characters.</td></tr>
<tr><td>%l</td><td>Hour (12 hour clock, 1-12), space padded to two characters.</td></tr>
<tr><td>%m</td><td>Month number (1-12), zero padded to two characters.</td></tr>
<tr><td>%M</td><td>Minute (0-59), zero padded to two characters.</td></tr>
<tr><td>%n</td><td>Newline</td></tr>
<tr><td>%p</td><td>\"a.m.\" or \"p.m.\"</td></tr>
<tr><td>%r</td><td>Time in 12 hour clock format with %p</td></tr>
<tr><td>%R</td><td>Time as \"%H:%M\"</td></tr>
<tr><td>%S</td><td>Seconds (0-61), zero padded to two characters.</td></tr>
<tr><td>%t</td><td>Tab</td></tr>
<tr><td>%T</td><td>Time as \"%H:%M:%S\"</td></tr>
<tr><td>%u</td><td>Weekday as a decimal number (1-7), 1 is Sunday.</td></tr>
<tr><td>%U</td><td>Week number of year as a decimal number (0-53), with sunday as the first day of week 1,
zero padded to two characters.</td></tr>
<tr><td>%V</td><td>ISO week number of the year as a decimal number (1-53), zero padded to two characters.</td></tr>
<tr><td>%w</td><td>Weekday as a decimal number (0-6), 0 is Sunday.</td></tr>
<tr><td>%W</td><td>Week number of year as a decimal number (0-53), with sunday as the first day of week 1,
zero padded to two characters.</td></tr>
<tr><td>%x</td><td>Date as \"%a %b %d %Y\"</td></tr>
<tr><td>%X</td><td>See %T</td></tr>
<tr><td>%y</td><td>Year (0-99), zero padded to two characters.</td></tr>
<tr><td>%Y</td><td>Year (0-9999), zero padded to four characters.</td></tr>
</table>
|
3b40e7 | 2000-06-02 | Martin Nilsson | |
<ex><date strftime=\"%Y%m%d\"/></ex>
|
ce9c86 | 2000-05-28 | Martin Nilsson | | </attr>
|
0da089 | 2000-03-30 | Martin Nilsson | | <attr name=lang value=langcode>
|
de6dec | 2000-05-02 | Kenneth Johansson | | Defines in what language a string will be presented in. Used together
with <att>type=string</att> and the <att>part</att> attribute to get
written dates in the specified language.
|
3b40e7 | 2000-06-02 | Martin Nilsson | | <ex><date part='day' type='string' lang='de'></ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
0be641 | 2000-01-18 | Martin Nilsson | |
|
de6dec | 2000-05-02 | Kenneth Johansson | | <attr name=case value=upper|lower|capitalize>
Changes the case of the output to upper, lower or capitalize.
|
3b40e7 | 2000-06-02 | Martin Nilsson | | <ex><date date='' lang='&client.language;' case='upper'/></ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=prec value=number>
The number of decimals in the stardate.
</attr>",
|
bcde6c | 1999-11-19 | Per Hedbor | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "debug":#"<desc tag><short>
Helps debugging RXML-pages as well as modules.</short> When debugging mode is
|
592ed7 | 2000-02-06 | Martin Nilsson | | turned on, all error messages will be displayed in the HTML code.
</desc>
|
ecab8b | 2000-01-23 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=on>
Turns debug mode on.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=off>
Turns debug mode off.
</attr>
|
6c13ac | 2000-01-31 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=toggle>
Toggles debug mode.
</attr>
|
6c13ac | 2000-01-31 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=showid value=string>
Shows a part of the id object. E.g. showid=\"id->request_headers\".
</attr>",
|
481740 | 1999-08-13 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "dec":#"<desc tag><short>
|
0da089 | 2000-03-30 | Martin Nilsson | | Subtracts 1 from a variable.</short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
0da089 | 2000-03-30 | Martin Nilsson | | <attr name=variable value=string required>
|
592ed7 | 2000-02-06 | Martin Nilsson | | The variable to be decremented.
|
5b0e5d | 2000-03-25 | Martin Nilsson | | </attr>
|
0da089 | 2000-03-30 | Martin Nilsson | | <attr name=value value=number default=1>
The value to be subtracted.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>",
|
481740 | 1999-08-13 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "default":#"<desc cont><short hide>
Used to set default values for form elements.</short> Makes it easier
to give default values to \"<tag>select</tag>\" or
|
592ed7 | 2000-02-06 | Martin Nilsson | | \"<tag>checkbox</tag>\" form elements.
|
659d4b | 1999-10-18 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <p>The <tag>default</tag> container tag is placed around the form element it
should give a default value.</p>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <p>This tag is particularly useful in combination with database tags.</p>
</desc>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=value value=string>
The value to set.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
b551db | 2000-06-01 | Martin Nilsson | | <attr name=separator value=string default=','>
If several values are to be selected, this is the string that seperates them.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=name value=string>
Only affect form element with this name.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
b551db | 2000-06-01 | Martin Nilsson | | <ex type='box'>
<default name='my-select' value='&form.preset;'>
<select name='my-select'>
<option value='1'>First</option>
<option value='2'>Second</option>
<option value='3'>Third</option>
</select>
</default>
</ex>",
|
481740 | 1999-08-13 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "doc":#"<desc cont><short hide>
Eases code documentation by reformatting it.</short>
|
7ff329 | 2000-04-05 | Martin Nilsson | | Eases documentation by replacing \"{\", \"}\" and \"&\" with \"&lt;\", \"&gt;\" and
\"&amp;\". No attributes required.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
6c13ac | 2000-01-31 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=quote>
|
425ce5 | 2000-05-09 | Kenneth Johansson | | Instead of replacing with \"{\" and \"}\", \"<\" and \">\" is replaced with \"&lt;\"
|
592ed7 | 2000-02-06 | Martin Nilsson | | and \"&gt;\".
|
425ce5 | 2000-05-09 | Kenneth Johansson | |
<ex><doc quote=''>
<table>
<tr>
<td> First cell </td>
<td> Second cell </td>
</tr>
</table>
</doc>
</ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
1c7945 | 1999-10-17 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=pre>
The result is encapsulated within a <tag>pre</tag> container.
|
425ce5 | 2000-05-09 | Kenneth Johansson | | <ex><doc pre=''>
{table}
{tr}
{td} First cell {/td}
{td} Second cell {/td}
/tr}
{/table}
</doc>
</ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
252ed5 | 2000-01-31 | Per Hedbor | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=class value=string>
This CSS definition will be applied on the pre element.
</attr>",
|
481740 | 1999-08-13 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "expire-time":#"<desc tag><short>
Sets cache expire time for the document.</short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=now>
The document expires now.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=years value=number>
Add this number of years to the result.
</attr>
|
6c13ac | 2000-01-31 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=months value=number>
Add this number of months to the result.
</attr>
|
6c13ac | 2000-01-31 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=weeks value=number>
Add this number of weeks to the result.
</attr>
|
6c13ac | 2000-01-31 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=days value=number>
Add this number of days to the result.
</attr>
|
6c13ac | 2000-01-31 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=hours value=number>
Add this number of hours to the result.
</attr>
|
6c13ac | 2000-01-31 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=beats value=number>
Add this number of beats to the result.
</attr>
|
6c13ac | 2000-01-31 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=minutes value=number>
Add this number of minutes to the result.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=seconds value=number>
Add this number of seconds to the result.
</attr>
It is not possible at the time to set the date beyond year 2038,
since a unix time_t is used.",
|
481740 | 1999-08-13 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "for":#"<desc cont><short>
Makes it possible to create loops in RXML.</short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=from value=number>
Initial value of the loop variable.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=step value=number>
How much to increment the variable per loop iteration. By default one.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=to value=number>
How much the loop variable should be incremented to.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=variable value=name>
Name of the loop variable.
</attr>",
|
6c13ac | 2000-01-31 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "fsize":#"<desc tag><short>
Prints the size of the specified file.</short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=file value=string>
|
dbab47 | 2000-02-21 | Kenneth Johansson | | Show size for this file.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>",
|
d93f83 | 1999-09-17 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "gauge":#"<desc cont><short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | Measures how much CPU time it takes to run its contents through the
|
dbab47 | 2000-02-21 | Kenneth Johansson | | RXML parser.</short> Returns the number of seconds it took to parse
the contents.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=define value=string>
The result will be put into a variable. E.g. define=var.gauge vill
put the result in a variable that can be reached with &var.gauge;.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=silent>
Don't print anything.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=timeonly>
Only print the time.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=resultonly>
Only the result of the parsing. Useful if you want to put the time in
a database or such.
</attr>",
|
f19d00 | 1999-12-18 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "header":#"<desc tag><short>
Adds a header to the document.</short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
5e6383 | 1999-10-04 | Johan Sundström | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=name value=string>
The name of the header.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=value value=string>
The value of the header.
</attr>
See the Appendix for a list of HTTP headers.",
|
481740 | 1999-08-13 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "imgs":#"<desc tag><short>
|
0da089 | 2000-03-30 | Martin Nilsson | | Generates a image tag with proper dimensions.</short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
0da089 | 2000-03-30 | Martin Nilsson | | <attr name=src value=string required>
|
592ed7 | 2000-02-06 | Martin Nilsson | | The name of the file that should be shown.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=alt value=string>
|
0da089 | 2000-03-30 | Martin Nilsson | | Description of the image.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
All other attributes will be inherited by the generated img tag.",
|
659d4b | 1999-10-18 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "inc":#"<desc tag><short>
|
0da089 | 2000-03-30 | Martin Nilsson | | Adds 1 to a variable.</short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
0da089 | 2000-03-30 | Martin Nilsson | | <attr name=variable value=string required>
|
592ed7 | 2000-02-06 | Martin Nilsson | | The variable to be incremented.
|
5b0e5d | 2000-03-25 | Martin Nilsson | | </attr>
|
0da089 | 2000-03-30 | Martin Nilsson | | <attr name=value value=number default=1>
The value to be added.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>",
|
481740 | 1999-08-13 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "insert":#"<desc tag><short>
Inserts a file, variable or other object into a webpage.</short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=variable value=string>
Inserts the value of that variable.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=variables>
Inserts a variable listing.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
f155c3 | 2000-03-01 | Martin Nilsson | | <attr name=scopes>
Inserts a listing of all present scopes.
</attr>
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=file value=string>
Inserts the contents of that file.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=href value=string>
Inserts the contents at that URL.
</attr>
|
659d4b | 1999-10-18 | Martin Nilsson | |
|
91d6cd | 2000-03-21 | Martin Nilsson | | <attr name=quote value=html|none>
|
592ed7 | 2000-02-06 | Martin Nilsson | | How the inserted data should be quoted. Default is \"html\", except for
href and file where it's \"none\".
</attr>",
|
659d4b | 1999-10-18 | Martin Nilsson | |
|
5b0e5d | 2000-03-25 | Martin Nilsson | | "maketag":#"<desc cont><short hide>Makes it possible to create tags.</short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | This tag creates tags. The contents of the container will be put into
|
0da089 | 2000-03-30 | Martin Nilsson | | the contents of the produced container.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
659d4b | 1999-10-18 | Martin Nilsson | |
|
0da089 | 2000-03-30 | Martin Nilsson | | <attr name=name value=string required>
|
592ed7 | 2000-02-06 | Martin Nilsson | | The name of the tag.
</attr>
|
659d4b | 1999-10-18 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=noxml>
Tags should not be terminated with a trailing slash.
</attr>
|
659d4b | 1999-10-18 | Martin Nilsson | |
|
0da089 | 2000-03-30 | Martin Nilsson | | <attr name=type value=tag|container default=tag>
What kind of tag should be produced.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
Inside the maketag container the container attrib is defined. It is
used to add attributes to the produced tag. It has the required
attribute attrib, which is the name of the attribute. The contents of
the attribute container will be the attribute value. E.g.
|
659d4b | 1999-10-18 | Martin Nilsson | |
|
5b0e5d | 2000-03-25 | Martin Nilsson | | <ex><eval>
<maketag name=\"replace\" type=\"container\">
<attrib name=\"from\">A</attrib>
<attrib name=\"to\">U</attrib>
|
592ed7 | 2000-02-06 | Martin Nilsson | | MAD
|
5b0e5d | 2000-03-25 | Martin Nilsson | | </maketag>
</eval>
</ex>",
|
659d4b | 1999-10-18 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "modified":#"<desc tag><short hide>
Prints when or by whom a page was last modified.</short> Prints when
or by whom a page was last modified, by default the current page.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
659d4b | 1999-10-18 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=by>
Print by whom the page was modified. Takes the same attributes as the
|
7ff329 | 2000-04-05 | Martin Nilsson | | <tag><ref type='tag'>user</ref></tag> tag. This attribute requires a
|
3b40e7 | 2000-06-02 | Martin Nilsson | | userdatabase.
<ex type='box'>This page was last modified by <modified by='' realname=''/>.</ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
659d4b | 1999-10-18 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=date>
Print the modification date. Takes all the date attributes in the
|
7ff329 | 2000-04-05 | Martin Nilsson | | <tag><ref type='tag'>date</ref></tag> tag.
|
de6dec | 2000-05-02 | Kenneth Johansson | |
|
3b40e7 | 2000-06-02 | Martin Nilsson | | <ex type='box'>This page was last modified <modified date='' case='lower' type='string'/>.</ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
659d4b | 1999-10-18 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=file value=path>
Get information from this file rather than the current page.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=realfile value=path>
Get information from this file in the computers filesystem rather
than Roxen Webserver's virtual filesystem.
</attr>",
|
481740 | 1999-08-13 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "random":#"<desc cont><short>
Randomly chooses a message from its contents.</short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=separator value=string>
The separator used to separate the messages, by default newline.
|
425ce5 | 2000-05-09 | Kenneth Johansson | |
<ex><random separator=#>
Roxen#Pike#Foo#Bar#roxen.com#community.roxen.com#Roxen Internet Software
</random>
</ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>",
|
50b48a | 2000-01-25 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | "recursive-output":#"<desc cont>
|
50b48a | 2000-01-25 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
50b48a | 2000-01-25 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=limit value=number>
|
50b48a | 2000-01-25 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
50b48a | 2000-01-25 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=inside value=string>
|
50b48a | 2000-01-25 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
989745 | 1999-10-10 | Per Hedbor | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=outside value=string>
|
989745 | 1999-10-10 | Per Hedbor | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
989745 | 1999-10-10 | Per Hedbor | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=separator value=string>
|
989745 | 1999-10-10 | Per Hedbor | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>",
|
d05991 | 1999-10-08 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "redirect":#"<desc tag><short>
Redirects the user to another page.</short> Requires the to attribute.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
d05991 | 1999-10-08 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=to value=string>
Where the user should be sent to.
</attr>
|
d05991 | 1999-10-08 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=add value=string>
The prestate or prestates that should be added, in a comma seperated
list.
</attr>
|
d05991 | 1999-10-08 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=drop value=string>
The prestate or prestates that should be dropped, in a comma seperated
list.
</attr>
|
659d4b | 1999-10-18 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=text value=string>
Sends a text string to the browser, that hints from where and why the
page was redirected. Not all browsers will show this string. Only
special clients like Telnet uses it.
</attr>
Arguments prefixed with \"add\" or \"drop\" are treated as prestate
toggles, which are added or removed, respectively, from the current
set of prestates in the URL in the redirect header (see also <tag
|
7ff329 | 2000-04-05 | Martin Nilsson | | <ref type='tag'>apre</ref></tag>). Note that this only works when the
|
592ed7 | 2000-02-06 | Martin Nilsson | | to=... URL is absolute, i.e. begins with a \"/\", otherwise these
state toggles have no effect.",
|
d05991 | 1999-10-08 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "remove-cookie":#"<desc tag><short>
|
e59a5a | 2000-03-01 | Kenneth Johansson | | Sets the expire-time of a cookie to a date that has already occured.
This forces the browser to remove it.</short>
This tag won't remove the cookie, only set it to the empty string, or
|
7ff329 | 2000-04-05 | Martin Nilsson | | what is specified in the value attribute and change
|
e59a5a | 2000-03-01 | Kenneth Johansson | | it's expire-time to a date that already has occured. This is
unfortunutaly the only way as there is no command in HTTP for
removing cookies. We have to give a hint to the browser and let it
remove the cookie.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=name>
|
e59a5a | 2000-03-01 | Kenneth Johansson | | Name of the cookie the browser should remove.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
659d4b | 1999-10-18 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=value value=text>
Even though the cookie has been marked as expired some browsers
will not remove the cookie until it is shut down. The text provided
|
e59a5a | 2000-03-01 | Kenneth Johansson | | with this attribute will be the cookies intermediate value.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | Note that removing a cookie won't take effect until the next page
load.",
|
481740 | 1999-08-13 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "replace":#"<desc cont><short>
|
0da089 | 2000-03-30 | Martin Nilsson | | Replaces strings in the contents with other strings.</short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
0da089 | 2000-03-30 | Martin Nilsson | | <attr name=from value=string required>
|
592ed7 | 2000-02-06 | Martin Nilsson | | String or list of strings that should be replaced.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=to value=string>
String or list of strings with the replacement strings. Default is the
empty string.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
0da089 | 2000-03-30 | Martin Nilsson | | <attr name=separator value=string default=','>
|
592ed7 | 2000-02-06 | Martin Nilsson | | Defines what string should seperate the strings in the from and to
|
0da089 | 2000-03-30 | Martin Nilsson | | attributes.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
0da089 | 2000-03-30 | Martin Nilsson | | <attr name=type value=word|words default=word>
|
592ed7 | 2000-02-06 | Martin Nilsson | | Word means that a single string should be replaced. Words that from
|
0da089 | 2000-03-30 | Martin Nilsson | | and to are lists.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>",
|
481740 | 1999-08-13 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "return":#"<desc tag><short>
Changes the HTTP return code for this page.</short>
|
592ed7 | 2000-02-06 | Martin Nilsson | |
See the Appendix for a list of HTTP return codes.
</desc>
<attr name=code>
The return code to set.
</attr>",
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "roxen":#"<desc tag><short>
Returns a nice Roxen logo.</short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
de6dec | 2000-05-02 | Kenneth Johansson | | <attr name=size value=small|medium|large default=medium>
|
0da089 | 2000-03-30 | Martin Nilsson | | Defines the size of the image.
|
de6dec | 2000-05-02 | Kenneth Johansson | | <ex type='vert'><roxen size='small'/> <roxen/> <roxen size='large'/></ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
0da089 | 2000-03-30 | Martin Nilsson | | <attr name=color value=black|white default=white>
Defines the color of the image.
|
de6dec | 2000-05-02 | Kenneth Johansson | | <ex type='vert'><roxen color='black'/></ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
d93f83 | 1999-09-17 | Martin Nilsson | |
|
0da089 | 2000-03-30 | Martin Nilsson | | <attr name=alt value=string default='\"Powered by Roxen\"'>
The image description.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
0da089 | 2000-03-30 | Martin Nilsson | | <attr name=border value=number default=0>
The image border.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
659d4b | 1999-10-18 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=class value=string>
This CSS definition will be applied on the img element.
</attr>
|
ead00e | 2000-03-09 | Martin Stjernholm | |
<attr name=target value=string>
Names a target frame for the link around the image.
</attr>
|
592ed7 | 2000-02-06 | Martin Nilsson | | All other attributes will be inherited by the generated img tag.",
|
481740 | 1999-08-13 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "scope":#"<desc cont><short>
Creates a different variable scope.</short> Variable changes inside the scope
|
592ed7 | 2000-02-06 | Martin Nilsson | | container will not affect variables in the rest of the page.
Variables set outside the scope is not available inside the scope
unless the extend attribute is used. No attributes are required.
</desc>
|
d93f83 | 1999-09-17 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=extend>
If set, all variables will be copied into the scope.
</attr>",
|
d93f83 | 1999-09-17 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "set":#"<desc tag><short>
|
0da089 | 2000-03-30 | Martin Nilsson | | Sets a variable.</short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
885935 | 1999-11-25 | Martin Nilsson | |
|
0da089 | 2000-03-30 | Martin Nilsson | | <attr name=variable value=string required>
|
592ed7 | 2000-02-06 | Martin Nilsson | | The name of the variable.
</attr>
|
d93f83 | 1999-09-17 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=value value=string>
The value the variable should have.
</attr>
|
d93f83 | 1999-09-17 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=expr value=string>
An expression whose evaluated value the variable should have.
</attr>
|
d93f83 | 1999-09-17 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=from value=string>
The name of another variable that the value should be copied from.
</attr>
|
d93f83 | 1999-09-17 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=other value=string>
The name of a id->misc->variables that the value should be copied from.
</attr>
|
d93f83 | 1999-09-17 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | If none of the above attributes are specified, the variable is unset.
If debug is currently on, more specific debug information is provided
|
7ff329 | 2000-04-05 | Martin Nilsson | | if the operation failed. See also: <tag><ref type='tag'>append</ref></tag>
and <tag><ref type='tag'>debug</ref></tag>",
|
d93f83 | 1999-09-17 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "set-cookie":#"<desc tag><short>
Sets a cookie that will be stored by the user's browser.</short> This
is a simple and effective way of storing data that is local to the
|
a6ef1f | 2000-03-28 | Johan Sundström | | user. If no arguments specifying the time the cookie should survive
is given to the tag, it will live until the end of the current browser
session. Otherwise, the cookie will be persistent, and the next time
the user visits the site, she will bring the cookie with her.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
d93f83 | 1999-09-17 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=name value=string>
The name of the cookie.
</attr>
|
d93f83 | 1999-09-17 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=seconds value=number>
Add this number of seconds to the time the cookie is kept.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=minutes value=number>
Add this number of minutes to the time the cookie is kept.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=hours value=number>
Add this number of hours to the time the cookie is kept.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=days value=number>
Add this number of days to the time the cookie is kept.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=weeks value=number>
Add this number of weeks to the time the cookie is kept.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=months value=number>
Add this number of months to the time the cookie is kept.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=years value=number>
Add this number of years to the time the cookie is kept.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=persistent>
Keep the cookie for two years.
</attr>
|
989745 | 1999-10-10 | Per Hedbor | |
|
9e1b7b | 2000-04-10 | Elias Levy | | <attr name=domain>
The domain for which the cookie is valid.
</attr>
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=value value=string>
The value the cookie will be set to.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=path value=string>
|
8e55a3 | 2000-03-07 | Martin Nilsson | | The path in which the cookie should be available.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | If persistent is specified; the cookie will be persistent until year
2038, otherwise, the specified delays are used, just as for
|
7ff329 | 2000-04-05 | Martin Nilsson | | <tag><ref type='tag'>expire-time</ref></tag>.
|
f5132b | 1999-11-17 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | Note that the change of a cookie will not take effect until the
next page load.",
|
481740 | 1999-08-13 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "set-max-cache":#"<desc tag><short>
Sets the maximum time this document can be cached in any ram
caches.</short>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <p>Default is to get this time from the other tags in the document
(as an example, <tag>if supports=...</tag> sets the time to 0 seconds since
the result of the test depends on the client used.</p>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <p>You must do this at the end of the document, since many of the
normal tags will override this value.</p>
</desc>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
8c96aa | 2000-02-24 | Martin Nilsson | | <attr name=years value=number>
Add this number of years to the time this page was last loaded.
</attr>
<attr name=months value=number>
Add this number of months to the time this page was last loaded.
</attr>
<attr name=weeks value=number>
Add this number of weeks to the time this page was last loaded.
</attr>
<attr name=days value=number>
Add this number of days to the time this page was last loaded.
</attr>
<attr name=hours value=number>
Add this number of hours to the time this page was last loaded.
</attr>
<attr name=beats value=number>
Add this number of beats to the time this page was last loaded.
</attr>
<attr name=minutes value=number>
Add this number of minutes to the time this page was last loaded.
</attr>
<attr name=seconds value=number>
|
592ed7 | 2000-02-06 | Martin Nilsson | | Add this number of seconds to the time this page was last loaded.
</attr>",
|
481740 | 1999-08-13 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "smallcaps":#"<desc cont><short>
Prints the contents in smallcaps.</short> If the size attribute is
|
592ed7 | 2000-02-06 | Martin Nilsson | | given, font tags will be used, otherwise big and small tags will be
used.
</desc>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=space>
Put a space between every character.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=class value=string>
Apply this CSS style on all elements.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=smallclass value=string>
Apply this CSS style on all small elements.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=bigclass value=string>
Apply this CSS style on all big elements.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=size value=number>
Use font tags, and this number as big size.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
0da089 | 2000-03-30 | Martin Nilsson | | <attr name=small value=number default=size-1>
Size of the small tags. Only applies when size is specified.
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>",
|
481740 | 1999-08-13 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "sort":#"<desc cont><short>
|
0da089 | 2000-03-30 | Martin Nilsson | | Sorts the contents.</short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=separator value=string>
Defines what the strings to be sorted are separated with.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=reverse>
Reversed order sort.
</attr>",
|
bd2e11 | 1999-10-20 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "throw":#"<desc cont><short hide>
|
baf02c | 2000-04-15 | Per Hedbor | | Throws a text to be catched by <catch>.</short> Throws a text to be
catched by <tag>catch</tag>. Throws an exception, with the enclosed
text as the error message. This tag has a close relation to
<tag>catch</tag>. The RXML parsing will stop at the <tag>throw</tag>
tag. </desc>",
|
481740 | 1999-08-13 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "trimlines":#"<desc cont><short>
Removes all empty lines from the contents.</short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>",
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | "unset":#"
|
dbab47 | 2000-02-21 | Kenneth Johansson | | <desc tag><short>
|
0da089 | 2000-03-30 | Martin Nilsson | | Unsets a variable, i.e. removes it.</short>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
0da089 | 2000-03-30 | Martin Nilsson | | <attr name=variable value=string required>
|
592ed7 | 2000-02-06 | Martin Nilsson | | The name of the variable.
</attr>",
|
481740 | 1999-08-13 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | "user":#"<desc tag><short>
Prints information about the specified user.</short> By default, the
full name of the user and her e-mail address will be printed, with a
|
592ed7 | 2000-02-06 | Martin Nilsson | | mailto link and link to the home page of that user.
|
481740 | 1999-08-13 | Martin Nilsson | |
|
dbab47 | 2000-02-21 | Kenneth Johansson | | <p>The <tag>user</tag> tag requires an authentication module to work.</p>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </desc>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=email>
Only print the e-mail address of the user, with no link.
|
425ce5 | 2000-05-09 | Kenneth Johansson | | <ex type='box'>Email: <user name='foo' email=''/></ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=link>
Include links. Only meaningful together with the realname or email attribute.
</attr>
|
481740 | 1999-08-13 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=name>
|
de6dec | 2000-05-02 | Kenneth Johansson | | The login name of the user. If no other attributes are specified, the
user's realname and email including links will be inserted.
|
425ce5 | 2000-05-09 | Kenneth Johansson | | <ex type='box'><user name='foo'/></ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>
|
659d4b | 1999-10-18 | Martin Nilsson | |
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=nolink>
Don't include the links.
</attr>
|
659d4b | 1999-10-18 | Martin Nilsson | |
|
bb1f63 | 2000-03-01 | Martin Nilsson | | <attr name=nohomepage>
Don't include homepage links.
</attr>
|
592ed7 | 2000-02-06 | Martin Nilsson | | <attr name=realname>
Only print the full name of the user, with no link.
|
425ce5 | 2000-05-09 | Kenneth Johansson | | <ex type='box'><user name='foo' realname=''/></ex>
|
592ed7 | 2000-02-06 | Martin Nilsson | | </attr>",
|
e45da1 | 2000-03-07 | Martin Nilsson | |
"if#expr":#"<desc plugin>
Evaluates expressions. The following characters may be used: \"1, 2,
3, 4, 5, 6, 7, 8, 9, x, a, b, c, d, e, f, i, n, t, \, X. A, B, C, D, E,
|
5b0e5d | 2000-03-25 | Martin Nilsson | | F, l, o, <, >, =, 0, -, +, /, %, &, |, (, ) and .\".
|
e45da1 | 2000-03-07 | Martin Nilsson | | </desc>",
|
592ed7 | 2000-02-06 | Martin Nilsson | | ]);
#endif
|