User:Claus chr/DPL/Test: Difference between revisions
Appearance
< User:Claus chr | DPL
Created page with "== Testing of LinksTo template == {{Input|1=<nowiki> <DPL> namespace=Main |User nottitleregexp = .*(/..(-..)?|_[(].*[)])$ include = * includematch = #\[\[[Ss]pecial\:[mM..." |
|||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== Testing | == Testing DPL == | ||
{{Input|1=<nowiki>{{Search|\[\[Special:myLanguage/Applications}}</nowiki>}} | |||
<!-- | |||
{{Search|\[\[Special:myLanguage/Applications}} | |||
--> | |||
This only finds new style links, and conversely find links to subpages as well. Better use the LinksTo template | |||
{{Input|1=<nowiki>{{LinksTo|Applications}}</nowiki>}} | |||
<!-- | |||
{{LinksTo|Applications}} | |||
--> | |||
<!-- | |||
{{Input|1=<nowiki> | {{Input|1=<nowiki> | ||
<DPL> | <DPL> | ||
namespace=Main |User | namespace=Main |User | ||
nottitleregexp = .*(/..(-..)?|_[(].*[)])$ | nottitleregexp = .*(/..(.|-..)?|_[(].*[)])$ | ||
titlematch = A%|B%|C%|D%|E%|F%|G%|H%|I%|J% | |||
include = * | include = * | ||
includematch = #\[ | includematch = #\[[Cc]ategory:# | ||
includemaxlength = 0 | includemaxlength = 0 | ||
resultsheader = The pages in the translation | resultsheader = The pages in the translation containing a category statement (A-J): %TOTALPAGES%\n | ||
format = ,\n* [[%PAGE%|%TITLE%]],, | format = ,\n* [[%PAGE%|%TITLE%]],, | ||
</DPL> | </DPL> | ||
</nowiki>}} | </nowiki>}} | ||
<DPL> | |||
namespace=Main | |||
nottitleregexp = .*(/..(.|-..)?|_[(].*[)])$ | |||
titlematch = A%|B%|C%|D%|E%|F%|G%|H%|I%|J% | |||
include = * | |||
includematch = #\[[Cc]ategory:# | |||
includemaxlength = 0 | |||
resultsheader = The pages in the translation containing a category statement (A-J):%TOTALPAGES%\n | |||
format = ,\n* [[%PAGE%|%TITLE%]],, | |||
</DPL> | |||
---- | |||
<DPL> | |||
namespace=Main | |||
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z][)]))$ | |||
titlematch = K% | |||
include = * | |||
includematch = #\[[Cc]ategory:# | |||
includemaxlength = 0 | |||
resultsheader = The pages in the translation containing a category statement (K):%TOTALPAGES%\n | |||
format = ,\n* [[%PAGE%|%TITLE%]],, | |||
</DPL> | |||
---- | |||
<DPL> | |||
namespace=Main | |||
nottitleregexp = .*(/..(.|-..)?|_[(].*[)])$ | |||
titlematch = L%|M%|N%|O%|P%|Q%|R%|S%|T%|U%|V%|W%|X%|Y%|Z% | |||
include = * | |||
includematch = #\[[Cc]ategory:# | |||
includemaxlength = 0 | |||
resultsheader = The pages in the translation containing a category statement (L-Z):%TOTALPAGES%\n | |||
format = ,\n* [[%PAGE%|%TITLE%]],, | |||
</DPL> | |||
->> | |||
<!-- | |||
<DPL> | <DPL> | ||
namespace=Main|User | namespace=Main|User | ||
Line 21: | Line 71: | ||
resultsheader = The pages in the translation system linking to Getting Help are:\n | resultsheader = The pages in the translation system linking to Getting Help are:\n | ||
format = ,\n* [[%PAGE%|%TITLE%]],, | format = ,\n* [[%PAGE%|%TITLE%]],, | ||
resultsheader=<pre><nowiki> | |||
resultsfooter=</nowiki></pre> | |||
</DPL> | </DPL> | ||
Line 118: | Line 170: | ||
So we can find subpages — good thing too! | So we can find subpages — good thing too! | ||
=== Addendum === | |||
* 30. June 2011: Added search of the Talk namespace plus a line of text to make the template document its use. | |||
* 18. July 2011: It seems this doesn't work! We do not find all the pages containing a given link. It seems that some resource is exceeded, and that only part of the pages are actually searched: | |||
Consider the following two searches: | |||
{{Input|1=<nowiki> | |||
<DPL> | |||
nottitlematch = %/__ | |||
namespace = Main | |||
include = * | |||
includematch = /[Ss]eamless/ | |||
includemaxlength = 0 | |||
resultsheader = Nontranslated pages containing the string "seamless" | |||
format = ,\n* [[%PAGE%|%TITLE%]]\n,, | |||
</DPL> | |||
</nowiki>}} | |||
<DPL> | |||
nottitlematch = %/__ | |||
namespace = Main | |||
include = * | |||
includematch = /[Ss]eamless/ | |||
includemaxlength = 0 | |||
resultsheader = Nontranslated pages containing the string "seamless" | |||
format = ,\n* [[%PAGE%|%TITLE%]]\n,, | |||
</DPL> | |||
{{Input|1=<nowiki> | |||
<DPL> | |||
nottitlematch = %/__|%/__-__|% (%|%/___ | |||
namespace = Main | |||
include = * | |||
includematch = /[Ss]eamless/ | |||
includemaxlength = 0 | |||
resultsheader = Nontranslated pages containing the string "seamless" | |||
format = ,\n* [[%PAGE%|%TITLE%]]\n,, | |||
</DPL> | |||
</nowiki>}} | |||
<DPL> | |||
nottitlematch = %/__|%/__-__|% (%|%/___ | |||
namespace = Main | |||
include = * | |||
includematch = /[Ss]eamless/ | |||
includemaxlength = 0 | |||
resultsheader = Nontranslated pages containing the string "seamless" | |||
format = ,\n* [[%PAGE%|%TITLE%]]\n,, | |||
</DPL> | |||
The first search excludes most translated pages, namely those ending on <tt>/la</tt> with ''la'' a two letter language code; the second search is identical except that it excludes all translated pages including remaining old style translations. You would expect the latter search to find fewer matches not more since it searches among fewer pages. On the other hand, if some capacity is exceeded by the search then the first search would run out of space first and so find fewer hits. | |||
--> |
Latest revision as of 07:35, 10 August 2023
Testing DPL
{{Search|\[\[Special:myLanguage/Applications}}
This only finds new style links, and conversely find links to subpages as well. Better use the LinksTo template
{{LinksTo|Applications}}