From 901bd342dd263dcd00d519a1aff989729d5d6fc9 Mon Sep 17 00:00:00 2001 From: PeterThoeny Date: Wed, 17 Mar 2004 07:03:50 +0000 Subject: [PATCH] none --- TWiki/FormattedSearch.mdwn | 72 +++++++++++++++++++++++++++++++------ TWiki/TWikiVariables.mdwn | 82 +++++++++++++++++++++++++++++++++--------- TWiki/TextFormattingFAQ.mdwn | 4 +-- TWiki/TextFormattingRules.mdwn | 13 +++---- TWiki/WelcomeGuest.mdwn | 2 +- 5 files changed, 137 insertions(+), 36 deletions(-) diff --git a/TWiki/FormattedSearch.mdwn b/TWiki/FormattedSearch.mdwn index 8420720..3129702 100644 --- a/TWiki/FormattedSearch.mdwn +++ b/TWiki/FormattedSearch.mdwn @@ -33,6 +33,14 @@ +
  • TWiki Installation Error +
  • TWiki Installation Error
  • @@ -64,7 +72,7 @@ Variables that can be used in the format string: $web - Name of the web(s), separated by commas, or 'all' + Name of the web $topic @@ -92,33 +100,53 @@ Variables that can be used in the format string: $date - Time stamp of last topic update, like 29 Jun 2010 - 15:43 + Time stamp of last topic update, e.g. 29 Jun 2010 - 15:44 $isodate - Time stamp of last topic update, like 2010-06-29T15:43Z + Time stamp of last topic update, e.g. 2010-06-29T15:44Z $rev - Number of last topic revision, like 1.4 + Number of last topic revision, e.g. 1.4 $username - Login name of last topic update, like jsmith + Login name of last topic update, e.g. jsmith $wikiname - Wiki user name of last topic update, like JohnSmith + Wiki user name of last topic update, e.g. JohnSmith $wikiusername Wiki user name of last topic update, like Main.JohnSmith + $createdate + Time stamp of topic revision 1.1 + + + $createusername + Login name of topic revision 1.1, e.g. jsmith + + + $createwikiname + Wiki user name of topic revision 1.1, e.g. JohnSmith + + + $createwikiusername + Wiki user name of topic revision 1.1, e.g. Main.JohnSmith + + $summary Topic summary + $formname + The name of the form attached to the topic; empty if none + + $formfield(name) The field value of a form field; for example, $formfield(TopicClassification) would get expanded to PublicFAQ. This applies only to topics that have a [[Main/TWikiForms]] @@ -136,7 +164,7 @@ Variables that can be used in the format string: $pattern(reg-exp) - A regular expression pattern to extract some text from a topic. In case of a multiple="on" search, the pattern is applied to the line found in each search hit. For example, $pattern(.*?\*.*?Email\:\s*([^\n\r]+).*) extracts the email address from a bullet of format * Email: .... + A regular expression pattern to extract some text from a topic (does not search meta data; use $formfield instead). In case of a multiple="on" search, the pattern is applied to the line found in each search hit. The pattern must cover the whole text (topic or line). For example, $pattern(.*?\*.*?Email\:\s*([^\n\r]+).*) extracts the email address from a bullet of format * Email: .... This example has non-greedy .*? patterns to scan for the first occurance of the Email bullet; use greedy .* patterns to scan for the last occurance. $n or $n() @@ -225,7 +253,7 @@ Here is an example. Let's search for all topics that contain the word "culture" - First search: - `%SEARCH{ "culture" format="   * $topic is referenced by: (list all references)" nosearch="on" nototal="on" }%` - Second search. For each hit we want this search: - - `%SEARCH{ "(topic found in first search)" format="   $topic" nosearch="on" nototal="on" }%` + - `%SEARCH{ "(topic found in first search)" format="$topic" nosearch="on" nototal="on" separator=", " }%` - Now let's nest the two. We need to escape the second search, e.g. the first search will build a valid second search string. Note that we escape the second search so that it does not get evaluated prematurely by the first search: - Use `$percnt` to escape the leading percent of the second search - Use `\"` to escape the double quotes @@ -234,7 +262,7 @@ Here is an example. Let's search for all topics that contain the word "culture" **Write this:** -`%SEARCH{ "culture" format="   * $topic is referenced by:$n      * $percntSEARCH{ \"$topic\" format=\"   $dollartopic\" nosearch=\"on\" nototal=\"on\" }$nop%" nosearch="on" nototal="on" }%` +`%SEARCH{ "culture" format="   * $topic is referenced by:$n      * $percntSEARCH{ \"$topic\" format=\"$dollartopic\" nosearch=\"on\" nototal=\"on\" separator=\", \" }$nop%" nosearch="on" nototal="on" }%` **To get this:** @@ -254,4 +282,28 @@ Incorrect format of searchformat template (missing sections? There should be 4 % Incorrect format of searchformat template (missing sections? There should be 4 %SPLIT% tags) --- TWiki:Main.PeterThoeny - 15 Dec 2003 +### Embedding search forms to return a formatted result + +Use an HTML form and an embedded formatted search on the same topic. You can link them together with an `%URLPARAM{"..."}%` variable. Example: + +**Write this:** + +
    + Find Topics: + + +
    + Result: + %SEARCH{ search="%URLPARAM{"q"}%" format=" * $web.$topic: %BR% $summary" nosearch="on" }% + +**To get this:** + +
    Find Topics:
    + +Result: + +# TWiki Installation Error + +Incorrect format of searchformat template (missing sections? There should be 4 %SPLIT% tags) + +-- TWiki:Main.PeterThoeny - 16 Mar 2004 diff --git a/TWiki/TWikiVariables.mdwn b/TWiki/TWikiVariables.mdwn index 8999f77..972355d 100644 --- a/TWiki/TWikiVariables.mdwn +++ b/TWiki/TWikiVariables.mdwn @@ -85,7 +85,7 @@ This version of TWiki - TWiki-4.1.2, Sat, 03 Mar 2007, build 13046 - expands the newline="<br />" - Convert newlines to other delimiters + Convert newlines in textarea to other delimiters no conversion @@ -98,6 +98,16 @@ This version of TWiki - TWiki-4.1.2, Sat, 03 Mar 2007, build 13046 - expands the Encode special characters for URL parameter use, like a double quote into %22 no encoding + + multiple="on" %BR% multiple="[[$item]]" + If set, gets all selected elements of a <select multiple="multiple"> tag. A format can be specified, with $item indicating the element, e.g. multiple="Option: $item" + first element + + + separator=", " + Separator between multiple selections. Only relevant if multiple is specified + "\n" (new line) + Example: %URLPARAM{"skin"}% returns print for a .../view/%WEB%/%TOPIC%?skin=print URL. Is @@ -277,7 +287,7 @@ This version of TWiki - TWiki-4.1.2, Sat, 03 Mar 2007, build 13046 - expands the %GMTIME% - GM time, is 29 Jun 2010 - 15:43 + GM time, is 29 Jun 2010 - 15:44 %GMTIME{"format"}% @@ -288,54 +298,87 @@ This version of TWiki - TWiki-4.1.2, Sat, 03 Mar 2007, build 13046 - expands the Example - $seconds + $seconds seconds 59 - $minutes + $minutes minutes 59 - $hours + $hours hours 23 - $day + $day day of month 31 - $month + $wday + day of the Week (Sun, Mon, Tue, Wed, Thu, Fri, Sat) + Thu + + + $month month in ISO format Dec - $mo + $mo 2 digit month 12 - $year + $year 4 digit year 1999 - $ye + $ye 2 digit year 99 - Variables can be shortened to 3 characters. Example:
    %GMTIME{"$day $month, $year - $hour:$min:$sec"}% is
    29 Jun, 2010 - 15:43:57 + + $tz + either "GMT" (if set to gmtime), or "Local" (if set to servertime) + GMT + + + $iso + ISO format timestamp + 2010-06-29T15:44:40Z + + + $rcs + RCS format timestamp + 2010/06/29 15:44:40 + + + $http + E-mail & http format timestamp + Tue, 29 Jun 2010 15:44:40 GMT + + Variables can be shortened to 3 characters. Example:
    %GMTIME{"$day $month, $year - $hour:$min:$sec"}% is
    29 Jun, 2010 - 15:44:40 %SERVERTIME% - Server time, is 29 Jun 2010 - 11:43 + Server time, is 29 Jun 2010 - 11:44 %SERVERTIME{"format"}% - Formatted server time.
    Example: %SERVERTIME{"$hou:$min"}% is 11:43 + Formatted server time. Same format qualifiers as %GMTIME%
    Example: %SERVERTIME{"$hou:$min"}% is 11:44 + + + %DISPLAYTIME% + Display time, is 29 Jun 2010 - 15:44 + + + %DISPLAYTIME{"format"}% + Formatted time - either GMT or Local server time, depending on setting in TWiki.cfg. Same format qualifiers as %GMTIME%
    Example: %DISPLAYTIME{"$hou:$min"}% is 15:44 %HTTP_HOST% @@ -480,13 +523,13 @@ This version of TWiki - TWiki-4.1.2, Sat, 03 Mar 2007, build 13046 - expands the "text" - order="topic"
    order="modified"
    order="editby"
    order=
     "formfield(name)"
    - Sort the results of search by the topic names, last modified time, last editor, or named field of [[Main/TWikiForms]] + order="topic"
    order="created"
    order="modified"
    order="editby"
    order=
     "formfield(name)"
    + Sort the results of search by the topic names, topic creation time, last modified time, last editor, or named field of [[Main/TWikiForms]]. The sorting is done web by web; in case you want to sort across webs, create a [[Main/FormattedSearch]] table and sort it with [[Main/TablePlugin]]'s initsort Sort by topic name limit="all"
    limit="16" - Limit the number of results returned + Limit the number of results returned. This is done after sorting in case order is specified All results @@ -530,6 +573,11 @@ This version of TWiki - TWiki-4.1.2, Sat, 03 Mar 2007, build 13046 - expands the Results in table + expandvariables="on" + Expand variables before applying a [[Main/FormattedSearch]] on a search hit. Useful to show the expanded text, e.g. to show the result of a [[Main/SpreadSheetPlugin]] %CALC{}% instead of the formula + Raw text + + multiple="on" Multiple hits per topic. Each hit can be [[Main/FormattedSearch]]. The last token is used in case of a regular expression ";" and search Only one hit per topic @@ -750,4 +798,4 @@ Additional variables are defined in the preferences ( site-level ( **_SL_** ) in > - To place a logo anywhere in a web by typing **%MYLOGO%**, define the Variable on the web's [[WebPreferences]] page, and upload a logo file, ex: `mylogo.gif`. You can upload by [[attaching the file|Main/FileAttachment]] to [[WebPreferences]], or, to avoid clutter, to any other topic in the same web, ex: `LogoTopic`: > - **Set MYLOGO = %PUBURL%/TWiki/LogoTopic/mylogo.gif** --- TWiki:Main.PeterThoeny - 14 Jan 2004
    -- TWiki:Main.MikeMannix - 12 May 2002 +-- TWiki:Main.PeterThoeny - 16 Mar 2004
    -- TWiki:Main.MikeMannix - 12 May 2002 diff --git a/TWiki/TextFormattingFAQ.mdwn b/TWiki/TextFormattingFAQ.mdwn index b9f3bf8..8f987c9 100644 --- a/TWiki/TextFormattingFAQ.mdwn +++ b/TWiki/TextFormattingFAQ.mdwn @@ -181,8 +181,8 @@ The most frequently asked questions about text formatting are answered. Also, [[ > > If you need more colors you can use HTML, like ` red text `. You can also use the up-to-date `style` attribute - ex: `style="color:#ff0000"` - placed in most HTML tags. `span` is an all-purpose choice: `CoLoR`. Only old (like 3.x IE & NS) browsers have a problem with `style`. > -> The code is the _hexadecimal RGB color code_, which is simply Red, Green and Blue values in hex notation (base 16, 0-F). For pure red, the RGB components are 255-0-0 - full red (255), no green or blue. That's FF-0-0 in hex, or `"#ff000"` for Web page purposes. [[StandardColors]] lists basic colors. +> The code is the _hexadecimal RGB color code_, which is simply Red, Green and Blue values in hex notation (base 16, 0-F). For pure red, the RGB components are 255-0-0 - full red (255), no green or blue. That's FF-0-0 in hex, or `"#ff0000"` for Web page purposes. [[StandardColors]] lists basic colors. > > ---- --- [[PeterThoeny]] - 21 Feb 2002
    -- [[MikeMannix]] - 14 Sep 2001
    +-- TWiki:Main.PeterThoeny - 16 Mar 2004
    -- TWiki:Main.MikeMannix - 14 Sep 2001
    diff --git a/TWiki/TextFormattingRules.mdwn b/TWiki/TextFormattingRules.mdwn index 3cbaa03..93555dc 100644 --- a/TWiki/TextFormattingRules.mdwn +++ b/TWiki/TextFormattingRules.mdwn @@ -171,16 +171,16 @@ class CatAnimal { - Definition List: %BR% Three spaces, the term, a colon, a space, followed by the definition. %BR% Note: Terms with spaces are not supported. In case you do have a term with more then one word, separate the words with dashes or with the &nbsp; non-breaking-space entity. + Definition List: %BR% Three spaces, a dollar sign, the term, a colon, a space, followed by the definition.
    -	Sushi: Japan
    -	Dim&nbsp;Sum: S.F.
    +	$ Sushi: Japan
    +	$ Dim Sum: S.F.
     
    -
    Sushi
    +
    Sushi
    Japan
    -
    Dim Sum
    +
    Dim Sum
    S.F.
    @@ -194,6 +194,7 @@ class CatAnimal { | multi span ||| | A4-6 | four | four | |^| five | five | + |^| six | six | @@ -398,4 +399,4 @@ TWiki formatting rules are fairly simple to use and quick to type. However, ther - **Q:** Why is the `'&'` character sometimes not displayed? - **A:** The `'&'` character has a special meaning in HTML, it starts a so called character entity, i.e. `'©'` is the `©` copyright character. You need to escape `'&'` to see it as it is, so write `'&'` instead of `'&'`.
    Example: Type `'This & that'` to get `'This & that'`. --- [[MikeMannix]] - 02 Dec 2001
    -- [[PeterThoeny]] - 15 Jul 2003 +-- TWiki:Main.MikeMannix - 02 Dec 2001
    -- TWiki:Main.PeterThoeny - 16 Mar 2004 diff --git a/TWiki/WelcomeGuest.mdwn b/TWiki/WelcomeGuest.mdwn index 0492262..9508f5b 100644 --- a/TWiki/WelcomeGuest.mdwn +++ b/TWiki/WelcomeGuest.mdwn @@ -23,7 +23,7 @@ Welcome to %WIKITOOLNAME%! This is a [[TWikiSite]] (pronounced _twee-kee site_), - To create a link to an existing topic type its **JoinCapitalizedWords** name. [[WikiWords]] (two or more capitalized words run together) link automatically. - To create a link to a new topic, enter a newly **UsedPhrase**. - When previewing, the links show and "?" (question marks) are used to create topics. - - Another way to create a topic is to type it's [[WikiWord]] in the Go box or URL. + - Another way to create a topic is to type its [[WikiWord]] in the Go box or URL. 2. **Topic history** click **Diffs** at the bottom of a topic 3. **Attach files** click **Attach** to upload and attach any type of file. 5. **Organize:** You can learn to use [[TWikiForms]] and [[FormattedSearch]]es to include topic information - for example, classify pages by subject, status, or date. -- 1.9.4