Every schtonk page shares a common top menu and CSS. Top menu normally
includes items like Go to start1,
etc. This top menu is just plain regular html snippet. Schtonk does not feed
it through wiki parser but does substitute some localization items in there.
Top menu is normally stored in same table as pages, namely
but with a special pageid ; normal wiki pages have numbers that are positive
integers, top menu has number -2. It is not possible to edit top menu
with 'normal' edit function, SQL shell to backend database needs to be used.
Top menu is fetched from DB only at backend.tcl startup time.
In similar manner as top menu has
pageid -2 the common CSS for pages
pageid -1. Schtonk embeds CSS into header of each page so it makes
sense to keep it small.
In following text the top menu items are discussed in more details
This is just link to page number 0. It may or may not have any special meaning. Out of the box the top menu content looks something like this
<div id=\"upbar\" class=\"bar\"> <ul> <li> <a href=\"/cgi-bin/schtonk/g.tcl?pageid=0?lang=SCHTONK_LANG\"> SCHTONK_STR_GO_TO_START</a></li> <li> <a href=\"/cgi-bin/schtonk/e.tcl?pageid=SCHTONK_PAGEID?lang=SCHTONK_LANG\"> SCHTONK_STR_EDIT</a></li> <li> <a href=\"/cgi-bin/schtonk/h.tcl?pageid=SCHTONK_PAGEID?lang=SCHTONK_LANG\"> SCHTONK_STR_SEE_HISTORY</a></li> <li> <a href=\"/cgi-bin/schtonk/q.tcl?pageid=SCHTONK_PAGEID?lang=SCHTONK_LANG\"> SCHTONK_STR_ADD_ATTACHMENT</a></li> <li> <a href=\"/cgi-bin/schtonk/r.tcl?pageid=SCHTONK_PAGEID?lang=SCHTONK_LANG\"> SCHTONK_STR_REMOVE_ATTACHMENT</a></li> </ul> <hr /> </div>
In runtime the text SCHTONK_STR_GO_TO_START gets substituted with a string
that is supposed to be found from table
str_name mathces SCHTONK_STR_GO_TO_START and
lang=xx snippet from the original URL that user
requested. It is just link to g.tcl with pageid 0.
See Different g.tcl incarnations. about naming of g.tcl and what it does
This is link to e.tcl specifying current pageid and lang ; In runtime
SCHTONK_LANG will get replaced with
pageid and language of the current http request and specifying e.tcl
as name of the cgi-bin to call causes schtonk to produce a form that has
a large textfield containing all text from page for edit purpose.
As a proper wiki, schtonk keeps history of pages ; this is link to g.tcl with
name h.tcl and when called with name h.tcl the g.tcl will pass command
to backend.tcl that will then not produce page contents in response but instead
a history list of the page.
When g.tcl is referenced with name q.tcl it will produce a query that asks for an attachment to be added to page.
When g.tcl is referenced with name r.tcl it will produce a query that asks for an attachment to be removed from page. Top menu is static so even if there is zero attachments in the page, this link is still here.