https://modmyclassic.com/wiki/index.php?title=Module:Message_box&feed=atom&action=history
Module:Message box - Revision history
2024-03-28T21:27:16Z
Revision history for this page on the wiki
MediaWiki 1.31.1
https://modmyclassic.com/wiki/index.php?title=Module:Message_box&diff=457&oldid=prev
Milenko: 1 revision imported
2019-01-04T12:24:11Z
<p>1 revision imported</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<tr class="diff-title" lang="en-GB">
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">Revision as of 12:24, 4 January 2019</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en-GB"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>
Milenko
https://modmyclassic.com/wiki/index.php?title=Module:Message_box&diff=416&oldid=prev
Milenko: 1 revision imported
2019-01-04T12:21:42Z
<p>1 revision imported</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<tr class="diff-title" lang="en-GB">
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">Revision as of 12:21, 4 January 2019</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en-GB"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>
Milenko
https://modmyclassic.com/wiki/index.php?title=Module:Message_box&diff=309&oldid=prev
Milenko at 19:02, 2 January 2019
2019-01-02T19:02:26Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en-GB">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 19:02, 2 January 2019</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l5" >Line 5:</td>
<td colspan="2" class="diff-lineno">Line 5:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>require('Module:No globals')</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>require('Module:No globals')</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local getArgs</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local getArgs</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>local categoryHandler = require('Module:<del class="diffchange diffchange-inline">Category_handler</del>')._main</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>local categoryHandler = require('Module:<ins class="diffchange diffchange-inline">Category handler</ins>')._main</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local yesno = require('Module:Yesno')</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local yesno = require('Module:Yesno')</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
</table>
Milenko
https://modmyclassic.com/wiki/index.php?title=Module:Message_box&diff=308&oldid=prev
Milenko at 19:01, 2 January 2019
2019-01-02T19:01:42Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en-GB">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 19:01, 2 January 2019</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l3" >Line 3:</td>
<td colspan="2" class="diff-lineno">Line 3:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- Load necessary modules.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- Load necessary modules.</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>require('Module:<del class="diffchange diffchange-inline">No_globals</del>')</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>require('Module:<ins class="diffchange diffchange-inline">No globals</ins>')</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local getArgs</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local getArgs</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local categoryHandler = require('Module:Category_handler')._main</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local categoryHandler = require('Module:Category_handler')._main</div></td></tr>
</table>
Milenko
https://modmyclassic.com/wiki/index.php?title=Module:Message_box&diff=306&oldid=prev
Milenko at 17:11, 2 January 2019
2019-01-02T17:11:58Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en-GB">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 17:11, 2 January 2019</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l3" >Line 3:</td>
<td colspan="2" class="diff-lineno">Line 3:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- Load necessary modules.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- Load necessary modules.</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>require('Module:<del class="diffchange diffchange-inline">No globals</del>')</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>require('Module:<ins class="diffchange diffchange-inline">No_globals</ins>')</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local getArgs</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local getArgs</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>local categoryHandler = require('Module:<del class="diffchange diffchange-inline">Category handler</del>')._main</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>local categoryHandler = require('Module:<ins class="diffchange diffchange-inline">Category_handler</ins>')._main</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local yesno = require('Module:Yesno')</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local yesno = require('Module:Yesno')</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
</table>
Milenko
https://modmyclassic.com/wiki/index.php?title=Module:Message_box&diff=302&oldid=prev
Milenko: Created page with "-- This is a meta-module for producing message box templates, including -- {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}. -- Load necessary mo..."
2019-01-02T17:07:48Z
<p>Created page with "-- This is a meta-module for producing message box templates, including -- {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}. -- Load necessary mo..."</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en-GB">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 17:07, 2 January 2019</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l5" >Line 5:</td>
<td colspan="2" class="diff-lineno">Line 5:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>require('Module:No globals')</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>require('Module:No globals')</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local getArgs</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local getArgs</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">local categoryHandler = require('Module:Category handler')._main</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local yesno = require('Module:Yesno')</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local yesno = require('Module:Yesno')</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- Get a language object for formatDate and ucfirst.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- Get a language object for formatDate and ucfirst.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local lang = mw.language.getContentLanguage()</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local lang = mw.language.getContentLanguage()</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">-- Define constants</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">local CONFIG_MODULE = 'Module:Message box/configuration'</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>--------------------------------------------------------------------------------</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>--------------------------------------------------------------------------------</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l108" >Line 108:</td>
<td colspan="2" class="diff-lineno">Line 106:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> obj.categories = {}</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> obj.categories = {}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> obj.classes = {}</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> obj.classes = {}</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> -- For lazy loading of [[Module:Category handler]].</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> obj.hasCategories = false</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> return setmetatable(obj, MessageBox)</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> return setmetatable(obj, MessageBox)</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l123" >Line 123:</td>
<td colspan="2" class="diff-lineno">Line 119:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> cat = string.format('[[Category:%s]]', cat)</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> cat = string.format('[[Category:%s]]', cat)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> self.hasCategories = true</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> self.categories[ns] = self.categories[ns] or {}</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> self.categories[ns] = self.categories[ns] or {}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> table.insert(self.categories[ns], cat)</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> table.insert(self.categories[ns], cat)</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l160" >Line 160:</td>
<td colspan="2" class="diff-lineno">Line 155:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- Add attributes, classes and styles.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- Add attributes, classes and styles.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> self.id = args.id</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> self.id = args.id</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <del class="diffchange diffchange-inline">self.name = args.name</del></div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> self:addClass(</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> if self.name then</del></div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline"> cfg</ins>.<ins class="diffchange diffchange-inline">usePlainlinksParam and </ins>yesno(args.plainlinks <ins class="diffchange diffchange-inline">or true</ins>) <ins class="diffchange diffchange-inline">and </ins>'plainlinks'</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> </del>self:addClass(<del class="diffchange diffchange-inline">'box-' .. string.gsub(self</del>.<del class="diffchange diffchange-inline">name,' ','_'))</del></div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> <ins class="diffchange diffchange-inline">)</ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> end</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> if </del>yesno(args.plainlinks) <del class="diffchange diffchange-inline">~= false then</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> self:addClass(</del>'plainlinks'<del class="diffchange diffchange-inline">)</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <del class="diffchange diffchange-inline">end</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> for _, class in ipairs(cfg.classes or {}) do</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> for _, class in ipairs(cfg.classes or {}) do</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> self:addClass(class)</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> self:addClass(class)</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l189" >Line 189:</td>
<td colspan="2" class="diff-lineno">Line 180:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> and cfg.templateCategoryRequireName</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> and cfg.templateCategoryRequireName</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> then</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> then</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> self.name = args.name</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if self.name then</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if self.name then</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local templateName = mw.ustring.match(</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local templateName = mw.ustring.match(</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l200" >Line 200:</td>
<td colspan="2" class="diff-lineno">Line 192:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> and mw.title.equals(self.title, self.templateTitle)</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> and mw.title.equals(self.title, self.templateTitle)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> </del></div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- Process data for collapsible text fields. At the moment these are only</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- Process data for collapsible text fields. At the moment these are only</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- used in {{ambox}}.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- used in {{ambox}}.</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l283" >Line 283:</td>
<td colspan="2" class="diff-lineno">Line 275:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if date then</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if date then</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> self.date = string.format(" <small <del class="diffchange diffchange-inline">class='date-container'</del>>''(<del class="diffchange diffchange-inline"><span class='date'></del>%s<del class="diffchange diffchange-inline"></span></del>)''</small>", date)</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> self.date = string.format(" <small>''(%s)''</small>", date)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> self.info = args.info</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> self.info = args.info</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> if yesno(args.removalnotice) then</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> self.removalNotice = cfg.removalNotice</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> end</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l434" >Line 434:</td>
<td colspan="2" class="diff-lineno">Line 423:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>function MessageBox:renderCategories()</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>function MessageBox:renderCategories()</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> if not self.hasCategories then</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> -- No categories added, no need to pass them to Category handler so,</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> -- if it was invoked, it would return the empty string.</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> -- So we shortcut and return the empty string.</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> return ""</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> end</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- Convert category tables to strings and pass them through</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- Convert category tables to strings and pass them through</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- [[Module:Category handler]].</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- [[Module:Category handler]].</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> return <del class="diffchange diffchange-inline">require('Module:Category handler')._main</del>{</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> return <ins class="diffchange diffchange-inline">categoryHandler</ins>{</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> main = table.concat(self.categories[0] or {}),</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> main = table.concat(self.categories[0] or {}),</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> template = table.concat(self.categories[10] or {}),</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> template = table.concat(self.categories[10] or {}),</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l506" >Line 506:</td>
<td colspan="2" class="diff-lineno">Line 489:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- collapsible. At the moment, only ambox uses this.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- collapsible. At the moment, only ambox uses this.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> textCell:cssText(self.textstyle or nil)</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> textCell:cssText(self.textstyle or nil)</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local <del class="diffchange diffchange-inline">textCellDiv </del>= textCell:tag('<del class="diffchange diffchange-inline">div</del>')</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local <ins class="diffchange diffchange-inline">textCellSpan </ins>= textCell:tag('<ins class="diffchange diffchange-inline">span</ins>')</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <del class="diffchange diffchange-inline">textCellDiv</del></div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> <ins class="diffchange diffchange-inline">textCellSpan</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :addClass('mbox-text-span')</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :addClass('mbox-text-span')</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :wikitext(self.issue or nil)</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :wikitext(self.issue or nil)</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> if <del class="diffchange diffchange-inline">(self.talk or self.fix) and </del>not self.isSmall then</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> if not self.isSmall then</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <del class="diffchange diffchange-inline">textCellDiv</del>:tag('span')</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> <ins class="diffchange diffchange-inline">textCellSpan</ins>:tag('span')</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :addClass('hide-when-compact')</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :addClass('hide-when-compact')</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :wikitext(self.talk and (' ' .. self.talk) or nil)</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :wikitext(self.talk and (' ' .. self.talk) or nil)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :wikitext(self.fix and (' ' .. self.fix) or nil)</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :wikitext(self.fix and (' ' .. self.fix) or nil)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <del class="diffchange diffchange-inline">textCellDiv</del>:wikitext(self.date and (' ' .. self.date) or nil)</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> <ins class="diffchange diffchange-inline">textCellSpan</ins>:wikitext(self.date and (' ' .. self.date) or nil)</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> if <del class="diffchange diffchange-inline">self.info and </del>not self.isSmall then</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> if not self.isSmall then</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <del class="diffchange diffchange-inline">textCellDiv</del></div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> <ins class="diffchange diffchange-inline">textCellSpan</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :tag('span')</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :tag('span')</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :addClass('hide-when-compact')</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :addClass('hide-when-compact')</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :wikitext(self.info and (' ' .. self.info) or nil)</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> :wikitext(self.info and (' ' .. self.info) or nil)</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> end</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> if self.removalNotice then</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> textCellDiv:tag('small')</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> :addClass('hide-when-compact')</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> :tag('i')</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> :wikitext(string.format(" (%s)", self.removalNotice))</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> else</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> else</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l588" >Line 588:</td>
<td colspan="2" class="diff-lineno">Line 565:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>function p.main(boxType, args, cfgTables)</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>function p.main(boxType, args, cfgTables)</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(<del class="diffchange diffchange-inline">CONFIG_MODULE</del>))</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(<ins class="diffchange diffchange-inline">'Module:Message box/configuration'</ins>))</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> box:setParameters()</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> box:setParameters()</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> box:setCategories()</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> box:setCategories()</div></td></tr>
</table>
Milenko
https://modmyclassic.com/wiki/index.php?title=Module:Message_box&diff=456&oldid=prev
Wikipedia>MSGJ: add class using template name, code requested by User:SD0001
2018-12-21T10:26:33Z
<p>add class using template name, code requested by <a href="/wiki/index.php?title=User:SD0001&action=edit&redlink=1" class="new" title="User:SD0001 (page does not exist)">User:SD0001</a></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<tr class="diff-title" lang="en-GB">
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">Revision as of 10:26, 21 December 2018</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en-GB"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>
Wikipedia>MSGJ
https://modmyclassic.com/wiki/index.php?title=Module:Message_box&diff=415&oldid=prev
Wikipedia>MSGJ: add class using template name, code requested by User:SD0001
2018-12-21T10:26:33Z
<p>add class using template name, code requested by <a href="/wiki/index.php?title=User:SD0001&action=edit&redlink=1" class="new" title="User:SD0001 (page does not exist)">User:SD0001</a></p>
<p><b>New page</b></p><div>-- This is a meta-module for producing message box templates, including<br />
-- {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}.<br />
<br />
-- Load necessary modules.<br />
require('Module:No globals')<br />
local getArgs<br />
local yesno = require('Module:Yesno')<br />
<br />
-- Get a language object for formatDate and ucfirst.<br />
local lang = mw.language.getContentLanguage()<br />
<br />
-- Define constants<br />
local CONFIG_MODULE = 'Module:Message box/configuration'<br />
<br />
--------------------------------------------------------------------------------<br />
-- Helper functions<br />
--------------------------------------------------------------------------------<br />
<br />
local function getTitleObject(...)<br />
-- Get the title object, passing the function through pcall<br />
-- in case we are over the expensive function count limit.<br />
local success, title = pcall(mw.title.new, ...)<br />
if success then<br />
return title<br />
end<br />
end<br />
<br />
local function union(t1, t2)<br />
-- Returns the union of two arrays.<br />
local vals = {}<br />
for i, v in ipairs(t1) do<br />
vals[v] = true<br />
end<br />
for i, v in ipairs(t2) do<br />
vals[v] = true<br />
end<br />
local ret = {}<br />
for k in pairs(vals) do<br />
table.insert(ret, k)<br />
end<br />
table.sort(ret)<br />
return ret<br />
end<br />
<br />
local function getArgNums(args, prefix)<br />
local nums = {}<br />
for k, v in pairs(args) do<br />
local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$')<br />
if num then<br />
table.insert(nums, tonumber(num))<br />
end<br />
end<br />
table.sort(nums)<br />
return nums<br />
end<br />
<br />
--------------------------------------------------------------------------------<br />
-- Box class definition<br />
--------------------------------------------------------------------------------<br />
<br />
local MessageBox = {}<br />
MessageBox.__index = MessageBox<br />
<br />
function MessageBox.new(boxType, args, cfg)<br />
args = args or {}<br />
local obj = {}<br />
<br />
-- Set the title object and the namespace.<br />
obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle()<br />
<br />
-- Set the config for our box type.<br />
obj.cfg = cfg[boxType]<br />
if not obj.cfg then<br />
local ns = obj.title.namespace<br />
-- boxType is "mbox" or invalid input<br />
if ns == 0 then<br />
obj.cfg = cfg.ambox -- main namespace<br />
elseif ns == 6 then<br />
obj.cfg = cfg.imbox -- file namespace<br />
elseif ns == 14 then<br />
obj.cfg = cfg.cmbox -- category namespace<br />
else<br />
local nsTable = mw.site.namespaces[ns]<br />
if nsTable and nsTable.isTalk then<br />
obj.cfg = cfg.tmbox -- any talk namespace<br />
else<br />
obj.cfg = cfg.ombox -- other namespaces or invalid input<br />
end<br />
end<br />
end<br />
<br />
-- Set the arguments, and remove all blank arguments except for the ones<br />
-- listed in cfg.allowBlankParams.<br />
do<br />
local newArgs = {}<br />
for k, v in pairs(args) do<br />
if v ~= '' then<br />
newArgs[k] = v<br />
end<br />
end<br />
for i, param in ipairs(obj.cfg.allowBlankParams or {}) do<br />
newArgs[param] = args[param]<br />
end<br />
obj.args = newArgs<br />
end<br />
<br />
-- Define internal data structure.<br />
obj.categories = {}<br />
obj.classes = {}<br />
-- For lazy loading of [[Module:Category handler]].<br />
obj.hasCategories = false<br />
<br />
return setmetatable(obj, MessageBox)<br />
end<br />
<br />
function MessageBox:addCat(ns, cat, sort)<br />
if not cat then<br />
return nil<br />
end<br />
if sort then<br />
cat = string.format('[[Category:%s|%s]]', cat, sort)<br />
else<br />
cat = string.format('[[Category:%s]]', cat)<br />
end<br />
self.hasCategories = true<br />
self.categories[ns] = self.categories[ns] or {}<br />
table.insert(self.categories[ns], cat)<br />
end<br />
<br />
function MessageBox:addClass(class)<br />
if not class then<br />
return nil<br />
end<br />
table.insert(self.classes, class)<br />
end<br />
<br />
function MessageBox:setParameters()<br />
local args = self.args<br />
local cfg = self.cfg<br />
<br />
-- Get type data.<br />
self.type = args.type<br />
local typeData = cfg.types[self.type]<br />
self.invalidTypeError = cfg.showInvalidTypeError<br />
and self.type<br />
and not typeData<br />
typeData = typeData or cfg.types[cfg.default]<br />
self.typeClass = typeData.class<br />
self.typeImage = typeData.image<br />
<br />
-- Find if the box has been wrongly substituted.<br />
self.isSubstituted = cfg.substCheck and args.subst == 'SUBST'<br />
<br />
-- Find whether we are using a small message box.<br />
self.isSmall = cfg.allowSmall and (<br />
cfg.smallParam and args.small == cfg.smallParam<br />
or not cfg.smallParam and yesno(args.small)<br />
)<br />
<br />
-- Add attributes, classes and styles.<br />
self.id = args.id<br />
self.name = args.name<br />
if self.name then<br />
self:addClass('box-' .. string.gsub(self.name,' ','_'))<br />
end<br />
if yesno(args.plainlinks) ~= false then<br />
self:addClass('plainlinks')<br />
end<br />
for _, class in ipairs(cfg.classes or {}) do<br />
self:addClass(class)<br />
end<br />
if self.isSmall then<br />
self:addClass(cfg.smallClass or 'mbox-small')<br />
end<br />
self:addClass(self.typeClass)<br />
self:addClass(args.class)<br />
self.style = args.style<br />
self.attrs = args.attrs<br />
<br />
-- Set text style.<br />
self.textstyle = args.textstyle<br />
<br />
-- Find if we are on the template page or not. This functionality is only<br />
-- used if useCollapsibleTextFields is set, or if both cfg.templateCategory<br />
-- and cfg.templateCategoryRequireName are set.<br />
self.useCollapsibleTextFields = cfg.useCollapsibleTextFields<br />
if self.useCollapsibleTextFields<br />
or cfg.templateCategory<br />
and cfg.templateCategoryRequireName<br />
then<br />
if self.name then<br />
local templateName = mw.ustring.match(<br />
self.name,<br />
'^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$'<br />
) or self.name<br />
templateName = 'Template:' .. templateName<br />
self.templateTitle = getTitleObject(templateName)<br />
end<br />
self.isTemplatePage = self.templateTitle<br />
and mw.title.equals(self.title, self.templateTitle)<br />
end<br />
<br />
-- Process data for collapsible text fields. At the moment these are only<br />
-- used in {{ambox}}.<br />
if self.useCollapsibleTextFields then<br />
-- Get the self.issue value.<br />
if self.isSmall and args.smalltext then<br />
self.issue = args.smalltext<br />
else<br />
local sect<br />
if args.sect == '' then<br />
sect = 'This ' .. (cfg.sectionDefault or 'page')<br />
elseif type(args.sect) == 'string' then<br />
sect = 'This ' .. args.sect<br />
end<br />
local issue = args.issue<br />
issue = type(issue) == 'string' and issue ~= '' and issue or nil<br />
local text = args.text<br />
text = type(text) == 'string' and text or nil<br />
local issues = {}<br />
table.insert(issues, sect)<br />
table.insert(issues, issue)<br />
table.insert(issues, text)<br />
self.issue = table.concat(issues, ' ')<br />
end<br />
<br />
-- Get the self.talk value.<br />
local talk = args.talk<br />
-- Show talk links on the template page or template subpages if the talk<br />
-- parameter is blank.<br />
if talk == ''<br />
and self.templateTitle<br />
and (<br />
mw.title.equals(self.templateTitle, self.title)<br />
or self.title:isSubpageOf(self.templateTitle)<br />
)<br />
then<br />
talk = '#'<br />
elseif talk == '' then<br />
talk = nil<br />
end<br />
if talk then<br />
-- If the talk value is a talk page, make a link to that page. Else<br />
-- assume that it's a section heading, and make a link to the talk<br />
-- page of the current page with that section heading.<br />
local talkTitle = getTitleObject(talk)<br />
local talkArgIsTalkPage = true<br />
if not talkTitle or not talkTitle.isTalkPage then<br />
talkArgIsTalkPage = false<br />
talkTitle = getTitleObject(<br />
self.title.text,<br />
mw.site.namespaces[self.title.namespace].talk.id<br />
)<br />
end<br />
if talkTitle and talkTitle.exists then<br />
local talkText = 'Relevant discussion may be found on'<br />
if talkArgIsTalkPage then<br />
talkText = string.format(<br />
'%s [[%s|%s]].',<br />
talkText,<br />
talk,<br />
talkTitle.prefixedText<br />
)<br />
else<br />
talkText = string.format(<br />
'%s the [[%s#%s|talk page]].',<br />
talkText,<br />
talkTitle.prefixedText,<br />
talk<br />
)<br />
end<br />
self.talk = talkText<br />
end<br />
end<br />
<br />
-- Get other values.<br />
self.fix = args.fix ~= '' and args.fix or nil<br />
local date<br />
if args.date and args.date ~= '' then<br />
date = args.date<br />
elseif args.date == '' and self.isTemplatePage then<br />
date = lang:formatDate('F Y')<br />
end<br />
if date then<br />
self.date = string.format(" <small class='date-container'>''(<span class='date'>%s</span>)''</small>", date)<br />
end<br />
self.info = args.info<br />
if yesno(args.removalnotice) then<br />
self.removalNotice = cfg.removalNotice<br />
end<br />
end<br />
<br />
-- Set the non-collapsible text field. At the moment this is used by all box<br />
-- types other than ambox, and also by ambox when small=yes.<br />
if self.isSmall then<br />
self.text = args.smalltext or args.text<br />
else<br />
self.text = args.text<br />
end<br />
<br />
-- Set the below row.<br />
self.below = cfg.below and args.below<br />
<br />
-- General image settings.<br />
self.imageCellDiv = not self.isSmall and cfg.imageCellDiv<br />
self.imageEmptyCell = cfg.imageEmptyCell<br />
if cfg.imageEmptyCellStyle then<br />
self.imageEmptyCellStyle = 'border:none;padding:0px;width:1px'<br />
end<br />
<br />
-- Left image settings.<br />
local imageLeft = self.isSmall and args.smallimage or args.image<br />
if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none'<br />
or not cfg.imageCheckBlank and imageLeft ~= 'none'<br />
then<br />
self.imageLeft = imageLeft<br />
if not imageLeft then<br />
local imageSize = self.isSmall<br />
and (cfg.imageSmallSize or '30x30px')<br />
or '40x40px'<br />
self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage<br />
or 'Imbox notice.png', imageSize)<br />
end<br />
end<br />
<br />
-- Right image settings.<br />
local imageRight = self.isSmall and args.smallimageright or args.imageright<br />
if not (cfg.imageRightNone and imageRight == 'none') then<br />
self.imageRight = imageRight<br />
end<br />
end<br />
<br />
function MessageBox:setMainspaceCategories()<br />
local args = self.args<br />
local cfg = self.cfg<br />
<br />
if not cfg.allowMainspaceCategories then<br />
return nil<br />
end<br />
<br />
local nums = {}<br />
for _, prefix in ipairs{'cat', 'category', 'all'} do<br />
args[prefix .. '1'] = args[prefix]<br />
nums = union(nums, getArgNums(args, prefix))<br />
end<br />
<br />
-- The following is roughly equivalent to the old {{Ambox/category}}.<br />
local date = args.date<br />
date = type(date) == 'string' and date<br />
local preposition = 'from'<br />
for _, num in ipairs(nums) do<br />
local mainCat = args['cat' .. tostring(num)]<br />
or args['category' .. tostring(num)]<br />
local allCat = args['all' .. tostring(num)]<br />
mainCat = type(mainCat) == 'string' and mainCat<br />
allCat = type(allCat) == 'string' and allCat<br />
if mainCat and date and date ~= '' then<br />
local catTitle = string.format('%s %s %s', mainCat, preposition, date)<br />
self:addCat(0, catTitle)<br />
catTitle = getTitleObject('Category:' .. catTitle)<br />
if not catTitle or not catTitle.exists then<br />
self:addCat(0, 'Articles with invalid date parameter in template')<br />
end<br />
elseif mainCat and (not date or date == '') then<br />
self:addCat(0, mainCat)<br />
end<br />
if allCat then<br />
self:addCat(0, allCat)<br />
end<br />
end<br />
end<br />
<br />
function MessageBox:setTemplateCategories()<br />
local args = self.args<br />
local cfg = self.cfg<br />
<br />
-- Add template categories.<br />
if cfg.templateCategory then<br />
if cfg.templateCategoryRequireName then<br />
if self.isTemplatePage then<br />
self:addCat(10, cfg.templateCategory)<br />
end<br />
elseif not self.title.isSubpage then<br />
self:addCat(10, cfg.templateCategory)<br />
end<br />
end<br />
<br />
-- Add template error categories.<br />
if cfg.templateErrorCategory then<br />
local templateErrorCategory = cfg.templateErrorCategory<br />
local templateCat, templateSort<br />
if not self.name and not self.title.isSubpage then<br />
templateCat = templateErrorCategory<br />
elseif self.isTemplatePage then<br />
local paramsToCheck = cfg.templateErrorParamsToCheck or {}<br />
local count = 0<br />
for i, param in ipairs(paramsToCheck) do<br />
if not args[param] then<br />
count = count + 1<br />
end<br />
end<br />
if count > 0 then<br />
templateCat = templateErrorCategory<br />
templateSort = tostring(count)<br />
end<br />
if self.categoryNums and #self.categoryNums > 0 then<br />
templateCat = templateErrorCategory<br />
templateSort = 'C'<br />
end<br />
end<br />
self:addCat(10, templateCat, templateSort)<br />
end<br />
end<br />
<br />
function MessageBox:setAllNamespaceCategories()<br />
-- Set categories for all namespaces.<br />
if self.invalidTypeError then<br />
local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText<br />
self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort)<br />
end<br />
if self.isSubstituted then<br />
self:addCat('all', 'Pages with incorrectly substituted templates')<br />
end<br />
end<br />
<br />
function MessageBox:setCategories()<br />
if self.title.namespace == 0 then<br />
self:setMainspaceCategories()<br />
elseif self.title.namespace == 10 then<br />
self:setTemplateCategories()<br />
end<br />
self:setAllNamespaceCategories()<br />
end<br />
<br />
function MessageBox:renderCategories()<br />
if not self.hasCategories then<br />
-- No categories added, no need to pass them to Category handler so,<br />
-- if it was invoked, it would return the empty string.<br />
-- So we shortcut and return the empty string.<br />
return ""<br />
end<br />
-- Convert category tables to strings and pass them through<br />
-- [[Module:Category handler]].<br />
return require('Module:Category handler')._main{<br />
main = table.concat(self.categories[0] or {}),<br />
template = table.concat(self.categories[10] or {}),<br />
all = table.concat(self.categories.all or {}),<br />
nocat = self.args.nocat,<br />
page = self.args.page<br />
}<br />
end<br />
<br />
function MessageBox:export()<br />
local root = mw.html.create()<br />
<br />
-- Add the subst check error.<br />
if self.isSubstituted and self.name then<br />
root:tag('b')<br />
:addClass('error')<br />
:wikitext(string.format(<br />
'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.',<br />
mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}')<br />
))<br />
end<br />
<br />
-- Create the box table.<br />
local boxTable = root:tag('table')<br />
boxTable:attr('id', self.id or nil)<br />
for i, class in ipairs(self.classes or {}) do<br />
boxTable:addClass(class or nil)<br />
end<br />
boxTable<br />
:cssText(self.style or nil)<br />
:attr('role', 'presentation')<br />
<br />
if self.attrs then<br />
boxTable:attr(self.attrs)<br />
end<br />
<br />
-- Add the left-hand image.<br />
local row = boxTable:tag('tr')<br />
if self.imageLeft then<br />
local imageLeftCell = row:tag('td'):addClass('mbox-image')<br />
if self.imageCellDiv then<br />
-- If we are using a div, redefine imageLeftCell so that the image<br />
-- is inside it. Divs use style="width: 52px;", which limits the<br />
-- image width to 52px. If any images in a div are wider than that,<br />
-- they may overlap with the text or cause other display problems.<br />
imageLeftCell = imageLeftCell:tag('div'):css('width', '52px')<br />
end<br />
imageLeftCell:wikitext(self.imageLeft or nil)<br />
elseif self.imageEmptyCell then<br />
-- Some message boxes define an empty cell if no image is specified, and<br />
-- some don't. The old template code in templates where empty cells are<br />
-- specified gives the following hint: "No image. Cell with some width<br />
-- or padding necessary for text cell to have 100% width."<br />
row:tag('td')<br />
:addClass('mbox-empty-cell')<br />
:cssText(self.imageEmptyCellStyle or nil)<br />
end<br />
<br />
-- Add the text.<br />
local textCell = row:tag('td'):addClass('mbox-text')<br />
if self.useCollapsibleTextFields then<br />
-- The message box uses advanced text parameters that allow things to be<br />
-- collapsible. At the moment, only ambox uses this.<br />
textCell:cssText(self.textstyle or nil)<br />
local textCellDiv = textCell:tag('div')<br />
textCellDiv<br />
:addClass('mbox-text-span')<br />
:wikitext(self.issue or nil)<br />
if (self.talk or self.fix) and not self.isSmall then<br />
textCellDiv:tag('span')<br />
:addClass('hide-when-compact')<br />
:wikitext(self.talk and (' ' .. self.talk) or nil)<br />
:wikitext(self.fix and (' ' .. self.fix) or nil)<br />
end<br />
textCellDiv:wikitext(self.date and (' ' .. self.date) or nil)<br />
if self.info and not self.isSmall then<br />
textCellDiv<br />
:tag('span')<br />
:addClass('hide-when-compact')<br />
:wikitext(self.info and (' ' .. self.info) or nil)<br />
end<br />
if self.removalNotice then<br />
textCellDiv:tag('small')<br />
:addClass('hide-when-compact')<br />
:tag('i')<br />
:wikitext(string.format(" (%s)", self.removalNotice))<br />
end<br />
else<br />
-- Default text formatting - anything goes.<br />
textCell<br />
:cssText(self.textstyle or nil)<br />
:wikitext(self.text or nil)<br />
end<br />
<br />
-- Add the right-hand image.<br />
if self.imageRight then<br />
local imageRightCell = row:tag('td'):addClass('mbox-imageright')<br />
if self.imageCellDiv then<br />
-- If we are using a div, redefine imageRightCell so that the image<br />
-- is inside it.<br />
imageRightCell = imageRightCell:tag('div'):css('width', '52px')<br />
end<br />
imageRightCell<br />
:wikitext(self.imageRight or nil)<br />
end<br />
<br />
-- Add the below row.<br />
if self.below then<br />
boxTable:tag('tr')<br />
:tag('td')<br />
:attr('colspan', self.imageRight and '3' or '2')<br />
:addClass('mbox-text')<br />
:cssText(self.textstyle or nil)<br />
:wikitext(self.below or nil)<br />
end<br />
<br />
-- Add error message for invalid type parameters.<br />
if self.invalidTypeError then<br />
root:tag('div')<br />
:css('text-align', 'center')<br />
:wikitext(string.format(<br />
'This message box is using an invalid "type=%s" parameter and needs fixing.',<br />
self.type or ''<br />
))<br />
end<br />
<br />
-- Add categories.<br />
root:wikitext(self:renderCategories() or nil)<br />
<br />
return tostring(root)<br />
end<br />
<br />
--------------------------------------------------------------------------------<br />
-- Exports<br />
--------------------------------------------------------------------------------<br />
<br />
local p, mt = {}, {}<br />
<br />
function p._exportClasses()<br />
-- For testing.<br />
return {<br />
MessageBox = MessageBox<br />
}<br />
end<br />
<br />
function p.main(boxType, args, cfgTables)<br />
local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE))<br />
box:setParameters()<br />
box:setCategories()<br />
return box:export()<br />
end<br />
<br />
function mt.__index(t, k)<br />
return function (frame)<br />
if not getArgs then<br />
getArgs = require('Module:Arguments').getArgs<br />
end<br />
return t.main(k, getArgs(frame, {trim = false, removeBlanks = false}))<br />
end<br />
end<br />
<br />
return setmetatable(p, mt)</div>
Wikipedia>MSGJ