[Turn on line numbering]arg obj, what; var top, middle, bottom, desc, alert, nalert, line; middle = (bottom = []); top = ["<h1>" + ._make_object_href(obj) + "</h1>"]; // CORENOTE: merge this with a central location (likely $directories) alert = "<p><font size=\"+1\" color=\"#" + ($cml_color.get_color("red"))[1] + "\"><b>"; nalert = "</b></font>"; top += ["<table>"]; top += ["<tr><td><b>Perms</b>:</td><td>" + obj.flags().prefix("+").join() + "</td></tr>", "<tr><td><b>Size</b>:</td><td>" + obj.size().to_english() + " bytes (on disk)</td></tr>", "<tr><td><b>Manager</b>:</td><td>" + ._make_object_href(obj.manager()) + "</td></tr>", ._show_header_objs(obj.writers('literal), "Writer"), ._show_header_objs(obj.parents(), "Parent")]; if (obj.has_ancestor($located)) top += ["<tr><td><b>Location</b>:</td><td>" + ._make_object_href(obj.location()) + "</td></tr>"]; if (obj.help_node()) top += ["<tr><td><b>Associated Help</b>:</td><td><a href=\"/bin/help?node=" + obj.help_node() + "\">" + obj.help_node() + "</a></td></tr>"]; top += ["<tr><td><b>Credit</b>:</td><td>" + join(obj.credit(), "<br>") + "</td></tr>"]; top += ["</table><p><hr size=1 noshade><p>"]; if (obj.has_ancestor($described)) { if (what['desc]) { bottom += ["<p><b>Description</b>:<blockquote><pre>"]; desc = obj.prose(); switch (type(desc)) { case 'frob: for line in (desc.uncompile()) bottom += line.wrap_lines(79, " "); case 'list: bottom += desc; case 'string: bottom += [desc]; } bottom += ["</pre></blockquote>"]; middle += [._make_show_object_href("Hide Description", obj, what, 'desc, 0)]; } else { middle += [._make_show_object_href("Show Description", obj, what, 'desc, 1)]; } top += ["</td></tr>"]; } if (what['methods]) { if (!obj.has_flag('methods, this())) bottom += [alert + "** No permission to List Methods **" + nalert]; else bottom += ["<p><b>Methods:</b><blockquote><pre>"] + ._show_methods(obj) + ["</pre></blockquote>"]; middle += [._make_show_object_href("Hide Methods", obj, what, 'methods, 0)]; } else { middle += [._make_show_object_href("List Methods", obj, what, 'methods, 1)]; } if (what['vars]) { if (!obj.has_flag('variables, this())) bottom += [alert + "** No permission to Show Variables **" + nalert]; else bottom += ["<p><b>Variables:</b><blockquote><pre>"] + ._show_variables(obj) + ["</pre></blockquote>"]; middle += [._make_show_object_href("Hide Variables", obj, what, 'vars, 0)]; } else { middle += [._make_show_object_href("Show Variables", obj, what, 'vars, 1)]; } return top + middle + ["<p>"] + bottom + ["<p>"];
// Brad Roberts
// Bruce Mitchener, Jr.
// Created 16-May-1997 as a part of ColdCore, see: @help Credit