Changeset 8989
- Timestamp:
- 09/10/10 11:17:24 (21 months ago)
- File:
-
- 1 edited
-
trunk/core/data/System/FormattedSearch.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/data/System/FormattedSearch.txt
r8777 r8989 77 77 | =$web= | Name of the web | 78 78 | =$topic= | Topic name | 79 | =$topic(20)= | Topic name, "<tt>- </tt>" hyphenated e ach20 characters |80 | =$topic(30, -<br />)= | Topic name, hyphenated e ach30 characters with separator "<tt>-<br /></tt>" |81 | =$topic(40, ...)= | Topic name, shorten ded to 40 characters with "<tt>...</tt>" indication|79 | =$topic(20)= | Topic name, "<tt>- </tt>" hyphenated every 20 characters | 80 | =$topic(30, -<br />)= | Topic name, hyphenated every 30 characters with separator "<tt>-<br /></tt>" | 81 | =$topic(40, ...)= | Topic name, shortened to 40 characters with trailing ellipsis. | 82 82 | =$parent= | Name of parent topic; empty if not set | 83 | =$parent(20)= | Name of parent topic, same hyphenation/shortening like=$topic()= |83 | =$parent(20)= | Name of parent topic, same hyphenation/shortening as =$topic()= | 84 84 | =$text= | Formatted topic text. In case of a =multiple="on"= search, it is the line found for each search hit. | 85 85 | =$locked= | LOCKED flag (if any) | … … 106 106 | =$formname= | The name of the form attached to the topic; empty if none | 107 107 | =$formfield(name)= | The field value of a form field; for example, if FAQWhatIsWikiWiki was a search hit, =$formfield(<nop>TopicClassification)= would get expanded to =%QUERY{"'WhatIsWikiWiki'/TopicClassification"}%=. This applies only to topics that have a [[DataForms][DataForm]]. For multi-line textfields new lines are replace by an HTML <br /> | 108 | =$formfield(name, 10)= | Form field value, "<tt>- </tt>" hyphenated e ach10 characters |109 | =$formfield(name, 20, -<br />)= | Form field value, hyphenated e ach20 characters with separator "<tt>-<br /></tt>" |110 | =$formfield(name, 30, ...)= | Form field value, shortended to 30 characters with "<tt>...</tt>" indication|108 | =$formfield(name, 10)= | Form field value, "<tt>- </tt>" hyphenated every 10 characters | 109 | =$formfield(name, 20, -<br />)= | Form field value, hyphenated every 20 characters with separator "<tt>-<br /></tt>" | 110 | =$formfield(name,30,...)= | Form field value, shortened to 30 characters with trailing ellipsis. | 111 111 | =$pattern(reg-exp)= | 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.%BB% Specify a RegularExpression that covers the whole text (topic or line), which typically starts with =.*=, and must end in =.*= %BB% Put text you want to keep in parenthesis, like =$pattern(.*?(from here.*?to here).*)= %BB% Example: =$pattern(.*?\*.*?Email\:\s*([^\n\r]+).*)= extracts the e-mail address from a bullet of format =* Email: ...= %BB% 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 %BB% Limitation: Do not use =.*)= inside the pattern, e.g. =$pattern(.*foo(.*)bar.*)= does not work, but =$pattern(.*foo(.*?)bar.*)= does %BB% Note: Make sure that the integrity of a web page is not compromised; for example, if you include an HTML table make sure to include everything including the table end tag | 112 112 | =$count(reg-exp)= | Count of number of times a regular expression pattern appears in the text of a topic (does not search meta data). Follows guidelines for use and limitations outlined above under =$pattern(reg-exp)=. Example: =$count(.*?(---[+][+][+][+]) .*)= counts the number of <H4> headers in a page. |
Note: See TracChangeset
for help on using the changeset viewer.
