Changeset 1282


Ignore:
Timestamp:
12/12/08 05:25:54 (3 years ago)
Author:
SvenDowideit
Message:

Item168: final lot of query search uses

Location:
trunk/core/data
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/data/System/Contribs.txt

    r1022 r1282  
    2323---++ Foswiki Contribs Installed on this site 
    2424 
    25 %SEARCH{ "" scope="topic" topic="*Contrib" nosearch="on" format="   * <b>[[$topic]]</b>: <nop>$pattern(.*?\*\sSet\sSHORTDESCRIPTION\s\=([^\n\r]*).*) <span style=\"color: gray\">- version $pattern(.*?Version\:?\s*\|([^\n\r\|]*)\|.*)</span> <br /> <span style=\"color: gray; font-size: 80%\"> Author: $pattern(.*?\sAuthors?:\s*\|\s*(.*?)\s*\|.*) - last modified: r$rev - [[%SCRIPTURL{rdiff}%/$web/$topic][$date]] - $wikiusername </span>" }% 
     25%SEARCH{ 
     26   "1" 
     27   type="query" 
     28   scope="topic" 
     29   topic="*Contrib" 
     30   nosearch="on" 
     31   format="   * <b>[[$topic]]</b>: <nop>$pattern(.*?\*\sSet\sSHORTDESCRIPTION\s\=([^\n\r]*).*) <span style=\"color: gray\">- version $pattern(.*?Version\:?\s*\|([^\n\r\|]*)\|.*)</span> <br /> <span style=\"color: gray; font-size: 80%\"> Author: $pattern(.*?\sAuthors?:\s*\|\s*(.*?)\s*\|.*) - last modified: r$rev - [[%SCRIPTURL{rdiff}%/$web/$topic][$date]] - $wikiusername </span>" 
     32}% 
    2633 
    2734---++ Installing Contribs 
  • trunk/core/data/System/InstalledPlugins.txt

    r1024 r1282  
    1414See %SYSTEMWEB%.SkinBrowser for an overview of the installed Skins. 
    1515 
    16 %SEARCH{ ".+(Contrib|AddOn)$" web="%SYSTEMWEB%,TWiki" type="regex" scope="topic" nonoise="on" format="   * [[$web.$topic][$topic]]" }% 
     16%SEARCH{ 
     17    "1" 
     18    type="query" 
     19    topic="*Contrib,*AddOn" 
     20    web="%SYSTEMWEB%,TWiki" 
     21    scope="topic" 
     22    nonoise="on" 
     23    format="   * [[$web.$topic][$topic]]" 
     24}% 
    1725 
    18 ---++ Plugin Diagnostics  
     26---++ Plugin Diagnostics 
    1927%FAILEDPLUGINS% 
    2028 
  • trunk/core/data/System/QuerySearch.txt

    r1147 r1282  
    1818 
    1919All meta-data in a topic is referenced according to a to a simple plan. 
    20   
     20 
    2121   * =name= - name of the topic 
    2222   * =web= - name of the web the topic is within 
     
    4646      * =to= 
    4747   * =META:FORM= - the main form of the topic 
    48       * =name= (known as the _formname_) 
     48      * =name= 
    4949   * =META:FIELD= - the fields in the form. 
    5050      * _for each field in the form_ 
     
    6666   * =parent= means the same as =META:TOPICPARENT= 
    6767   * =moved= means the same as =META:TOPICMOVED= 
    68    * =form= means the same as =META:FORM= 
     68   * =form= means the same as =META:FORM=, so to test if a topic has a form named 'UserForm' you test for ="form.name ~ '*.UserForm'"= 
    6969   * =fields= means the same as =META:FIELD=, You can also use the name of the form (the value of =form.name= e.g. =PersonForm=) 
    7070   * =preferences= means the same as =META:PREFERENCE= 
     
    7474| =X= | refers to the field named =X=. | =info=, =META:TOPICMOVED=, =attachments=, =name=. | 
    7575| =X.Y= | refers to the entry with the key =Y= in the structure named =X= | =info.date=, =moved.by=, =META:TOPICPARENT.name= | 
    76 | =X[<i>query</i>]= | refers to all the elements of the array =X= that match _query_. If <i>query</i> is of the form =name='Y'= then you can use the same =X.Y= syntax as is used for accessing structures. | =attachments[size>1024]=, =DocumentForm[name!='Summary' AND value~'top secret'].value=, =DocumentForm.Summary= |  
     76| =X[<i>query</i>]= | refers to all the elements of the array =X= that match _query_. If <i>query</i> is of the form =name='Y'= then you can use the same =X.Y= syntax as is used for accessing structures. | =attachments[size>1024]=, =DocumentForm[name!='Summary' AND value~'top secret'].value=, =DocumentForm.Summary= | 
    7777| =X[N]= | where =X= is an array and =N= is an integer number >= 0, gets the Nth element of the array =X= | =attachments[3]= | 
    7878| =X/Y= | accesses =Y= from the topic specified by the _value_ of =X=. =X= must evaluate to a topic name | =parent.name/(form.name='ExampleForm')= will evaluate to true if (1) the topic has a parent, (2) the parent topic has the main form type =ExampleForm=. | 
     
    8484   * =Lastname= 
    8585   * =PersonForm.Lastname= 
    86 If =X= would conflict with the name of an entry or alias (e.g. it's =moved= or maybe =parent=), you can prepend the name of the form followed by a dot, as shown in the last example.  
     86If =X= would conflict with the name of an entry or alias (e.g. it's =moved= or maybe =parent=), you can prepend the name of the form followed by a dot, as shown in the last example. 
    8787 
    8888---++ Constants 
    89 You use constants for the values that you compare with fields. Constants are either strings, or numbers. Strings are always delimited by single-quotes (you can escape a quote using backslash). Numbers can be any integer or floating point number.  
     89You use constants for the values that you compare with fields. Constants are either strings, or numbers. Strings are always delimited by single-quotes (you can escape a quote using backslash). Numbers can be any integer or floating point number. 
    9090 
    9191---++ Operators 
  • trunk/core/data/System/SiteChanges.txt

    r1201 r1282  
    44%TABLE{sort="on" initsort="1" initdirection="up"}% 
    55| *Last Modified* | *Web.Topic* | *Last Editor* | 
    6 %SEARCH{ "."  
    7 type="regex"  
    8 nosearch="on"  
    9 nototal="on"  
    10 limit="%URLPARAM{"limit" encode="quote" default="25"}%"  
    11 web="%URLPARAM{"web" encode="quote" default="all"}%"  
    12 excludetopic="WebStatistics"  
    13 reverse="on" 
    14 order="modified"  
    15 format="| $date - [[%SCRIPTURLPATH{"rdiff"}%/$web/$topic?_foo=$rev][diff]] / [[%SCRIPTURLPATH{"rdiff"}%/$web/$topic?type=last&render=sequential&context=1000&_foo=$rev][in-line diff]] - $rev | [[%SCRIPTURLPATH{"view"}%/$web/$topic#foo_$rev][$web.$topic]] | $wikiusername |"  
     6%SEARCH{ 
     7    "1" 
     8    type="query" 
     9    nosearch="on" 
     10    nototal="on" 
     11    limit="%URLPARAM{"limit" encode="quote" default="25"}%" 
     12    web="%URLPARAM{"web" encode="quote" default="all"}%" 
     13    excludetopic="WebStatistics" 
     14    reverse="on" 
     15    order="modified" 
     16    format="| $date - [[%SCRIPTURLPATH{"rdiff"}%/$web/$topic?_foo=$rev][diff]] / [[%SCRIPTURLPATH{"rdiff"}%/$web/$topic?type=last&render=sequential&context=1000&_foo=$rev][in-line diff]] - $rev | [[%SCRIPTURLPATH{"view"}%/$web/$topic#foo_$rev][$web.$topic]] | $wikiusername |" 
    1617}% 
    17  
  • trunk/core/data/System/SkinBrowser.txt

    r1022 r1282  
    55 
    66<div class="skinstable"> 
    7 %SEARCH{ "name~'*Skin'" scope="topic" web="%SYSTEMWEB%" type="query" nosearch="on" nototal="on" expandvariables="on" format="| $pattern(.*\| *Screenshot\:[^\|]*\|([^\|]*).*) | *[[$web.$topic][$topic]]*: $pattern(.*\| *Description\:[^\|]*\|([^\|]*).*)<br /><br />[[%SCRIPTURLPATH{"view"}%/%WEB%/%TOPIC%?skin=$pattern(.*\| *Base Name\:[^\|]*\| *(\w*).*)][preview with this topic]] |" }% 
     7%SEARCH{ 
     8    "1" 
     9    topic="*Skin" 
     10    scope="topic" 
     11    web="%SYSTEMWEB%,TWiki" 
     12    type="query" 
     13    nosearch="on" 
     14    nototal="on" 
     15    expandvariables="on" 
     16    format="| $pattern(.*\| *Screenshot\:[^\|]*\|([^\|]*).*) | *[[$web.$topic][$topic]]*: $pattern(.*\| *Description\:[^\|]*\|([^\|]*).*)<br /><br />[[%SCRIPTURLPATH{"view"}%/%WEB%/%TOPIC%?skin=$pattern(.*\| *Base Name\:[^\|]*\| *(\w*).*)][preview with this topic]] |" 
     17}% 
    818</div> 
    919<style type="text/css" media="all"> 
     
    1626 
    1727__Related Topics:__ [[Skins]], AdminDocumentationCategory, UserDocumentationCategory 
    18  
  • trunk/core/data/Trash/WebHome.txt

    r1206 r1282  
    88 
    99Last 15 changes in this web: 
    10 %SEARCH{"'1'='1'" type="query" nototal="on" nosearch="on" reverse="on" order="modified" limit="15"}% 
     10%SEARCH{"1" type="query" nototal="on" nosearch="on" reverse="on" order="modified" limit="15"}% 
    1111[[WebChanges][%MAKETEXT{"more..."}%]] 
    1212 
Note: See TracChangeset for help on using the changeset viewer.