Wikit web Search prompt

This page describes a modification to Wikit to provide more descriptive instructions in the web search page.

In particular, it seems that the text entered is a search phrase, rather than a list of keywords. The user is also prompted that entering an asterisk at the end of the phrase modifies the search to search both the page title and page content.

The patch is against Wikit version: 2003/08/20 19:06:22 68261-69214 with my Wikit web Cancel button patch applied.

A wikit.kit containing this and other patches is available for download, please see AKG Wikit and AKG.

Patch (web.tcl)

 <             isindex
 >             isindex "prompt=Enter the search phrase.  Append an asterisk (*) to search page contents as well: "

One annoying this about this change - The lynx text browser (and perhaps others) make use of the isindex argument to prompt the user for information.

With this change, the prompt is too wide for the window.

(Added 2004/06/08) I have the same problem when I try using the lynx or elinx text-based web browsers. The search page appears to come up, but I cannot find a text prompt in which to enter search terms. Feel free to delete this note once the search page plays nice with such browsers. willdye

LV You only see the prompt when you issue the lynx 's' command on the search page. And note that that as of 2004-12-28, the search prompt is still too large.

Somewhat related to this discussion: We've refactored the Wikit Search UI for greater usability and accessibility. - WJR

Dec 26, 2004 WJR - On my own Wikit-based Wiki, I made some minor modifications to wikit.vfs/lib/wikit/web.tcl so every page has a toolbar containing common tasks as well as a search widget.

All changes were made in wikit.vfs/lib/wikit/web.tcl. They include:

A toolbar featuring icons and a search widget was added starting around line 492:

 if {!$noTitle} { 
     #h2 $Title 
     cgi_puts {<div id="header">
     <form action="javascript:location='./2?' + document.getElementById('criteria').value;" method="get">
             <a href="/"><img src="/img/stock_home-16.png" /> Home</a>&nbsp;&nbsp;
             <a href="/cgi-bin/wiki.cgi"><img src="/img/stock_edit-16.png" /> Wiki</a>&nbsp;&nbsp;
            <a href="./1"><img src="/img/stock_help-16.png" /> About</a>&nbsp;&nbsp;
            <a href="./4"><img src="/img/calendar.png" /> Recent Changes</a>&nbsp;&nbsp;
            <label for="criteria" accesskey="s">
                <input type="text" name="criteria" id="criteria" />
                <input type="submit" value="Search" />
    cgi_puts "</div><h1>$Title</h1>"

The trickiest part here was the javascript that submits the form. The search doesn't work as you would expect a typical web application (i.e. a name/value pair is passed through the URL or the form post. A colleague at work helped me figure out this solution.

Category Wikit