Template:LinksTo: Difference between revisions

From KDE UserBase Wiki
No edit summary
No edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<!--
{{#dpl:
{{#dpl:
| namespace = Main
| namespace =  
| nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z](...)?[)]))$
| nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z](...)?[)]))$
| titleregexp = ^[A-J]
| titleregexp = ^[A-J]
| include = *
| include = *
| includematch = @\[\[([Ss]pecial\:[mM]y[lL]anguage/)?{{{1}}}(\]{{!}}\{{!}}{{!}}#)@
| includematch = @\[\[([Ss]pecial\:[mM]y[lL]anguage/)?{{{1}}}( )*(\]{{!}}\{{!}}{{!}}#)@
| includemaxlength = 0
| includemaxlength = 0
| format = ,\n* [[%PAGE%|%TITLE%]],,
| format = ,\n* [[%PAGE%|%TITLE%]],,
Line 10: Line 11:
}}
}}
{{#dpl:
{{#dpl:
| namespace = Main
| namespace =  
| nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z](...)?[)]))$
| nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z](...)?[)]))$
| titleregexp = ^K[A-Z]
| titleregexp = ^K[A-Z]
| include = *
| include = *
| includematch = @\[\[([Ss]pecial\:[mM]y[lL]anguage/)?{{{1}}}(\]{{!}}\{{!}}{{!}}#)@
| includematch = @\[\[([Ss]pecial\:[mM]y[lL]anguage/)?{{{1}}}( )*(\]{{!}}\{{!}}{{!}}#)@
| includemaxlength = 0
| includemaxlength = 0
| format = ,\n* [[%PAGE%|%TITLE%]],,
| format = ,\n* [[%PAGE%|%TITLE%]],,
| resultsheader = There are %TOTALPAGES% pages beginning with A-J\n
| resultsheader = There are %TOTALPAGES% pages beginning with KA-KZ\n
}}
{{#dpl:
| namespace =
| nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z](...)?[)]))$
| titleregexp = ^K[a-ce-z]
| include = *
| includematch = @\[\[([Ss]pecial\:[mM]y[lL]anguage/)?{{{1}}}( )*(\]{{!}}\{{!}}{{!}}#)@
| includemaxlength = 0
| format = ,\n* [[%PAGE%|%TITLE%]],,
| resultsheader = There are %TOTALPAGES% pages beginning with Ka-Kc or Ke-Kz\n
}}
}}
{{#dpl:
{{#dpl:
| namespace = Main
| namespace =  
| nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z](...)?[)]))$
| nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z](...)?[)]))$
| titleregexp = ^K[a-z]
| titleregexp = ^Kd
| include = *
| include = *
| includematch = @\[\[([Ss]pecial\:[mM]y[lL]anguage/)?{{{1}}}(\]{{!}}\{{!}}{{!}}#)@
| includematch = @\[\[([Ss]pecial\:[mM]y[lL]anguage/)?{{{1}}}( )*(\]{{!}}\{{!}}{{!}}#)@
| includemaxlength = 0
| includemaxlength = 0
| format = ,\n* [[%PAGE%|%TITLE%]],,
| format = ,\n* [[%PAGE%|%TITLE%]],,
| resultsheader = There are %TOTALPAGES% pages beginning with A-J\n
| resultsheader = There are %TOTALPAGES% pages beginning with Kd\n
}}
}}
{{#dpl:
{{#dpl:
| namespace = Main
| namespace =  
| nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z](...)?[)]))$
| nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z](...)?[)]))$
| titleregexp = ^[L-Z]
| titleregexp = ^[L-Z]
| include = *
| include = *
| includematch = @\[\[([Ss]pecial\:[mM]y[lL]anguage/)?{{{1}}}(\]{{!}}\{{!}}{{!}}#)@
| includematch = @\[\[([Ss]pecial\:[mM]y[lL]anguage/)?{{{1}}}( )*(\]{{!}}\{{!}}{{!}}#)@
| includemaxlength = 0
| includemaxlength = 0
| format = ,\n* [[%PAGE%|%TITLE%]],,
| format = ,\n* [[%PAGE%|%TITLE%]],,
| resultsheader = There are %TOTALPAGES% pages beginning with A-J\n
| resultsheader = There are %TOTALPAGES% pages beginning with L-Z\n
}}<noinclude>
}}
-->
<noinclude>
----
----
Finds all English pages linking to the page given as argument. Usage <nowiki>{{LinksTo|</nowiki>'''''page name'''''<nowiki>}}</nowiki>, where '''''page name''''' is the name of the page. Note, that any space characters or underscores in the name should be replaced by <nowiki>[_ ]</nowiki> &mdash; that is: 'open square bracket', 'underscore', 'space', 'close square bracket'. This is because the links are found by s string search of the text of pages. In wiki format names can be written with either space or underscore, and for many pages both form occur.
{{Warning|1=Searching doesn't work on UserBase due do an issue with the 3. party module DynamicPageList3 -
see [https://invent.kde.org/teams/web/wiki-sites/-/issues/16 issue on invent]}}
 
Finds all English pages in namespace Main linking to the page given as argument. Usage <nowiki>{{LinksTo|</nowiki>'''''page name'''''<nowiki>}}</nowiki>, where '''''page name''''' is the name of the page. Note, that any space characters or underscores in the name should be replaced by <nowiki>[_ ]</nowiki> &mdash; that is: 'open square bracket', 'underscore', 'space', 'close square bracket'. This is because the links are found by a string search of the text of pages. In wiki format names can be written with either space or underscore, and for many pages both form occur.
 
{{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!}}


As an example, <nowiki>{{LinksTo|Getting[_ ]Help}}</nowiki> gives
As an example, <nowiki>{{LinksTo|Getting[_ ]Help}}</nowiki> gives
{{LinksTo|Getting[_ ]Help}}
{{LinksTo|Getting[_ ]Help}}
[[Category:Template]]
[[Category:Template]]
[[Category:TemplateWithIssues]]
</noinclude>
</noinclude>

Latest revision as of 11:10, 6 March 2024



Warning

Searching doesn't work on UserBase due do an issue with the 3. party module DynamicPageList3 - see issue on invent


Finds all English pages in namespace Main linking to the page given as argument. Usage {{LinksTo|page name}}, where page name is the name of the page. Note, that any space characters or underscores in the name should be replaced by [_ ] — that is: 'open square bracket', 'underscore', 'space', 'close square bracket'. This is because the links are found by a string search of the text of pages. In wiki format names can be written with either space or underscore, and for many pages both form occur.

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!


As an example, {{LinksTo|Getting[_ ]Help}} gives