Jump to content

Template talk:Userbox

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Mochi StarStrike (talk | contribs) at 15:40, 15 April 2022 (→‎i cant add an image: new section). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

WikiProject iconUserboxes
WikiProject iconTemplate:Userbox is part of WikiProject Userboxes. This means that the WikiProject has identified it as part of the userboxes system. WikiProject Userboxes itself is an attempt to improve, grow, and standardize Wikipedia's articles and templates related to the userbox system, used on many users' pages. We need all your help, so join in today!

Template-protected edit request on 20 February 2020

I am using the compact version of Template:Userbox-2, which looks like this:

{{userbox-2|side-box 1 color|main box color|ID/icon 1|message|ID/icon 2|border color|side-box 2 color}}

When using this template in the compact state, {{{6}}} (or border color) does nothing. It clearly says in the documentation that it is supposed to change the border color. Additionally, if {{{1}}} (or side-box 1 color) is defined, setting the |border-c= parameter does nothing.

To combat this, I propose the following edit:

128.	data.borderColor = args[1] or args['border-c'] or args['id1-c'] or '#999999'

to

128.	data.borderColor = args['border-c'] or args[6] or args['id1-c'] or args[1] or '#999999'

I'm not 100% familiar with Lua, but I can see this working. --Diriector_DocTalk
Contribs
━━━┥ 06:49, 20 February 2020 (UTC)[reply]

 Done I've also changed a few other params to prefer the named params to the numbered params.

Border problem

Help needed: I can't get my userbox to show the image (35px) without the blue borders. Sadkσ (talk is cheap) 23:03, 18 May 2020 (UTC)[reply]

This user loves rasperries.
Sadko, the color around the image is the background color of the id box. It's controlled through parameter |id-c=. The color of the border around the whole userbox is controlled through |border-c=. Here I've chosen colors magenta and purple with |border-s=3 for demonstration purposes. —⁠andrybak (talk) 23:54, 18 May 2020 (UTC)[reply]
This user loves rasperries.
I understand, but is it possible to have the image stretched accross the little square (35px), without the blue border? ty, Sadkσ (talk is cheap) 00:16, 19 May 2020 (UTC)[reply]
Sadko, do you want to increase the image size to fill the id box, or something else? You could try tweaking image size. Demo below with height set to 45 pixels. —⁠andrybak (talk) 01:33, 19 May 2020 (UTC)[reply]
This user loves rasperries.
Sorry if I did not sound clear enough. My idea is for the image to fill only the are of the squares on the side (image+blue borders), so that there is no blue border left around the image and not make the added image more wide, as a large number of our userboxes are 35px. Sadkσ (talk is cheap) 21:19, 19 May 2020 (UTC)[reply]
The userboxes are usually 45 pixels tall. Sadko, it sounds like you want to have the image be a square which is 45 pixels wide. However, the image File:Raspberries (Rubus Idaeus).jpg is a rectangle. Which can be solved with Template:CSS image crop. —⁠andrybak (talk) 22:08, 19 May 2020 (UTC)[reply]
                   
Raspberries (Rubus Idaeus).jpg
This user loves rasperries.
That's it. Thank you very much! Sadkσ (talk is cheap) 22:33, 19 May 2020 (UTC)[reply]

Template-protected edit request on 6 September 2020

Please apply Special:Diff/941729320/976979286 to remove number of categories check to allow unconditional categorization of articles (main namespace) into Category:Pages with misplaced templates. See, for example, Special:Diff/959473229, where template {{userbox}} has stayed in the article for a month and a half, but the article wasn't categorized due to absence of parameter |usercategory=. —⁠andrybak (talk) 06:17, 6 September 2020 (UTC)[reply]

Here's more examples of userboxes staying in articles unnoticed: Special:Diff/976979720, Special:Diff/976979958, Special:Diff/976980141, Special:Diff/976980267, Special:Diff/976980338, Special:Diff/976980441. —⁠andrybak (talk) 06:31, 6 September 2020 (UTC)[reply]
Done Primefac (talk) 18:06, 6 September 2020 (UTC)[reply]

Handling 2-pixel borders better

Userboxes that have a border 2 pixels wide seem to have a non-standard height, since the border expands outwards rather than in toward the infobox center. This creates subtle misalignments, like here. Could this be remedied? {{u|Sdkb}}talk 23:50, 6 September 2021 (UTC)[reply]

Knowling a lot about CSS and HTML, my answer is technically yes, but not simply. It's not as easy as setting a value like border-direction: inward because it doesn't exist. No matter what, a CSS border will always expand outward. It is theoretically possible to have some extra calculations within the module that shrinks the width and height in unison with the border, but for the effort it would take to implement it, would it be worth it? --Diriector_Doc├─────┤TalkContribs 05:50, 7 September 2021 (UTC)[reply]

Template-protected edit request on October 1 2021

I would like to request the the seemingly random {{{info}}} code be removed from the top of the page. It appears like it's not meant to be there or something's not showing up right. If it's supposed to be there let me know. ― Blaze The WolfTalkBlaze Wolf#6545 15:33, 1 October 2021 (UTC)[reply]

 Not done: It's not random. It's showing you what an empty version of the template looks like. It could be better, I suppose. Feel free to modify the sandbox to propose a change. – Jonesey95 (talk) 16:37, 1 October 2021 (UTC)[reply]
Ah ok. Looks a bit odd but alright. I think it's mainly because it doesn't actually look like a userbox. ― Blaze The WolfTalkBlaze Wolf#6545 13:49, 4 October 2021 (UTC)[reply]

i cant add an image

i cant add this image


cry about it