Template:Search: Difference between revisions

From KDE UserBase Wiki
No edit summary
(Modified to accomodate the growing number of Kdenlive pages)
Line 8: Line 8:
   |includemaxlength = 0
   |includemaxlength = 0
   |format = ,\n* [[%PAGE%{{!}}%TITLE%]],,
   |format = ,\n* [[%PAGE%{{!}}%TITLE%]],,
| resultsheader = There are %TOTALPAGES% pages beginning with Kd\n
}}
}}
{{#dpl:
{{#dpl:
Line 17: Line 18:
   |includemaxlength = 0
   |includemaxlength = 0
   |format = ,\n* [[%PAGE%{{!}}%TITLE%]],,
   |format = ,\n* [[%PAGE%{{!}}%TITLE%]],,
| resultsheader = There are %TOTALPAGES% pages beginning with Kd\n
}}
}}
{{#dpl:
{{#dpl:
Line 26: Line 28:
   |includemaxlength = 0
   |includemaxlength = 0
   |format = ,\n* [[%PAGE%{{!}}%TITLE%]],,
   |format = ,\n* [[%PAGE%{{!}}%TITLE%]],,
| resultsheader = There are %TOTALPAGES% pages beginning with Kd\n
}}
}}
{{#dpl:
{{#dpl:
Line 35: Line 38:
   |includemaxlength = 0
   |includemaxlength = 0
   |format = ,\n* [[%PAGE%{{!}}%TITLE%]],,
   |format = ,\n* [[%PAGE%{{!}}%TITLE%]],,
| resultsheader = There are %TOTALPAGES% pages beginning with Kd\n
}}
}}
{{#dpl:
{{#dpl:
Line 44: Line 48:
   |includemaxlength = 0
   |includemaxlength = 0
   |format = ,\n* [[%PAGE%{{!}}%TITLE%]],,
   |format = ,\n* [[%PAGE%{{!}}%TITLE%]],,
| resultsheader = There are %TOTALPAGES% pages beginning with Kd\n
}}</includeonly><noinclude>
}}</includeonly><noinclude>
<!--{{#dpl:
  |namespace =
  |nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z][)]))$
  |titlematch = A%{{!}}B%{{!}}C%{{!}}D%{{!}}E%{{!}}F%{{!}}G%{{!}}H%{{!}}I%{{!}}J%
  |include = *
  |includematch = @{{{1}}}@
  |includemaxlength = 0
  |format = ,\n* [[%PAGE%{{!}}%TITLE%]],,
}}
{{#dpl:
  |namespace =
  |nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z][)]))$
  |titlematch = K%
  |include = *
  |includematch = @{{{1}}}@
  |includemaxlength = 0
  |format = ,\n* [[%PAGE%{{!}}%TITLE%]],,
}}
{{#dpl:
  |namespace =
  |nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z][)]))$
  |titlematch = L%{{!}}M%{{!}}N%{{!}}O%{{!}}P%{{!}}Q%{{!}}R%{{!}}S%{{!}}T%{{!}}U%{{!}}V%{{!}}W%{{!}}X%{{!}}Y%{{!}}Z%
  |include = *
  |includematch = @{{{1}}}@
  |includemaxlength = 0
  |format = ,\n* [[%PAGE%{{!}}%TITLE%]],,
}}-->
Find pages containing a string: <code><nowiki>{{Search|</nowiki>'''''string'''''<nowiki>}}</nowiki></code> finds all pages containing the '''''string'''''. Searches are case sensitive. In order to find both ''xyz'' and ''Xyz'' use a regular expression: <code><nowiki>{{Search|[Xx]yz}}</nowiki></code>.
Find pages containing a string: <code><nowiki>{{Search|</nowiki>'''''string'''''<nowiki>}}</nowiki></code> finds all pages containing the '''''string'''''. Searches are case sensitive. In order to find both ''xyz'' and ''Xyz'' use a regular expression: <code><nowiki>{{Search|[Xx]yz}}</nowiki></code>.


Line 77: Line 55:


No wiki expansion takes place before passing arguments to the template.
No wiki expansion takes place before passing arguments to the template.
{{Warning|1=Due to the limitations of the underlying database queries, the search is split in five parts, each searching less that 500 pages. To check that this limit is not exceeded, the number of pages in each search is also printed. Should one of the page counts exceed 500, some pages will have been ignored. The template then needs to be modified!}}


Example: <code><nowiki>{{Search|1=Learn more}}</nowiki></code> gives
Example: <code><nowiki>{{Search|1=Learn more}}</nowiki></code> gives

Revision as of 17:11, 22 July 2013

Find pages containing a string: {{Search|string}} finds all pages containing the string. Searches are case sensitive. In order to find both xyz and Xyz use a regular expression: {{Search|[Xx]yz}}.

Regular expressions use a perl like syntax. Special characters like '[', '[','(' and ')' need to be escaped.

No wiki expansion takes place before passing arguments to the template.

Warning

Due to the limitations of the underlying database queries, the search is split in five parts, each searching less that 500 pages. To check that this limit is not exceeded, the number of pages in each search is also printed. Should one of the page counts exceed 500, some pages will have been ignored. The template then needs to be modified!


Example: {{Search|1=Learn more}} gives

There are 2035 pages beginning with Kd

There are 1433 pages beginning with Kd

There are 1163 pages beginning with Kd

There are 388 pages beginning with Kd

There are 2327 pages beginning with Kd