Project:General Discussions: Difference between revisions

No edit summary
Line 59: Line 59:


:Compared to [[Template:Active]] and [[Template:Fixed]], this will provide text that there's no known problems to the Problems section with empty contents. It also doesn't require use the same templates constantly for the multiple problems. There are downsides against [[Template:Problems]] too but I'm gonna refrain from saying it. [[User:Lucario|Lucario]] ([[User talk:Lucario|talk]]) 05:40, 20 November 2016 (CET)
:Compared to [[Template:Active]] and [[Template:Fixed]], this will provide text that there's no known problems to the Problems section with empty contents. It also doesn't require use the same templates constantly for the multiple problems. There are downsides against [[Template:Problems]] too but I'm gonna refrain from saying it. [[User:Lucario|Lucario]] ([[User talk:Lucario|talk]]) 05:40, 20 November 2016 (CET)
Okay, it's done. Flagging pages with active problems but without issue links was harder than I though but it's now implemented. Basically it does a RegExp query to find how many active problems the page has (it does that by "counting" level 3 headings without <nowiki><s></s></nowiki>) and after that it loops through the text of each "active" heading it found earlier querying for "<nowiki>[https://dolp.in/i<number>]</nowiki>" (it wasn't possible to search for {{tl|issue}} calls directly because the template was parsed before the RegExp query). Although it currently does that lookup only on active problems, I left in the template some "base" code enabling us to do the same with fixed problems as well, if we need (maybe tagging pages with fixed problems without a revision link? Not sure if that is useful but it's that kind of thing which is possible to do). TL;DR, it outputs a nice text saying there are no problems if the section is empty and accurately flag pages under [[:Category:Pages with active problems]], [[:Category:Pages with fixed problems]], [[:Category:Pages with active problems missing issue links]] or [[:Category:Pages with misformatted problems]] without needing additional templates like {{tl|s}}, {{tl|/s}}, {{tl|active}} and {{tl|fixed}} or the workaround in {{tl|issue}}. If there's nothing more you guys want to ask or to add on {{tl|Problems}}, I'll start implementing it on all pages... - [[User:Jhonn|Jhonn]] ([[User talk:Jhonn|talk]]) 06:40, 23 November 2016 (CET)


=== Category Intersection Search ===
=== Category Intersection Search ===