1 | ||
Editor:
Time: 2003/08/11 21:10:46 GMT+0 |
||
Note: |
changed: - <dtml-if "_.has_key('expr')"> <dtml-if "_.has_key('source') and source == 'jump'"> <dtml-comment> we are doing a jump </dtml-comment> <dtml-if "expr == ''"> <dtml-comment>blank expr - jump to front page <dtml-call "RESPONSE.redirect(URL1)"></dtml-comment> <dtml-comment>blank expr - let the search list all</dtml-comment> <dtml-elif "expr[0] == '!'"> <dtml-comment>skip jumping, just do a search</dtml-comment> <dtml-call "REQUEST.set('expr',expr[1:])"> <dtml-else> <dtml-comment>search for an id beginning with expr</dtml-comment> <dtml-in "aq_parent.objectValues(spec='ZWiki Page')" sort=id reverse> <dtml-if "_.string.find(_.string.lower(id()),_.string.lower(expr)) == 0"> <dtml-comment>found one - jump there</dtml-comment> <dtml-comment>can't find url_quote</dtml-comment> <dtml-call "RESPONSE.redirect(URL1 + '/' + _.string.replace(id(),' ','%20'))"> </dtml-if> </dtml-in> </dtml-if> <dtml-comment>no ids matched - fall through and do a search</dtml-comment> </dtml-if> <form method="POST" action="!SearchPage"> <input type="hidden" name="source" value="search"> !<b>Search for:</b> <input name="expr" type="text" size="30" value="<dtml-var expr>"> <input type="submit" name="submit" value="Search"> <br> <b>Results:</b> <br> <br> <dtml-call "REQUEST.set('count',0)"> <dtml-in "aq_parent.objectValues(spec='ZWiki Page')" sort=title_or_id> <dtml-unless "_.string.find(_.string.lower(_.getitem('sequence-item').raw),_.string.lower(expr)) == -1 and _.string.find(_.string.lower(id()),_.string.lower(expr)) == -1"> <dtml-call "REQUEST.set('count',REQUEST.count + 1)"> <a href="&dtml.url_quote-id;">&dtml-title_or_id;</a><br> </dtml-unless></dtml-in> <p> <b><dtml-var count> hits</b> <dtml-comment> <dtml-in "Catalog(text=expr)" sort=id> [<dtml-var id>]<br> <dtml-if sequence-end> <p> <b>(<dtml-var sequence-number> hits)</b> </dtml-if> </dtml-in> </dtml-comment> </form> <dtml-else> <form method="POST" action="!SearchPage"> Type a search expression and hit enter to search the entire wikiweb. The expression is case-insensitive and spaces are preserved. Leave it blank to list all pages. <p> <b>Search for:</b> <input name="expr" type="text" size="30"> <input type="submit" name="submit" value="Search"> </form> </dtml-if> <hr> Some other likely search tools: <p> <div align="right"> <FORM METHOD="POST" ACTION="http://sunir.org/apps/meta.pl" ENCTYPE="application/x-www-form-urlencoded"> all wikis indexed by <a href="http://sunir.org/apps/meta.pl">Metawiki</a> (regexps allowed): <INPUT TYPE="TEXT" NAME="words" size="30" value="<dtml-var expr missing>"> <INPUT TYPE="submit" VALUE="Search"> </FORM> <FORM METHOD="GET" ACTION="http://www.google.com/search"> Google (<a href="http://www.google.com/advanced_search">advanced</a>, <a href="http://www.google.com/help/basics.html">help</a>): <INPUT TYPE="TEXT" NAME="q" size="30" value="<dtml-var expr missing>"> <INPUT TYPE="submit" VALUE="Search"> </FORM> <FORM METHOD="GET" ACTION="http://groups.google.com/groups"> USENET via <a href="http://groups.google.com">groups.google.com</a> (<a href="http://groups.google.com/advanced_group_search">advanced</a>, <a href="http://groups.google.com/googlegroups/help.html">help</a>): <INPUT TYPE="TEXT" NAME="q" size="30" value="<dtml-var expr missing>"> <INPUT TYPE="submit" VALUE="Search"> </FORM> <FORM METHOD="GET" ACTION="http://www.google.com/search?cat=gwd%2FTop&hl=%28null%29"> <a href="http://directory.google.com">directory.google.com</a> (ODP plus page ranking) (<a href="http://www.google.com/dirhelp.html">help</a>): <INPUT TYPE="TEXT" NAME="q" size="30" value="<dtml-var expr missing>"> <INPUT TYPE="submit" VALUE="Search"> </FORM> <FORM METHOD="GET" ACTION="http://images.google.com/images"> <a href="http://images.google.com">images.google.com</a> (<a href="http://images.google.com/help/faq_images.html">help</a>): <input type="hidden" name="safe" value="off"> <input type="hidden" name="imgsafe" value="off"> <INPUT TYPE="TEXT" NAME="q" size="30" value="<dtml-var expr missing>"> <INPUT TYPE="submit" VALUE="Search"> </FORM> </div>