From 6eec41cd124165e6669b96e8a52993061c4ae3e5 Mon Sep 17 00:00:00 2001 From: SvenDowideit Date: Fri, 12 Dec 2008 07:17:50 +0000 Subject: [PATCH] Item39: add search 'type' radio button including query and regex, and then add a 'place to cut&paste that search for use in a topic, so we now have a way for people to LEARN git-svn-id: http://svn.foswiki.org/trunk@1291 0b4bb1d4-4e5a-0410-9cc4-b2b747904278 --- core/data/System/WebSearchAdvanced.txt | 30 +++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/core/data/System/WebSearchAdvanced.txt b/core/data/System/WebSearchAdvanced.txt index ce5bd40ec3..2bbf91819a 100644 --- a/core/data/System/WebSearchAdvanced.txt +++ b/core/data/System/WebSearchAdvanced.txt @@ -2,11 +2,11 @@ %META:TOPICPARENT{name="WebSearch"}% ---+ %MAKETEXT{"Advanced Search"}% -%IF{"defined search" then='%ICON{feed}% %MAKETEXT{"Get notified on changes on this search"}%'}% +%IF{"defined search" then='%ICON{feed}% %MAKETEXT{"Get notified on changes on this search"}%'}% %SEARCH{ "%URLPARAM{"search" encode="quote"}%" -type="%IF{" '%URLPARAM{regex}%' = 'on' or '%URLPARAM{type}%' = 'regex'" then="regex" else="word"}%" +type="%URLPARAM{"type" default="word"}%" scope="%URLPARAM{"scope" encode="quote"}%" web="%URLPARAM{"web" encode="quote"}%" nosearch="%URLPARAM{"nosearch" encode="quote"}%" @@ -27,7 +27,7 @@ zeroresults="%IF{ "defined search" then="on" else="off" }%" @@ -55,14 +55,20 @@ zeroresults="%IF{ "defined search" then="on" else="off" }%" @@ -75,6 +81,20 @@ zeroresults="%IF{ "defined search" then="on" else="off" }%" +
+The following Foswiki markup can be used in a topic to display the above result. +
+ +
+%SEARCH{
+   "%URLPARAM{"search" encode="quote"}%"
+   type="%URLPARAM{"type" default="word"}%"
+%IF{"defined scope" then="   scope=\"%URLPARAM{"scope" encode="quote"}%\"$n"}%%IF{"defined web" then="   web=\"%URLPARAM{"web" encode="quote"}%\"$n"}%%IF{"defined nosearch" then="   nosearch=\"%URLPARAM{"nosearch" encode="quote"}%\"$n"}%%IF{"defined casesensitive" then="   casesensitive=\"%URLPARAM{"casesensitive" encode="quote"}%\"$n"}%%IF{"defined bookview" then="   bookview=\"%URLPARAM{"bookview" encode="quote"}%\"$n"}%%IF{"defined nosummary" then="   nosummary=\"%URLPARAM{"nosummary" encode="quote"}%\"$n"}%%IF{"defined nototal" then="   nototal=\"%URLPARAM{"nototal" encode="quote"}%\"$n"}%%IF{"defined order" then="   order=\"%URLPARAM{"order" encode="quote"}%\"$n"}%%IF{"defined reverse" then="   reverse=\"%URLPARAM{"reverse" encode="quote"}%\"$n"}%%IF{"defined limit" then="   limit=\"%URLPARAM{"limit" encode="quote"}%\"$n"}%   zeroresults="%IF{ "defined search" then="on" else="off" }%"
+}%
+
+
+
+
*%MAKETEXT{"Other search options:"}%* * %MAKETEXT{"If you already know the name of the topic, enter the name of the topic into the ~[~[[_1]~]~[Jump box~]~] at the top" args="%SYSTEMWEB%.GoBox"}%
- +   %MAKETEXT{"Simple search"}% | [[%SYSTEMWEB%.SearchHelp][%MAKETEXT{"Help"}%]]
%MAKETEXT{"TIP: to search for all topics that contain =\"SOAP\"=, =\"WSDL\"=, a literal =\"web service\"=, but not =\"shampoo\"=, write:"}% soap wsdl "web service" -shampoo
%MAKETEXT{"Make search:"}%
- %MAKETEXT{"(semicolon =;= for and)"}% [[%SYSTEMWEB%.RegularExpression][%MAKETEXT{"about regular expression search"}%]] + (for more information about the SEARCH types see [[%SYSTEMWEB%.VarSEARCH][VarSEARCH]])
+
+
+
+ + (allows you to try out [[%SYSTEMWEB%.QuerySearch][QuerySearch]] - such as =form.name~'*UserForm'=)
+
%MAKETEXT{"Don't show:"}%

- +