Monday, November 08, 2010 at 12:04 AM.
system.verbs.builtins.mainResponder.adminSite.macros.adminMenu
on adminMenu (color = "#FFFFFF") {
<<Changes
<<12/16/03; 4:07:37 AM by JES
<<Added Updates link to the Pending Updates page.
<<7/3/03; 3:21:42 PM by JES
<<Don't add the admin menu if we're serving a mainResponder error page.
<<6/6/02; 1:16:37 PM by JES
<<Created. Cribbed from radioCommunityServerSuite.websites.macros.menu.
local (pta = html.getPageTableAddress ());
if pta^.adrObject == @mainResponder.adminSite.website.errorPage {
return ("")};
local (fontopen = "<font class=\"adminMenuLinkFont\" \" color=\"" + color + "\">", fontclose = "</font>");
local (uriWithSearchArgs = pta^.uri);
if sizeof (pta^.searchargs) > 0 {
uriWithSearchArgs = uriWithSearchArgs + "?" + pta^.searchargs};
local (htmltext = "");
on add (s) {
htmltext = htmltext + s};
on addCommand (linetext, url, fllastcommand = false) {
local (flhot = true);
if uriWithSearchArgs == url {
flhot = false};
if flhot {
add ("<a class=\"adminMenuLink\" href=\"" + url + "\">" + fontopen + linetext + fontclose + "</a>")}
else {
add ("<b><font class=\"adminMenuLinkFontCurrent\">" + linetext + "</font></b>")};
if not fllastcommand {
add (fontopen + " <b>|</b> " + fontclose)}};
add (fontopen + "<b>Frontier " + frontier.version () + "</b>: " + fontclose);
addCommand ("Home", mainResponder.adminSite.urls.home);
addCommand ("Readouts", mainResponder.adminSite.urls.readouts);
addCommand ("Settings", mainResponder.adminSite.urls.settings);
addCommand ("Maintenance", mainResponder.adminSite.urls.maintenance);
addCommand ("Updates", mainResponder.adminSite.urls.updates);
addCommand ("Tools", mainResponder.adminSite.urls.tools);
addCommand ("Help", mainResponder.adminSite.urls.help, fllastcommand:true);
return (htmltext)}
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.