Module:Side box: Difference between revisions

From NvWiki
Jump to navigation Jump to search
 
d'oh
Line 1: Line 1:
#REDIRECT [[Template talk:Side box]]
==Plainlinks?==
{{Side box|text=Some [http://example.com external link] (invalid example.com) using {{Tl|Side box}}}}
{{Listen|pos=left|help=no|filename=Accordion chords-01.ogg|title=Accordion chords (using Listen)|description=Some [http://example.com external link] (invalid example.com)}}
I noticed that external links in the parameter {{Para|description}} of the template {{Tl|Listen}} are not shown as such ([[File:External.png]]). Examining that template showed that it uses {{Tl|Side box}} where {{mono|1=class="plainlinks"}} is used. Is this behaviour deliberate or an unintended side effect? -- [[User:Michael Bednarek|Michael Bednarek]] ([[User talk:Michael Bednarek|talk]]) 05:49, 30 June 2010 (UTC)
 
: Definitely unintended. Can this be overridden? [[user:thumperward|Chris Cunningham (not at work)]] - [[user talk:thumperward|talk]] 12:30, 6 July 2010 (UTC)
::I don't know; why not simply remove the {{mono|plainlinks}} class? -- [[User:Michael Bednarek|Michael Bednarek]] ([[User talk:Michael Bednarek|talk]]) 12:36, 6 July 2010 (UTC)
 
::: The sisterlinks templates all use it. Truth be told, {{tl|listen}} really shouldn't be subclassing here in the first place, as it's very different from the other templates that use it. [[user:thumperward|Chris Cunningham (not at work)]] - [[user talk:thumperward|talk]] 13:06, 6 July 2010 (UTC)
 
::::That (sisterlinks) makes sense. I'm not technically savvy enough with templates to re-write {{tl|Listen}}. Maybe {{mono|plainlinks}} can be overridden with some kind of {{mono|<nowiki><div></nowiki>}} or {{mono|<nowiki><span></nowiki>}}? -- [[User:Michael Bednarek|Michael Bednarek]] ([[User talk:Michael Bednarek|talk]]) 13:45, 6 July 2010 (UTC)
 
== above parameter? ==
 
When I was looking at {{tl|Interwiki category}}, I wanted ''above'' parameter like ''below''. It would be useful. Here's [{{fullurl:Template:Side box/sandbox|oldid=443903740}} the sandbox]. --[[User:Fryed-peach|fryed-peach]] ([[User talk:Fryed-peach|talk]]) 17:33, 9 August 2011 (UTC)
 
: I've massaged this into the current codebase, minus some additional changes that weren't present in the proposal. [[User:Thumperward|Chris Cunningham (user:thumperward)]] ([[User talk:Thumperward|talk]]) 15:26, 15 August 2012 (UTC)
 
== Edit request on 23 August 2013 ==
 
{{edit protected|<!-- Page to be edited -->|answered=yes}}
<!-- Begin request -->
Replace
metadata
with
<nowiki>{{#ifeq:{{lc:{{{metadata|}}}}}|no||metadata}}</nowiki>
so this template can be used for content like it says on the tin.
<!-- End request -->
— [[User:Lfdder|Lfdder]] ([[User talk:Lfdder|talk]]) 11:16, 23 August 2013 (UTC)
 
:{{done}} [[User:Happy-melon|<b style="color:forestgreen">Happy</b>]]‑[[User talk:Happy-melon|<b style="color:darkorange">melon</b>]] 11:36, 23 August 2013 (UTC)
::Thanks. Can you also look at the edit request [[Template_talk:Listen#Edit_request_on_23_August_2013|here]]? — [[User:Lfdder|Lfdder]] ([[User talk:Lfdder|talk]]) 11:37, 23 August 2013 (UTC)
 
== Conversion to Lua ==
 
I've written a Lua version of this template at [[Module:Side box]]. You can test it out using {{tl|side box/sandbox}}, and there are test cases at [[Module:Side box/testcases]] ([[Module talk:Side box/testcases|run]]) and [[Template:Side box/testcases]]. It should be a one-for-one switch, apart from the {{para|metadata}} parameter now accepting "no", "n", "false", and "0" to suppress the "metadata" class. This particular template isn't too resource-hungry, but it needs to be converted to Lua to allow some of its resource-hungry daughter templates, such as {{tl|listen}}, to be converted as well. Does anyone have any objections to be updating the template? — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 07:10, 2 June 2014 (UTC)
:I've gone ahead and converted it. Please let me know if you notice any odd behaviour from any side-box-related templates. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 05:01, 3 June 2014 (UTC)
 
* Thanks for your work, Mr. Stradivarius. I notice that the default styling produces a box that's nearly but not quite as wide as the 22.0em default set for e.g. {{tl|Sidebar}} – is this deliberate and/or due to the Firefox-based browser I use and/or worth amending..? [[User:Sardanaphalus|Sardanaphalus]] ([[User talk:Sardanaphalus|talk]]) 12:43, 19 June 2014 (UTC)
*:{{ping|Sardanaphalus}} That's set by the mbox-small class, not by the module directly. A look at [[MediaWiki:Common.css]] shows that it sets the width to 238px. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 13:36, 19 June 2014 (UTC)
*:: Thanks for pointing out. I'll leave a query on the talkpage there. (Incidentally, any advice about [[MediaWiki talk:Common.css#navbox-level3 / navbox-levelN classes?|this query there]]..?) [[User:Sardanaphalus|Sardanaphalus]] ([[User talk:Sardanaphalus|talk]]) 08:58, 28 June 2014 (UTC)
 
== Protected edit request on 30 November 2014 ==
 
{{edit protected|Template:Side box|answered=yes}}
<!-- Begin request -->
This template should have its own class. Currently, it uses mbox and mbox-text classes, which blocks setting the width:auto for any use case. --[[User:Rezonansowy|Rezonansowy]] <small>([[User talk:Rezonansowy|talk]] | [[Special:Contributions/Rezonansowy|contribs]])</small> 15:50, 30 November 2014 (UTC)
<!-- End request -->
[[User:Rezonansowy|Rezonansowy]] <small>([[User talk:Rezonansowy|talk]] | [[Special:Contributions/Rezonansowy|contribs]])</small> 15:50, 30 November 2014 (UTC)
:Please make your requested changes to the template's sandbox first; see [[WP:TESTCASES]].<!-- Template:EP --> {{U|Rezonansowy}}, what do you mean it "blocks setting the width:auto"?  Something like this would need to be sandboxed before being carried out anyways, so let's work through it. — <span class="nowrap">&#123;&#123;U&#124;[[User:Technical 13|Technical 13]]&#125;&#125; <sup>([[Special:EmailUser/Technical 13|e]] • [[User talk:Technical 13|t]] • [[Special:Contribs/Technical 13|c]])</sup></span> 21:50, 30 November 2014 (UTC)
::{{ping|Technical 13}} I'm not able to create a sandbox for a non-existing CSS class. Just create a separate CSS class for it and remove the width=100% property. --[[User:Rezonansowy|Rezonansowy<sub>aka</sub>''Rezy'']] <small>([[User talk:Rezonansowy|talk]] | [[Special:Contributions/Rezonansowy|contribs]])</small> 13:10, 24 January 2015 (UTC)
:[[File:Red information icon with gradient background.svg|20px|link=]] '''Not done for now:'''<!-- Template:EP --> A class isn't needed for that.  Where is the use case for where you need to set the width to auto?  Simply add <code>|style = width: auto !important</code> and it will override the <code>width: 100%;</code> all by itself.  If I'm misunderstanding you, then please show me where you want to use this feature and tell me why it is needed and I'll try to help you make it happen (even though this is a Lua module which I'm not very good with yet, I've set up a sandbox to play with and try and make needed adjustments). — <code class="nowrap">&#123;&#123;U&#124;[[User:Technical 13|Technical 13]]&#125;&#125; <sup>([[Special:EmailUser/Technical 13|e]] • [[User talk:Technical 13|t]] • [[Special:Contribs/Technical 13|c]])</sup></code> 16:42, 24 January 2015 (UTC)
 
== belowstyle? / "text"==
 
This template/module doesn't appear to offer a ''belowstyle'' parameter – is this correct/intentional? If so, any particular reason why..? If not intentional, may it be added..? [[User:Sardanaphalus|Sardanaphalus]] ([[User talk:Sardanaphalus|talk]]) 12:22, 15 January 2015 (UTC)
 
PS As text isn't necessarily what might be placed in the middle of the box, could the ''text'' parameter be renamed ''content'' (or ''content'' made an alias for ''text'', or...) and ''textstyle'' renamed ''contentstyle'' (or...), please..?
 
 
== Working with tables ==
It doesn't seem to be working with tables. &nbsp;[ [[User:Derekleungtszhei|<span title="Visit my user page">Derek Leung</span>]] | [[User_talk:Derekleungtszhei|<span title="Leave a message">LM</span>]] ] 16:15, 13 May 2015 (UTC)
 
== Foreground color ==
 
{{edit fully-protected|answered=yes}}
There's an issue with [[Wikipedia:Style sheets for visually impaired users|night mode skins]] where background is overwritten without changing text color leaving white text on white background.  Please change in [[Module:Side box]]:
<pre>css{border = '1px solid #aaa', ['background-color'] = '#f9f9f9'}</pre>
to
<pre>css{border = '1px solid #aaa', ['background-color'] = '#f9f9f9', color = '#000'}</pre>
— [[User:Dispenser|Dispenser]] 22:27, 16 February 2017 (UTC)
:[[File:Yes check.svg|20px|link=|alt=]] '''Done'''<!-- Template:EP --> &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:37, 17 February 2017 (UTC)
 
== Fully protected edit request on 14 May 2017 ==
 
{{Editprotected|Template:Sidebox|answered=yes}}
A protected redirect, '''Template:Sidebox'''{{-r|Template:Sidebox|,}} needs redirect category ([[WP:RCAT|rcat]]) templates added.  Please modify it as follows:
 
* from this:
 
<pre>
#REDIRECT [[Template:Side box]]
</pre>
 
* to this:
 
<pre>
#REDIRECT [[Template:Side box]]
 
{{Redirect category shell|
{{R from move}}
{{R from modification}}
{{R from template shortcut}}
}}
</pre>
 
* {{color|darkred|'''<small>WHEN YOU COPY & PASTE, PLEASE LEAVE THE SKIPPED LINE BLANK FOR READABILITY.</small>'''}}
The {{tl|Redirect category shell}} template is used to sort redirects into one or more categories.  When {{tl|pp-protected}} and/or {{tl|pp-move}} suffice, the ''Redirect category shell'' template will detect the protection level(s) and categorize the redirect automatically.  (Also, the categories will be automatically removed or changed when and if protection is lifted, raised or lowered.)  Thank you in advance! &nbsp;'''''[[User:Paine Ellsworth|<span style="font-size:85%;color:darkblue;font-family:Segoe Script">Paine&nbsp;Ellsworth</span>]]'''''<small>&nbsp;&nbsp;[[User talk:Paine Ellsworth|<sup>put'r&nbsp;there</sup>]]&nbsp;</small>&nbsp;<small>09:21, 14 May 2017 (UTC)</small>
:[[File:Padlock-pink-open.svg|28px|link=|alt=]] '''Not done:''' The page's protection level has changed since this request was placed. You should now be able to [[Help:Editing|edit the page yourself]]. If you still seem to be unable to, please reopen the request with further details.<!-- Template:ETp --> [[User:Jo-Jo Eumerus|Jo-Jo Eumerus]] ([[User talk:Jo-Jo Eumerus|talk]], [[Special:CentralAuth/Jo-Jo Eumerus|contributions]]) 10:22, 14 May 2017 (UTC)
::Thank you very much, [[User:Jo-Jo Eumerus|Jo-Jo Eumerus]]! &nbsp;'''''[[User:Paine Ellsworth|<span style="font-size:85%;color:darkblue;font-family:Segoe Script">Paine&nbsp;Ellsworth</span>]]'''''<small>&nbsp;&nbsp;[[User talk:Paine Ellsworth|<sup>put'r&nbsp;there</sup>]]&nbsp;</small>&nbsp;<small>10:44, 14 May 2017 (UTC)</small>
 
== add the raw code to the documentation ==
 
Hi, I suggest adding something like this to the documentation
 
<pre>
{{Side box |metadata=No
| above = '''''above''''' content appears here, in a separate row above the main text area
| image = {{smaller|('''''image''''')}}
| text = '''''text''''' content, the box's main content, appears here
| imageright = {{longitem|font-size:90%|('''''image<br/>right'''''{{hsp}})}}
| below = '''''below''''' content appears here, in a separate row below the main text area
}}
</pre>
 
to display which code generates the example box on the right. This will also make copy-pasting the code easy. [[User:AadaamS|AadaamS]] ([[User talk:AadaamS|talk]]) 18:05, 17 March 2018 (UTC)
 
== Template-protected edit request on 25 August 2018 ==
 
copies and adaptations you may only make copies or
adaptations of the software for archival purposes or when
copying or adaptation is an essential step in the authorized
use of the software. you must you all copies or adaptations.
you may not copy the software onto any public network.  <!-- Template:Unsigned IP --><small class="autosigned">—&nbsp;Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/2604:2000:E8CC:700:D0B2:B41F:F1D7:BA99|2604:2000:E8CC:700:D0B2:B41F:F1D7:BA99]] ([[User talk:2604:2000:E8CC:700:D0B2:B41F:F1D7:BA99#top|talk]]) 08:23, 25 August 2018 (UTC)</small> <!--Autosigned by SineBot-->
 
== Width seems slightly off ==
{{moved|to=Wikipedia:Village_pump_(technical)#Side_box_width_seems_slightly_off|2=<span style="color:#AAA"><small>&#123;{u&#124;</small><span style="border-radius:9em;padding:0 5px;background:#088">[[User:Sdkb|<span style="color:#FFF">'''Sdkb'''</span>]]</span><small>}&#125;</small></span> <sup>[[User talk:Sdkb|'''talk''']]</sup> 02:14, 14 September 2020 (UTC)}}
 
== Allow disabling plainlist with a parameter ==
 
Hello,<p>At line 109 in [[Module:Side box]] there is the following code:<br /><code>textCell:addClass('mbox-text plainlist')</code></p><p>Please can a parameter be added to disable the 'plainlist' class so that lists with bullet points or numbers can appear in this template?</p><p>Thanks, [[User:DesertPipeline|DesertPipeline]] ([[User talk:DesertPipeline|talk]]) 03:52, 26 June 2021 (UTC)</p>
:@[[User:DesertPipeline|DesertPipeline]]: If nobody beats me to it, I can take a shot at this later today. –&nbsp;[[User talk:Rummskartoffel|<span style="background:linear-gradient(90deg,#e40303,#ff8c00,#ffed00,#008026,#004dff,#750787);color:transparent;background-clip:text;-webkit-background-clip:text;">Rummskartoffel</span>]] 09:19, 26 June 2021 (UTC)
::[[User:Rummskartoffel]]: Thank you very much :) [[User:DesertPipeline|DesertPipeline]] ([[User talk:DesertPipeline|talk]]) 09:27, 26 June 2021 (UTC)
{{TPER|Module:Side box|answered=y}}
:Please apply the changes made in the sandbox ([[Special:Diff/899337436/1030572793|diff]], [[Template:Side box/testcases#plainlist = no|test case]]). This will add a parameter {{para|plainlist}} which, when set to "no", will suppress the "plainlist" class on the main text cell, allowing lists to be displayed normally. The parameter will default to "yes", i.e. the behaviour of existing uses of {{t|Side box}} will not change. For background, compare [[Wikipedia:Help desk#Bullet points not working within Template:Side box?]].<br>After applying the change to the module, please also uncomment the new row for this parameter which I added to the table of parameters at [[Template:Side box/doc]] so that the documentation is up to date. –&nbsp;[[User talk:Rummskartoffel|<span style="background:linear-gradient(90deg,#e40303,#ff8c00,#ffed00,#008026,#004dff,#750787);color:transparent;background-clip:text;-webkit-background-clip:text;">Rummskartoffel</span>]] 20:25, 26 June 2021 (UTC)
::{{u|Rummskartoffel}}, do we know what the use case for this will be (i.e. why are we doing this?). Thanks! [[User:Firefly|<span style="color:#850808;">firefly</span>]] <small>( [[User talk:Firefly|t]] · [[Special:Contributions/Firefly|c]] )</small> 08:25, 28 June 2021 (UTC)
:::@[[User:Firefly|Firefly]]: Since I just made this edit request in response to a help desk post, I don't have a specific use case myself ([[User:DesertPipeline|DesertPipeline]], did you have something specific in mind?). But I don't see an obvious reason why it shouldn't be possible to have a normal-looking list in a side box – that is to say, I don't understand why this template has the "plainlist" class to begin with –, so this seems like a sensible thing to add. –&nbsp;[[User talk:Rummskartoffel|<span style="background:linear-gradient(90deg,#e40303,#ff8c00,#ffed00,#008026,#004dff,#750787);color:transparent;background-clip:text;-webkit-background-clip:text;">Rummskartoffel</span>]] 10:06, 28 June 2021 (UTC)
::::Would it be better to add a {{para|class|none}} parameter or similar which can override plainlist? Having a specific override parameter {{para|plainlist}} would be unnecessary then. This would be useful if you wanted e.g. a {{para|class|hlist}} or something and avoids any need to add a further parameter later. [[User:GKFX]]<sup>[[User talk:GKFX|talk]]</sup> 16:27, 3 July 2021 (UTC)
:::::I'm not sure I'm understanding you correctly. Do you mean that {{para|class}}, when non-empty, would set the classes of the main text cell to only the classes specified (with "none" as a special case)? Or should it always keep {{code|mbox-text}}? Or something else? –&nbsp;[[User talk:Rummskartoffel|<span style="background:linear-gradient(90deg,#e40303,#ff8c00,#ffed00,#008026,#004dff,#750787);color:transparent;background-clip:text;-webkit-background-clip:text;">Rummskartoffel</span>]] 19:22, 3 July 2021 (UTC)
:::[[User:Firefly]]: In my specific case the reason I need this is so that the article [[Trial of Socrates]] can have a box listing some Wikiquote documents with bullet points beside each one to delineate them better. Regards, [[User:DesertPipeline|DesertPipeline]] ([[User talk:DesertPipeline|talk]]) 11:21, 28 June 2021 (UTC)
:::[[User:Firefly]]: Please can you implement the edit request? Thanks, [[User:DesertPipeline|DesertPipeline]] ([[User talk:DesertPipeline|talk]]) 04:52, 12 July 2021 (UTC)
::::{{re|DesertPipeline}} I believe I have implemented effectively what you wanted. I also passed the new {{para|textclass}} parameter through {{tlx|Sister project}} and made an example by implementing it on [[Trial of Socrates]] (which seemed to be what you were trying to accomplish). —[[User:Uzume|Uzume]] ([[User talk:Uzume|talk]]) 07:51, 12 July 2021 (UTC)
:::::[[User:Uzume]]: Thank you very much! :) [[User:DesertPipeline|DesertPipeline]] ([[User talk:DesertPipeline|talk]]) 08:01, 12 July 2021 (UTC)
 
== bug: text flows on the right but not on the left ==
 
If I place the box on the right of a page, the text flows around it, but if I place in on the left, it doesn't. — [[User:Kwamikagami|kwami]] ([[User talk:Kwamikagami|talk]]) 20:56, 10 October 2021 (UTC)
 
== bug: no image on mobile ==
 
The page <code>Crime in Sweden</code> visited on mobile [https://en.m.wikipedia.org/wiki/Crime_in_Sweden] displays the box, with the <code>above</code> and <code>below</code> texts, but not the image. --[[Special:Contributions/62.98.162.83|62.98.162.83]] ([[User talk:62.98.162.83|talk]]) 07:50, 20 January 2022 (UTC)
 
:That's because this template uses mbox styling, and mbox-image is hidden on mobile. I've removed the template as totally unnecessary. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 20:24, 27 May 2022 (UTC)
 
== New edit breaks {{tl|algebraic notation}} ==
 
I'm not sure how to fix this but [[Special:diff/1096940545|this edit]] broke {{tl|algebraic notation}}. When used with {{para|pos|toc}}, it used to look like [https://web.archive.org/web/20220629114058/https://en.wikipedia.org/wiki/Chess this], in a box next to the TOC. [[Chess|Now it's just vertical text]]. But it doesn't stop there; on desktop if you zoom in enough (Ctrl + {{key|+}}), it goes back to normal. ~~&nbsp;[[User:lol1VNIO|lol1<span style="color:#D11D13">VNIO</span>]]&NoBreak;🎌&nbsp;('''[[User talk:lol1VNIO|<span style="color:#006400">talk</span>]]'''&nbsp;• [[Special:contribs/lol1VNIO|contribs]]) 16:18, 10 July 2022 (UTC)
 
:This will be a non-issue in new Vector (e.g. [https://en.wikipedia.org/wiki/Chess?useskin=vector-2022 this view]), and even in current Vector this is not unusable (in [https://en.wikipedia.org/wiki/Chess?useskin=timeless Timeless] it gets hidden behind the table of contents, isn't that nice? :).
:What's different now is that a table is a little more wrappier than a div. I will add some templatestyles for the algebraic notation template to restore the older behavior.
:Regarding "old behavior", that's a coincidence. The reason it does so is different than the older cause. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 17:51, 10 July 2022 (UTC)
::Should be fixed now, +- job queue updates. Null edit a page to see differences. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 18:07, 10 July 2022 (UTC)
:::Thanks! ~~&nbsp;[[User:lol1VNIO|lol1<span style="color:#D11D13">VNIO</span>]]&NoBreak;🎌&nbsp;('''[[User talk:lol1VNIO|<span style="color:#006400">talk</span>]]'''&nbsp;• [[Special:contribs/lol1VNIO|contribs]]) 21:03, 10 July 2022 (UTC)
 
== Bullet points don't work ==
 
Bullet points in the "text" field don't seem to work. [[User:HLHJ|HLHJ]] ([[User talk:HLHJ|talk]]) 23:53, 29 October 2022 (UTC)
:{{ping|HLHJ}} This is because the template adds the "plainlist" CSS class by default, which removes the bullet points from lists. You can work around this by specifying a dummy class to the {{para|textclass}} parameter. For example,
<pre>
{{side box|textclass=vlist|text=
Some text
* foo
* bar
}}
</pre>
:will produce the side bar below:
{{side box|textclass=vlist|text=
Some text
* foo
* bar
}}
:— '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 00:49, 30 October 2022 (UTC)
 
::Thank you, [[User:Mr. Stradivarius|Mr. Stradivarius]]! I'll do that. I assume this behaviour is useful to others. {{smiley}}. [[User:HLHJ|HLHJ]] ([[User talk:HLHJ|talk]]) 00:55, 30 October 2022 (UTC)
:::The plainlist class was originally [https://en.wikipedia.org/w/index.php?title=Template:Side_box&diff=next&oldid=507545514&diffonly=1 added] back in 2012 by [[User:Thumperward|Thumperward]]. His edit summary said that the plainlist class "adds semantic value when multiple elements are used", but I'm not sure exactly why that would be. If we wanted, we could change the default, but we would need to check all of the transclusions to see which ones would need fixing, which would be a pain. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 01:41, 30 October 2022 (UTC)
::::Thank you again. Thumperward may have useful comments; I really have none! Happy with whatever works best for others, it's not a big deal for me. [[User:HLHJ|HLHJ]] ([[User talk:HLHJ|talk]]) 02:16, 30 October 2022 (UTC)
{{side box|textclass=vlist|text=
* Some text
* foo
* bar
}}
:::::Hmm. Does not work flawlessly if the first line is bulleted. [[User:HLHJ|HLHJ]] ([[User talk:HLHJ|talk]]) 02:41, 30 October 2022 (UTC)
::::::You can work around that problem with an [[HTML encoding|HTML-encoded]] space:
<pre>
{{side box|textclass=vlist|text=&amp;#32;
* Some text
* foo
* bar
}}
</pre>
::::::This is because MediaWiki trims the whitespace at the start of the text, so the newline character disappears. By adding the HTML-encoded space, the newline character is included. (It is hardly elegant, however.) The output looks like this:
{{side box|textclass=vlist|text=&#32;
* Some text
* foo
* bar
}}
::::::— '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 08:40, 30 October 2022 (UTC)
 
{{od}} I think changing the default after a decade is likely to have a ''somewhat'' deleterious effect considering that there are presently '''1038789''' transclusions of this template. Apologies if I'm a little out of the loop here as I haven't thought about this template in years, but the [[Template:Side box/testcases#plainlist_.3D_no|test cases]] page suggests that a year ago {{user|Rummskartoffel}} [https://en.wikipedia.org/w/index.php?title=Template:Side_box/testcases&diff=1030573844&oldid=771521548 introduced a test case] for a <code>plainlist=no</code> parameter. This doesn't ever seem to have actually been implemented in the code. I think that's probably the right approach if someone wants to look into it. If you need help please feel free to ping me. [[User:Thumperward|Chris Cunningham (user:thumperward)]] ([[User talk:Thumperward|talk]]) 12:25, 30 October 2022 (UTC)

Revision as of 12:25, 30 October 2022

Plainlinks?

Lua error at line 1: unexpected symbol near '=='. Template:Listen I noticed that external links in the parameter |description= of the template {{Listen}} are not shown as such (File:External.png). Examining that template showed that it uses {{Side box}} where Template:Mono is used. Is this behaviour deliberate or an unintended side effect? -- Michael Bednarek (talk) 05:49, 30 June 2010 (UTC)

Definitely unintended. Can this be overridden? Chris Cunningham (not at work) - talk 12:30, 6 July 2010 (UTC)
I don't know; why not simply remove the Template:Mono class? -- Michael Bednarek (talk) 12:36, 6 July 2010 (UTC)
The sisterlinks templates all use it. Truth be told, {{listen}} really shouldn't be subclassing here in the first place, as it's very different from the other templates that use it. Chris Cunningham (not at work) - talk 13:06, 6 July 2010 (UTC)
That (sisterlinks) makes sense. I'm not technically savvy enough with templates to re-write {{Listen}}. Maybe Template:Mono can be overridden with some kind of Template:Mono or Template:Mono? -- Michael Bednarek (talk) 13:45, 6 July 2010 (UTC)

above parameter?

When I was looking at {{Interwiki category}}, I wanted above parameter like below. It would be useful. Here's the sandbox. --fryed-peach (talk) 17:33, 9 August 2011 (UTC)

I've massaged this into the current codebase, minus some additional changes that weren't present in the proposal. Chris Cunningham (user:thumperward) (talk) 15:26, 15 August 2012 (UTC)

Edit request on 23 August 2013

Template:Edit protected Replace

metadata

with

{{#ifeq:{{lc:{{{metadata|}}}}}|no||metadata}}

so this template can be used for content like it says on the tin. — Lfdder (talk) 11:16, 23 August 2013 (UTC)

Template:Done Happymelon 11:36, 23 August 2013 (UTC)
Thanks. Can you also look at the edit request here? — Lfdder (talk) 11:37, 23 August 2013 (UTC)

Conversion to Lua

I've written a Lua version of this template at Module:Side box. You can test it out using {{side box/sandbox}}, and there are test cases at Module:Side box/testcases (run) and Template:Side box/testcases. It should be a one-for-one switch, apart from the |metadata= parameter now accepting "no", "n", "false", and "0" to suppress the "metadata" class. This particular template isn't too resource-hungry, but it needs to be converted to Lua to allow some of its resource-hungry daughter templates, such as {{listen}}, to be converted as well. Does anyone have any objections to be updating the template? — Mr. Stradivarius ♪ talk ♪ 07:10, 2 June 2014 (UTC)

I've gone ahead and converted it. Please let me know if you notice any odd behaviour from any side-box-related templates. — Mr. Stradivarius ♪ talk ♪ 05:01, 3 June 2014 (UTC)
  • Thanks for your work, Mr. Stradivarius. I notice that the default styling produces a box that's nearly but not quite as wide as the 22.0em default set for e.g. {{Sidebar}} – is this deliberate and/or due to the Firefox-based browser I use and/or worth amending..? Sardanaphalus (talk) 12:43, 19 June 2014 (UTC)
    Template:Ping That's set by the mbox-small class, not by the module directly. A look at MediaWiki:Common.css shows that it sets the width to 238px. — Mr. Stradivarius ♪ talk ♪ 13:36, 19 June 2014 (UTC)
    Thanks for pointing out. I'll leave a query on the talkpage there. (Incidentally, any advice about this query there..?) Sardanaphalus (talk) 08:58, 28 June 2014 (UTC)

Protected edit request on 30 November 2014

Template:Edit protected This template should have its own class. Currently, it uses mbox and mbox-text classes, which blocks setting the width:auto for any use case. --Rezonansowy (talk | contribs) 15:50, 30 November 2014 (UTC) Rezonansowy (talk | contribs) 15:50, 30 November 2014 (UTC)

Please make your requested changes to the template's sandbox first; see WP:TESTCASES. Template:U, what do you mean it "blocks setting the width:auto"? Something like this would need to be sandboxed before being carried out anyways, so let's work through it. — {{U|Technical 13}} (etc) 21:50, 30 November 2014 (UTC)
Template:Ping I'm not able to create a sandbox for a non-existing CSS class. Just create a separate CSS class for it and remove the width=100% property. --RezonansowyakaRezy (talk | contribs) 13:10, 24 January 2015 (UTC)
File:Red information icon with gradient background.svg Not done for now: A class isn't needed for that. Where is the use case for where you need to set the width to auto? Simply add |style = width: auto !important and it will override the width: 100%; all by itself. If I'm misunderstanding you, then please show me where you want to use this feature and tell me why it is needed and I'll try to help you make it happen (even though this is a Lua module which I'm not very good with yet, I've set up a sandbox to play with and try and make needed adjustments). — {{U|Technical 13}} (etc) 16:42, 24 January 2015 (UTC)

belowstyle? / "text"

This template/module doesn't appear to offer a belowstyle parameter – is this correct/intentional? If so, any particular reason why..? If not intentional, may it be added..? Sardanaphalus (talk) 12:22, 15 January 2015 (UTC)

PS As text isn't necessarily what might be placed in the middle of the box, could the text parameter be renamed content (or content made an alias for text, or...) and textstyle renamed contentstyle (or...), please..?


Working with tables

It doesn't seem to be working with tables.  [ Derek Leung | LM ] 16:15, 13 May 2015 (UTC)

Foreground color

Template:Edit fully-protected There's an issue with night mode skins where background is overwritten without changing text color leaving white text on white background. Please change in Module:Side box:

css{border = '1px solid #aaa', ['background-color'] = '#f9f9f9'}

to

css{border = '1px solid #aaa', ['background-color'] = '#f9f9f9', color = '#000'}

Dispenser 22:27, 16 February 2017 (UTC)

File:Yes check.svg Done — Martin (MSGJ · talk) 14:37, 17 February 2017 (UTC)

Fully protected edit request on 14 May 2017

Template:Editprotected A protected redirect, Template:SideboxTemplate:-r needs redirect category (rcat) templates added. Please modify it as follows:

  • from this:
#REDIRECT [[Template:Side box]]
  • to this:
#REDIRECT [[Template:Side box]]

{{Redirect category shell|
{{R from move}}
{{R from modification}}
{{R from template shortcut}}
}}

The {{Redirect category shell}} template is used to sort redirects into one or more categories. When {{pp-protected}} and/or {{pp-move}} suffice, the Redirect category shell template will detect the protection level(s) and categorize the redirect automatically. (Also, the categories will be automatically removed or changed when and if protection is lifted, raised or lowered.) Thank you in advance!  Paine Ellsworth  put'r there  09:21, 14 May 2017 (UTC)

File:Padlock-pink-open.svg Not done: The page's protection level has changed since this request was placed. You should now be able to edit the page yourself. If you still seem to be unable to, please reopen the request with further details. Jo-Jo Eumerus (talk, contributions) 10:22, 14 May 2017 (UTC)
Thank you very much, Jo-Jo Eumerus!  Paine Ellsworth  put'r there  10:44, 14 May 2017 (UTC)

add the raw code to the documentation

Hi, I suggest adding something like this to the documentation

{{Side box |metadata=No
 | above = '''''above''''' content appears here, in a separate row above the main text area
 | image = {{smaller|('''''image''''')}} 
 | text = '''''text''''' content, the box's main content, appears here
 | imageright = {{longitem|font-size:90%|('''''image<br/>right'''''{{hsp}})}}
 | below = '''''below''''' content appears here, in a separate row below the main text area
}}

to display which code generates the example box on the right. This will also make copy-pasting the code easy. AadaamS (talk) 18:05, 17 March 2018 (UTC)

Template-protected edit request on 25 August 2018

copies and adaptations you may only make copies or adaptations of the software for archival purposes or when copying or adaptation is an essential step in the authorized use of the software. you must you all copies or adaptations. you may not copy the software onto any public network. — Preceding unsigned comment added by 2604:2000:E8CC:700:D0B2:B41F:F1D7:BA99 (talk) 08:23, 25 August 2018 (UTC)

Width seems slightly off

Template:Moved

Allow disabling plainlist with a parameter

Hello,

At line 109 in Module:Side box there is the following code:
textCell:addClass('mbox-text plainlist')

Please can a parameter be added to disable the 'plainlist' class so that lists with bullet points or numbers can appear in this template?

Thanks, DesertPipeline (talk) 03:52, 26 June 2021 (UTC)

@DesertPipeline: If nobody beats me to it, I can take a shot at this later today. – Rummskartoffel 09:19, 26 June 2021 (UTC)
User:Rummskartoffel: Thank you very much :) DesertPipeline (talk) 09:27, 26 June 2021 (UTC)

Template:TPER

Please apply the changes made in the sandbox (diff, test case). This will add a parameter |plainlist= which, when set to "no", will suppress the "plainlist" class on the main text cell, allowing lists to be displayed normally. The parameter will default to "yes", i.e. the behaviour of existing uses of Template:T will not change. For background, compare Wikipedia:Help desk#Bullet points not working within Template:Side box?.
After applying the change to the module, please also uncomment the new row for this parameter which I added to the table of parameters at Template:Side box/doc so that the documentation is up to date. – Rummskartoffel 20:25, 26 June 2021 (UTC)
Template:U, do we know what the use case for this will be (i.e. why are we doing this?). Thanks! firefly ( t · c ) 08:25, 28 June 2021 (UTC)
@Firefly: Since I just made this edit request in response to a help desk post, I don't have a specific use case myself (DesertPipeline, did you have something specific in mind?). But I don't see an obvious reason why it shouldn't be possible to have a normal-looking list in a side box – that is to say, I don't understand why this template has the "plainlist" class to begin with –, so this seems like a sensible thing to add. – Rummskartoffel 10:06, 28 June 2021 (UTC)
Would it be better to add a |class=none parameter or similar which can override plainlist? Having a specific override parameter |plainlist= would be unnecessary then. This would be useful if you wanted e.g. a |class=hlist or something and avoids any need to add a further parameter later. User:GKFXtalk 16:27, 3 July 2021 (UTC)
I'm not sure I'm understanding you correctly. Do you mean that |class=, when non-empty, would set the classes of the main text cell to only the classes specified (with "none" as a special case)? Or should it always keep Template:Code? Or something else? – Rummskartoffel 19:22, 3 July 2021 (UTC)
User:Firefly: In my specific case the reason I need this is so that the article Trial of Socrates can have a box listing some Wikiquote documents with bullet points beside each one to delineate them better. Regards, DesertPipeline (talk) 11:21, 28 June 2021 (UTC)
User:Firefly: Please can you implement the edit request? Thanks, DesertPipeline (talk) 04:52, 12 July 2021 (UTC)
Template:Re I believe I have implemented effectively what you wanted. I also passed the new |textclass= parameter through {{Sister project}} and made an example by implementing it on Trial of Socrates (which seemed to be what you were trying to accomplish). —Uzume (talk) 07:51, 12 July 2021 (UTC)
User:Uzume: Thank you very much! :) DesertPipeline (talk) 08:01, 12 July 2021 (UTC)

bug: text flows on the right but not on the left

If I place the box on the right of a page, the text flows around it, but if I place in on the left, it doesn't. — kwami (talk) 20:56, 10 October 2021 (UTC)

bug: no image on mobile

The page Crime in Sweden visited on mobile [1] displays the box, with the above and below texts, but not the image. --62.98.162.83 (talk) 07:50, 20 January 2022 (UTC)

That's because this template uses mbox styling, and mbox-image is hidden on mobile. I've removed the template as totally unnecessary. Izno (talk) 20:24, 27 May 2022 (UTC)

New edit breaks {{algebraic notation}}

I'm not sure how to fix this but this edit broke {{algebraic notation}}. When used with |pos=toc, it used to look like this, in a box next to the TOC. Now it's just vertical text. But it doesn't stop there; on desktop if you zoom in enough (Ctrl + Template:Key), it goes back to normal. ~~ lol1VNIO⁠🎌 (talk • contribs) 16:18, 10 July 2022 (UTC)

This will be a non-issue in new Vector (e.g. this view), and even in current Vector this is not unusable (in Timeless it gets hidden behind the table of contents, isn't that nice? :).
What's different now is that a table is a little more wrappier than a div. I will add some templatestyles for the algebraic notation template to restore the older behavior.
Regarding "old behavior", that's a coincidence. The reason it does so is different than the older cause. Izno (talk) 17:51, 10 July 2022 (UTC)
Should be fixed now, +- job queue updates. Null edit a page to see differences. Izno (talk) 18:07, 10 July 2022 (UTC)
Thanks! ~~ lol1VNIO⁠🎌 (talk • contribs) 21:03, 10 July 2022 (UTC)

Bullet points don't work

Bullet points in the "text" field don't seem to work. HLHJ (talk) 23:53, 29 October 2022 (UTC)

Template:Ping This is because the template adds the "plainlist" CSS class by default, which removes the bullet points from lists. You can work around this by specifying a dummy class to the |textclass= parameter. For example,
{{side box|textclass=vlist|text=
Some text
* foo
* bar
}}
will produce the side bar below:

Lua error at line 1: unexpected symbol near '=='.

Mr. Stradivarius ♪ talk ♪ 00:49, 30 October 2022 (UTC)
Thank you, Mr. Stradivarius! I'll do that. I assume this behaviour is useful to others. Template:Smiley. HLHJ (talk) 00:55, 30 October 2022 (UTC)
The plainlist class was originally added back in 2012 by Thumperward. His edit summary said that the plainlist class "adds semantic value when multiple elements are used", but I'm not sure exactly why that would be. If we wanted, we could change the default, but we would need to check all of the transclusions to see which ones would need fixing, which would be a pain. — Mr. Stradivarius ♪ talk ♪ 01:41, 30 October 2022 (UTC)
Thank you again. Thumperward may have useful comments; I really have none! Happy with whatever works best for others, it's not a big deal for me. HLHJ (talk) 02:16, 30 October 2022 (UTC)

Lua error at line 1: unexpected symbol near '=='.

Hmm. Does not work flawlessly if the first line is bulleted. HLHJ (talk) 02:41, 30 October 2022 (UTC)
You can work around that problem with an HTML-encoded space:
{{side box|textclass=vlist|text=&#32;
* Some text
* foo
* bar
}}
This is because MediaWiki trims the whitespace at the start of the text, so the newline character disappears. By adding the HTML-encoded space, the newline character is included. (It is hardly elegant, however.) The output looks like this:

Lua error at line 1: unexpected symbol near '=='.

Mr. Stradivarius ♪ talk ♪ 08:40, 30 October 2022 (UTC)

Template:Od I think changing the default after a decade is likely to have a somewhat deleterious effect considering that there are presently 1038789 transclusions of this template. Apologies if I'm a little out of the loop here as I haven't thought about this template in years, but the test cases page suggests that a year ago Template:User introduced a test case for a plainlist=no parameter. This doesn't ever seem to have actually been implemented in the code. I think that's probably the right approach if someone wants to look into it. If you need help please feel free to ping me. Chris Cunningham (user:thumperward) (talk) 12:25, 30 October 2022 (UTC)