> According to Douglas Kline: > > I've added the line > > > > allow_in_form: search_algorithm > > > > to the conf file and the clause > > > > <SELECT NAME="search_algorithm"> > > <OPTION VALUE="exact:1 synonyms:0.5 endings:0.1" SELECTED>words > > <OPTION VALUE="substring:0.5">strings > > </SELECT> > > > > to the search form file. I get the option to use either words or strings w hen > > the search page is brought up and it seems to work. However, after I've ru n a > > search and now the form brought up by the htsearch executable is the page, I > > don't get the choice any more and even if I ran a strings search the first time > > further searches only find whole words, i.e. I can run a successful strings > > search from the search page and get results and then come up empty-handed > > repeating the search for the same string. What could be wrong? Are these > > values not passed onto htsearch for re-use? Can they be? > > They can be, but you need to change your result template to make use > of the new template variables that allow_in_form will define for you. > You can pass these on as input text fields or hidden input fields if you > want, in the followup search forms. However, if you want htsearch to > build new select lists that use the current value as default, it gets a > bit more hairy. See http://www.htdig.org/attrs.html#build_select_lists > and http://www.htdig.org/hts_selectors.html
I've added the lines build_select_lists: SEARCHALGORITHM_LIST,multiple search_algorithm stringtype 2 1 2 stringtype: "exact:1 synonyms:0.5 endings:0.1" words "substring:0.5" strings to a conf form. Is that a correct format for defining a new select list to permit the user to choose whether to match whole words or strings on each successive search operation? If it is, how do I actually call the select list from htsearch? Should there be a reference in header.html? If so, should the same reference take the place of the lines I have in the cited message above in the search form for the initial search? I have found that header.html and footer.html are read for each search but wrapper.html which is intended to subsume the function of header and footer isn't read. Why not? Is that not the default? > > Also, I don't understand the danger of putting this option at the user's > > disposition (assuming that it can be). What could an unscrupulous or > > well-intentioned, mistaken user do that would be harmful? > > Well, in the case of search_algorithm, probably not much, but some sites > may very well want to avoid users making use of substring matches because > of the extra load it would put on the server. You might also want to > prevent users from selecting search algorithms that require databases > you haven't built on your site. > > The real danger would be if you started adding attributes that define > filenames into allow_in_form. E.g., if the user could redefine > nothing_found_file arbitrarily, he could look at any file on your > web server. OK. That explains that issue. Now, as to the real dangers of allow_in_form, why might one want to include filenames in a user-selectable item? Does that actually come up such that the dangers of doing so are the reason not to do it? Thanks very much for your help. Douglas ======== Douglas Kline [EMAIL PROTECTED] ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ ht://Dig general mailing list: <[EMAIL PROTECTED]> ht://Dig FAQ: http://htdig.sourceforge.net/FAQ.html List information (subscribe/unsubscribe, etc.) https://lists.sourceforge.net/lists/listinfo/htdig-general

