Template:Problems: Difference between revisions

From Dolphin Emulator Wiki
Jump to navigation Jump to search
mNo edit summary
(Kinda works, but the output is duplicated. Let's try with loops instead)
Line 1: Line 1:
<includeonly>{{#if:{{{1|}}}|{{#vardefineecho:tl_problems_list|{{{1}}}}}{{#vardefine:tl_problems_list_active|{{#regexall:{{#var:tl_problems_list}}|/\=\=\=.(?!\<s\>).*?(?!\<\/s\>).\=\=\=/|¯}}}}{{#vardefine:tl_problems_list_fixed|{{#regexall:{{#var:tl_problems_list}}|/\=\=\=.\<s\>.*?\<\/s\>.\=\=\=/|¯}}}}{{#if:{{#var:tl_problems_list_active}}|{{#vardefine:tl_problems_active_matched|true}}[[Category:Pages with active problems]]
<includeonly>{{#if:{{{1|}}}|{{#vardefineecho:tl_problems_list|{{{1}}}}}{{#vardefine:tl_problems_list_active|{{#regexall:{{#var:tl_problems_list}}|/\=\=\=.(?!\<s\>).*?(?!\<\/s\>).\=\=\=/|¯}}}}{{#vardefine:tl_problems_list_fixed|{{#regexall:{{#var:tl_problems_list}}|/\=\=\=.\<s\>.*?\<\/s\>.\=\=\=/|¯}}}}{{#if:{{#var:tl_problems_list_active}}|{{#vardefine:tl_problems_active_matched|true}}[[Category:Pages with active problems]]


{{#vardefine:tl_problems_active_count|{{#expr:{{#len:{{#regexall:{{#var:tl_problems_list_active}}|(¯)|}}}}+1}}}}
{{#loop:tl_problems_i|0|{{#len:{{#regexall:{{#var:tl_problems_list_active}}|(¯)|}}}}|
{{#vardefine:tl_problems_i|0}}
{{#if:{{#regexall:{{#regexall:{{#var:tl_problems_list}}|/\=\=\=.(?!\<s\>).*?(?!\<\/s\>).\=\=\=([\s\S]*?(?=\n\={{!}}$))/||{{#var:tl_problems_i}}|1}}|/\x5Bhttps\:\/\/dolp\.in\/i.*\x5D/}}|true|false}}
{{ #while:
|{{#ifexpr:{{#expr:{{#var:tl_problems_i}}}}<{{#var:tl_problems_active_count}}|true}}
|{{#if:{{#regexall:{{#regexall:{{#var:tl_problems_list}}|/\=\=\=.(?!\<s\>).*?(?!\<\/s\>).\=\=\=([\s\S]*?(?=\n\={{!}}$))/||{{#var:tl_problems_i}}|1}}|/\x5Bhttps\:\/\/dolp\.in\/i.*\x5D/}}|true|false}}{{#vardefine:tl_problems_i|{{#expr:{{#var:tl_problems_i}}+1}}
}}
}}


}}{{#if:{{#var:tl_problems_list_fixed}}|{{#vardefine:tl_problems_fixed_matched|true}}[[Category:Pages with fixed problems]]}}{{#if:{{#var:tl_problems_active_matched}}{{#var:tl_problems_fixed_matched}}||[[Category:Pages with misformatted problems]]}}|There are no known problems with this {{#if:{{{type|}}}|{{{type|}}}|title}}.}}</includeonly><noinclude>{{documentation}}</noinclude>
}}{{#if:{{#var:tl_problems_list_fixed}}|{{#vardefine:tl_problems_fixed_matched|true}}[[Category:Pages with fixed problems]]}}{{#if:{{#var:tl_problems_active_matched}}{{#var:tl_problems_fixed_matched}}||[[Category:Pages with misformatted problems]]}}|There are no known problems with this {{#if:{{{type|}}}|{{{type|}}}|title}}.}}</includeonly><noinclude>{{documentation}}</noinclude>

Revision as of 05:56, 23 November 2016

[edit] [purge] Template documentation

Add common problem text to pages /wo problems, and add appropriate Category:Pages with active problems or Category:Pages with fixed problems to those that do.

Usage

{{Problems|{{#vardefineecho:problems|
=== Problem ===
Problem text. Refer {{issue|<Issue ID>}}.

{{Problems/Problem Sub-template Name}}

=== <s>Fixed Problem</s> ===
Problem text. Fixed in {{revision|<revision ID>}}.
}}}}

Example

There are no known problems with this title.

Sub-Templates

Problem sub-templates add common Problem, Emulation Information, or Enhancements subsections to pages.