Switch to edit mode.
Name(s): www_edit1: "Copied from Catspaw (#7921):www_edit Nov 3 18:32:07 1999"
2: if (player:isa($webber) && player.user == this && caller == #1693)
3: if (this:has_verb("tell_www_page") == {this})
4: "For now, -x it....if later, we can always just delete the verb"
5: set_verb_info(this, "tell_www_page", {this, "rd", "tell_www_page_old"})
6: endif
7: add_verb(this, {this, "rxd", "tell_www_page"}, {"this", "none", "this"})
8: text = {}
9: "Start with necessary tags & the head & title"
10: text = {"<HTML>", "<HEAD>", tostr("<TITLE>", args[2], "</TITLE>"), "</HEAD>"}
11: colors = {}
12: for x in (args[1])
13: colors = {@colors, {"#FFFFFF", "#000000", "#FF0000", "#00FF00", "#0000FF", "#FFFF00", "#C0C0C0", "#0000FF"}[x in {"white", "black", "red", "green", "blue", "yellow", "gray", "darkblue"}]}
14: endfor
15: text = {@text, tostr("<BODY BGCOLOR=\"", colors[1], "\" TEXT=\"", colors[2], "\" LINK=\"", colors[3], "\" VLINK=\"", colors[4], "\">")}
16: text = {@text, tostr("<h1> ", args[3], "</h1>")}
17: if (args[4] != "")
18: text = {@text, tostr("<h3>", args[4], "</h3>")}
19: endif
20: if (args[5][1] == 1)
21: text = {@text, tostr("<img src=\"http://", args[5][2], "\">")}
22: endif
23: for m in (args[6])
24: text = {@text, "<BR>"}
25: text = {@text, m}
26: endfor
27: if (args[7][1] == 1)
28: text = {@text, tostr("<img src=\"http://", args[7][2], "\">")}
29: endif
30: "Now add the links...make sure they want them though."
31: for l in (args[8])
32: if (l[2] != "")
33: text = {@text, tostr("<A HREF=\"http://", l[2], "\">", l[1], "</A>")}
34: endif
35: endfor
36: if (args[9][1] == 1)
37: text = {@text, tostr("<img src=\"http://", args[9][2], "\">")}
38: endif
39: for m in ({@args[10], ""})
40: text = {@text, m}
41: text = {@text, "<BR>"}
42: endfor
43: if (args[11] != "")
44: text = {@text, args[11]}
45: endif
46: "Add my own personal signature at the end....."
47: text = {@text, "<br><br><h5>This page has been created with help from the <A HREF=\"http://moo.ca/1693?EZ_Editor\">EZ_Editor</A>, programmed by Catspaw (#7921).</h5>"}
48: for x in [1..length(text)]
49: text[x] = tostr("player:tell(", toliteral(text[x]), ");")
50: endfor
51: set_verb_code(this, "tell_www_page", text)
52: endif