View/Edit #1628:tell_www_setup

Switch to edit mode.

Name(s): tell_www_setup
1:  "Prints a form allowing web-based setup of this object."
2:  "This verb handles $sign setup (text)."
3:  "Override to add more functionality.  Don't forget to pass."
4:  caller == this || raise(E_PERM)
5:  player:isa($webber) || raise(E_PERM)
6:  pass(@args)
7:  write = $perm_utils:controls(player.user, this)
8:  text = this:text()
9:  player:tell("<HR><H3>Sign setup.</H3>")
10: player:tell("<FORM ACTION=\"/", $www:find_ref(this), "/setup\" METHOD=\"post\"><INPUT TYPE=\"hidden\" NAME=\"signsetup\" VALUE=\"on\">")
11: if (write)
12:   player:tell("<B>Text:</B><BR>")
13:   text = `{tostr("<TEXTAREA NAME=\"text\" ROWS=\"", length({@text}) + 4, "\" COLS=\"75\" WRAP=\"virtual\">"), @$html_utils:literal_text(text), "</TEXTAREA><BR>"} ! E_TYPE => {"<TT>", @$html_utils:literal_text(toliteral(text)), "</TT><P>"}'
14:   text[1..2] = {text[1] + text[2]}
15:   length(text) > 1 && (text[$ - 1..$] = {text[$ - 1] + text[$]})
16:   player:tell(text)
17: else
18:   player:tell("<B>Text:</B><BR><TT>", @`$html_utils:literal_text(text) ! E_TYPE => $html_utils:literal_text(toliteral(text))', "</TT><BR>")
19: endif
20: if (write || player.user:controls(this))
21:   player:tell("<INPUT TYPE=\"submit\" VALUE=\"Change\"> <INPUT TYPE=\"reset\">")
22: endif
23: player:tell("</FORM>")
24: "Last modified by Dax (#789) on Tue May  3 13:18:38 2005 MDT."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Dax (#789)

You are not logged in.

[home | help | who | search | setup | code]