Template:Problems: Difference between revisions

Okay, apparently it's working. Be verbose, for debugging. Do the queries on fixed issues too, might be useful in future
(Kinda works, but the output is duplicated. Let's try with loops instead)
(Okay, apparently it's working. Be verbose, for debugging. Do the queries on fixed issues too, might be useful in future)
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_active_count|{{#len:{{#regexall:{{#var:tl_problems_list_active}}|(¯)|}}}}}}{{#vardefine:tl_problems_list_fixed|{{#regexall:{{#var:tl_problems_list}}|/\=\=\=.\<s\>.*?\<\/s\>.\=\=\=/|¯}}}}{{#vardefine:tl_problems_fixed_count|{{#len:{{#regexall:{{#var:tl_problems_list_fixed}}|(¯)|}}}}}}{{#if:{{#var:tl_problems_list_active}}|[[:Category:Pages with active problems]]


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


}}{{#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}}|[[:Category:Pages with fixed problems]]}}{{#if:{{#var:tl_problems_list_active}}{{#var:tl_problems_list_fixed}}||[[:Category:Pages with misformatted problems]]}}{{#if:{{#var:tl_problems_active_missing_issue}}|[[:Category:Pages with active problems missing issue links]]}}|There are no known problems with this {{#if:{{{type|}}}|{{{type|}}}|title}}.}}</includeonly><noinclude>{{documentation}}</noinclude>