Template talk:Usbk
This is the talk page for discussing improvements to the Usbk template. |
|
This Format does not like parameters
[edit]Well as you may have noticed that I made edits here to try to make parameters possible on this template. However when I added it to this template it ended up corrupting other userboxes that did not have parameters. so what I had to do is create a new template at Template:Usbkc to address the issue for now. If there anyway to make it possible here without that problem it would help out alot. Sawblade05 08:23, 8 June 2007 (UTC)
This template was originally created by User:Java7837 he also made a program to make userboxes with pictures see http://wiki.riteme.site/wiki/User:Java7837/pictureuserboxcreator it is very helpful in producing userboxes which use pictures
This template was originally created by User:Java7837 he also made a program to make userboxes see http://wiki.riteme.site/wiki/User:Java7837/userboxcreator it is very helpful in producing userboxes which don't require pictures
--Java7837 21:53, 14 June 2007 (UTC)
Big error
[edit]Big error see
This user is a Chief Engineer in the United States Merchant Marine. | C/E |
versus
Code | Result | ||||
---|---|---|---|---|---|
{{Template:User Chief Engineer}} |
|
Usage |
This only seems to be effecting pages loading specifically pages listed under http://wiki.riteme.site/wiki/Wikipedia:Userboxes/Profession#Merchant_marine please fix this as soon as possible
--Java7837 15:45, 15 June 2007 (UTC)
Actually look at http://wiki.riteme.site/wiki/Wikipedia:Userboxes/Profession a good number of userboxes load ' instead of the picture they are supposed to load
--Java7837 15:52, 15 June 2007 (UTC)
Though Wikipedia:Userboxes/Emoticons seems to be fine
--Java7837 16:32, 15 June 2007 (UTC)
Wikipedia:Userboxes/Zodiac also works fine
--Java7837 16:33, 15 June 2007 (UTC)
- Fixed. It was because the userbox was being transcluded like
{{user Chief Engineer|||||}}
. –Pomte 18:08, 15 June 2007 (UTC)
Another Big error
[edit]The current version has corrupted userboxes here at Wikipedia:Userboxes/WikiProjects plase fix show they all show.
Sawblade05 10:11, 18 June 2007 (UTC)
- FYI the error also shows on my Test Userbox page at User:Sawblade05/tempoaryWikipedia:Userboxes/WikiProjects You can use that page for testing. Sawblade05 10:20, 18 June 2007 (UTC)
- The bottom userboxes weren't showing because that page has a lot of userboxes. It's not particular useful either, being redundant to Wikipedia:WikiProject and Category:WikiProjects etc. No one should be browsing the list for userboxes because you have to actually look at the WikiProject first before joining and tagging yourself. –Pomte 10:29, 18 June 2007 (UTC)
Categories
[edit]Category:User templates
[edit]I don't know who added this page to this category but this category is only for userboxes, I am taking it out. -PatPeter 06:43, 2 July 2007 (UTC)
- I figured it out for you PatPeter, it was in the documentation at /doc. 67.175.105.209 20:22, 21 August 2007 (UTC)
- I placed it back in that category with | ]] as categorization so that this template is at least categorized.
Category Suppresion
[edit]{{#ifeq:{{{categories}}}|no||[[Category:Example|{{PAGENAME}}]]}}
We need to get this incorporated into the template. -PatPeter 01:58, 15 August 2007 (UTC)
Can a parser function of this nature: {{#ifeq:{{{categories}}}|no||[[Category:Example|{{PAGENAME}}]]}} be made in this template to allow for the suppression of Wikipedian categories on pages such as Wikipedia:Userboxes/Health, Wikipedia:Userboxes/WikiProjects, and Wikipedia talk:Userboxes/New Userboxes? — Preceding unsigned comment added by Java7837 (talk • contribs) 02:53, 9 September 2007
Categroy Fixes
[edit]The way I see it, the category parameter can be simplified to simple {{usbk|template name|Category:your category}}
, with the parameter "category" not having anything fancy whatsoever, just {{{category}}}
.The UserboxerComplain/ubx
category=name
is as easy to type, and it is more intuitive (as in the case of {{tlx}} etc.) to have the second unnamed parameter deal with parameters for the actual userbox. –Pomte 20:44, 20 January 2008 (UTC)
Parameters
[edit]I think I've solved the parameters issue. If anyone comes across a use of this template that still appears to be broken, let me know. JPG-GR (talk) 02:48, 29 November 2007 (UTC)
- Actually, it appears it can only handle one parameter (called "param1") properly at this time. JPG-GR (talk) 03:06, 29 November 2007 (UTC)
What I did
[edit]Alright so basically I just solved all these problems. Any userbox that has the correct ParserFunctions extension from Category:Category suppression supporting templates will not categorize these pages in user categories, more in reply to #Category Suppresion. Before reverting please post here, I have this page watched. -Babelious 22:54, 13 January 2008 (UTC)
{{[[{{{1|{{FULLPAGENAME}}}}}]]{{#if:{{{param1|}}}|{{!}}''{{{param1}}}''|}}{{#if:{{{param2|}}}|{{!}}''{{{param2}}}''|}}}} {{ #if: {{{nt|}}} | | {{!}} }}{{#if:{{{param2|}}}|{{{{{1|{{FULLPAGENAME}}}}}|1={{{param1|}}}|2={{{param2}}}}}|{{#if:{{{param1|}}}|{{{{{1|{{FULLPAGENAME}}}}}|1={{{param1}}}}}|{{{{{1|{{FULLPAGENAME}}}}}}}}}}} {{ #if: {{{nt|}}} | {{clear}} | {{!}} }}[[Special:Whatlinkshere/{{{1|{{FULLPAGENAME}}}}}|What links here]] {{#if: {{{category|}}} | <br />[[:Category:{{{category}}}]] | }} {{ #if: {{{nt|}}} | | {{!}}- }}
Alright I have no clue as to what all this means, but if some one could tell me which parts of these | are equal to <td> then we might me able to reincorporate some of this code back in. -Babelious 18:43, 14 January 2008 (UTC)
{{[[{{{1|{{FULLPAGENAME}}}}}]] {{#if:{{{param1|}}}|{{!}}''{{{param1}}}''|}} {{#if:{{{param2|}}}|{{!}}''{{{param2}}}''|}} }} {{#if: {{{nt|}}} | | {{!}} }} {{#if:{{{param2|}}}|{{{{{1|{{FULLPAGENAME}}}}}|1={{{param1|}}}|2={{{param2}}}}}| {{#if:{{{param1|}}}|{{{{{1|{{FULLPAGENAME}}}}}|1={{{param1}}}}}|{{{{{1|{{FULLPAGENAME}}}}}}}}}}} {{#if: {{{nt|}}} | {{clear}} | {{!}} }}[[Special:Whatlinkshere/{{{1|{{FULLPAGENAME}}}}}|What links here]] {{#if: {{{category|}}} | <br />[[:Category:{{{category}}}]] | }} {{#if: {{{nt|}}} | | {{!}}- }}
Hopefully this makes it easier to read. -Babelious 18:47, 14 January 2008 (UTC)
Parameters
[edit]Is it possible to make it support up to 10 parameters, just to be on the safer side? ~RayLast «Talk!» 18:44, 21 March 2008 (UTC)
- Agreed. I need three for my userbox, and it's quite frustrating not being able to present it. Mononomic (talk) 00:10, 1 December 2008 (UTC)
- Yes. I need 5 for mine {{User:Xsanda/UserBoxes/Age|2000|9|11|Username|f}}
Happy Birthday | This user is 24 years old. In 291 days time, she will be 25. |
by Xsanda (visit my talk page) 11:04, 11 September 2011 (UTC)
- Agree As what they said but most of my userboxes take at least three params.--Clarkcj12 (talk) 18:45, 27 October 2011 (UTC)
- Since this section has been here for over four years and no-one has replied, I'm taking it upon myself to expand this to accept five parameters at this time. I will be working in the sandboxes and creating test cases. Further expansion will be on an as-needed basis. Technical 13 (talk) 15:59, 26 March 2013 (UTC)
- Okay, so now Template:Usbk/sandbox supports up to five parameters as is seen on Template:Usbk/testcases. if there are no objections in a reasonable amount of time (about a week), I will update the used template with the modifications. Any subsequent requested changes may be directed to my talk page is you require assistance. Technical 13 (talk) 16:25, 26 March 2013 (UTC)
- Since this section has been here for over four years and no-one has replied, I'm taking it upon myself to expand this to accept five parameters at this time. I will be working in the sandboxes and creating test cases. Further expansion will be on an as-needed basis. Technical 13 (talk) 15:59, 26 March 2013 (UTC)
- Agree - put into template space.--Launchballer (talk) 22:14, 2 April 2013 (UTC)
- As the post above states, the change was applied 18 hours before your "keep" came in. Please tone down your signature as the color scheme hurts my eyes. thank you. Technical 13 (talk) 22:43, 2 April 2013 (UTC)
parameters broken?
[edit]I added a template of mine to User:UBX/Userboxes/Seasonal and supplied the single named parameter (holiday) as described in the doco (|2=holiday=value). It doesn't work. What displays is the "default" configuration, so that others would believe that my template is broken. If you go to my template page itself and view the demo there, it is clear that it works fine. ⇔ ChristTrekker 16:01, 9 November 2011 (UTC)
Please fix template
[edit]Can someone fix the template so that the Transclutions aren't under the code but in a third column like it used to be be. As that looked a lot better than it currently does now.--Clarkcj12 (talk) 00:11, 6 September 2012 (UTC)
- "Looked better" is very subjective. With some longer template names and larger userboxes, the wider format ran into serious problems with small browser windows. With so much space being wasted it seems prudent to combine the textual information into the same area. ⇔ ChristTrekker 13:48, 4 December 2012 (UTC)
USBK
[edit]I know this sounds stupid, but what does this actually stand for?--Launchballer 19:02, 2 April 2013 (UTC)
- The userbox idea came from the German Wikipedia. The main use of the
{{usbk}}
template family is in userbox catalogues, such as Wikipedia:Userboxes/Computing; and the German for "catalogue" is "katalog", so I think it's USer Box Katalog. --Redrose64 (talk) 22:10, 2 April 2013 (UTC)- Then it should be usbC, this isn't German Wikipedia.--Launchballer 22:12, 2 April 2013 (UTC)
- I believe it was a spin-off idea of Trapper Keeper → Userbox keeper. As a side note: Launch, your signature hurts my eyes. Please tone down your colorscheme. Thank you. — User:Technical 13 ( C • M • View signature as intended) 22:48, 2 April 2013 (UTC)
- How florid...--Launchballer 00:31, 3 April 2013 (UTC)
- I believe it was a spin-off idea of Trapper Keeper → Userbox keeper. As a side note: Launch, your signature hurts my eyes. Please tone down your colorscheme. Thank you. — User:Technical 13 ( C • M • View signature as intended) 22:48, 2 April 2013 (UTC)
- Then it should be usbC, this isn't German Wikipedia.--Launchballer 22:12, 2 April 2013 (UTC)
Technical Problems!!!!
[edit]HELP! 193.107.215.195 (talk) 21:45, 8 April 2013 (UTC)
- What seems to be the problem? Technical 13 (talk) 22:09, 8 April 2013 (UTC)
Loooong lists of pages using this template
[edit]The problem on WP:Userboxes/Life was due to the length of that page and not the coding in the template. I've shortened that page and it should no longer be an issue. Any other instances of pages that are too long should be corrected with a proper split of sections to sup-pages. Technical 13 (talk) 13:56, 16 April 2013 (UTC)
- Well that's debatable. There is a limit to the transcluded template size. If you recode the template to be larger you will break pages that were below the limit. Where the problem lies is a matter of perspective, and degree. All the best: Rich Farmbrough, 16:20, 12 February 2016 (UTC).
Userboxes that inject multiple categories
[edit]Hello. Just a note here. I've made some modifications to allow listing of multiple categories (up to five, doubt there are userboxes that add more categories than that) and also I've made a modification that adds a new changed my mind. The count was the number of pages categorized by the included list of categories and not an actual transclusion count. If I can find a way to get the actual transclusion count, I may add the parameter back later. Happy editing and userboxing! Technical 13 (talk) 13:20, 16 May 2013 (UTC)
|count=
parameter which will allow you to optionally add a count of the transclusions of your userbox. Note that as this is an expensive parser function that allows for this, this parameter should NOT be used on long lists of userboxes (I would venture to say that it shouldn't be used on any list longer than 20-25 userboxes).
- I'm looking to see if this facility is needed. The size of the template is currently breaking a bunch of pages. Decreasing the size by loosing unused functionality is a good thing. All the best: Rich Farmbrough, 16:21, 12 February 2016 (UTC).
- Category:Usbk calls that use 5 categories 0
- Category:Usbk calls that use 4 categories 0
- Category:Usbk calls that use 3 categories 0
- Let this brew overnight and see what we get. All the best: Rich Farmbrough, 16:23, 12 February 2016 (UTC).
- Category:Usbk calls that use 2 categories 0
- Category:Usbk calls that use 1 category 0
- Just for completeness... All the best: Rich Farmbrough, 00:25, 13 February 2016 (UTC).
- Of the 1597 pages using this template, none use 5 or 4 categories, three use 3 and twelve use 2 - all added by Technical13, and in the case of the 3 all in his user space, a further 31 use category at all. I propose to remove the numbered category parameters, starting immediately with 3,4,5, and later provide Lua functionality to accept a list of categories instead. All the best: Rich Farmbrough, 16:09, 13 February 2016 (UTC).
- That sounds reasonable to me. —PC-XT+ 21:01, 13 February 2016 (UTC)
- Of the 1597 pages using this template, none use 5 or 4 categories, three use 3 and twelve use 2 - all added by Technical13, and in the case of the 3 all in his user space, a further 31 use category at all. I propose to remove the numbered category parameters, starting immediately with 3,4,5, and later provide Lua functionality to accept a list of categories instead. All the best: Rich Farmbrough, 16:09, 13 February 2016 (UTC).
Looking deeper
[edit]- Category:Usbk calls that use number 0
- Category:Usbk calls that use cont 0
- Category:Usbk calls that use continued 0
- Category:Usbk calls that use 2 0
- Category:Usbk calls that use 3 0
- Category:Usbk calls that use 4 0
- Category:Usbk calls that use 5 0
- Category:Usbk calls that use 6 0
All the best: Rich Farmbrough, 19:24, 13 February 2016 (UTC).
Results:
- Category:Usbk calls that use number 14 - really one (partially incorrect) use and transclusions, and self refs
- Category:Usbk calls that use cont 14 - ditto
- Category:Usbk calls that use continued 6 -self refs only
- Category:Usbk calls that use 2 447
- Category:Usbk calls that use 3 185
- Category:Usbk calls that use 4 47
- Category:Usbk calls that use 5 6 Only self refs and Tech13 uses, plus one other use.
- Category:Usbk calls that use 6 1 Only testcases
As a consequence I will remove {{{number}}}
, {{{cont.}}}
, {{{continued}}}
, {{{5}}}
and {{{6}}}
. {{{4}}}
corresponds to 3 userbox parameters and is probably the upper end of what a good design should use. I will make a template that supports 4 parameters (i.e. up 5) for the odd use, thus saving massive overhead.
All the best: Rich Farmbrough, 20:45, 14 February 2016 (UTC).
Useage?
[edit]Changed useage to usage. Been misspelled forever. Surprised no one had spotted it before. - Tim D. Williamson yak-yak 02:43, 16 February 2016 (UTC)
- Why not use the simpler noun "use"? Yours aye, Buaidh 20:00, 17 September 2017 (UTC)
- @Buaidh: Because the noun "use" is far too easily confused with the (much more common) verb "use". Which makes it problematically ambiguous, when it's just a column heading with no differentiating context. FeRDNYC (talk) 02:26, 14 October 2022 (UTC)
Template-protected edit request on 24 August 2018
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Three last lines of the Template:Usbk are:
<noinclude> {{Documentation}}
Tag <noinclude>...</noinclude>
should be closed. —andrybak (talk) 12:13, 24 August 2018 (UTC)
- Done chi (talk) 12:26, 24 August 2018 (UTC)
Template-protected edit request on 14 September 2018 — Add ability to add comment to the third column
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Implemented in {{usbk/sandbox}}:
Code | Result | |||||
---|---|---|---|---|---|---|
{{usbktop}} {{usbk/sandbox|user en-3|comment=Some additional text in the third column.}} {{usbkbottom}} |
|
Also added a testcase for new parameter. —andrybak (talk) 21:05, 14 September 2018 (UTC)
- Done Nice! Enterprisey (talk!) 07:59, 15 September 2018 (UTC)
Template-protected edit request on 20 March 2021
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please, use {{temt}} instead of {{tlu}}, it can manage more variables. Est. 2021 (talk · contribs) 12:26, 20 March 2021 (UTC)
- Would you mind making your changes to Template:Usbk/sandbox? Thanks — Martin (MSGJ · talk) 12:54, 20 March 2021 (UTC)
- Est. 2021, are you sure that you are looking at the right templates? {{tlu}} can handle up to 12 parameters. {{Template link 2}} can handle up to 8 parameters. This template uses {{tlu}} already. – Jonesey95 (talk) 14:17, 20 March 2021 (UTC)
Unnecessary prepending of namespace prefix
[edit]For template-space userboxes, the {{usbk}} template displays this:
Code | Result | |||
---|---|---|---|---|
{{Template:Example}} |
|
Usage |
Shouldn't it display the transclusion code as {{Example}}
instead of {{Template:Example}}
? —GMX(on the go!) 20:16, 3 January 2022 (UTC)
- @PorkchopGMX: That's the tradeoff of using Template:Tlu for linking. The regular template-linking templates, like {{tl}} and {{tlx}}, don't require a namespace prefix, but they can only link to templates in the Template: namespace.
{{tl|Hatnote}}
produces {{Hatnote}}, but{{tl|User:UBX/Rome}}
becomes a redlink to Template:User:UBX/Rome: {{User:UBX/Rome}}. With {{Tlu}}, a template in any namespace can be linked to — e.g. {{Template:Hatnote}} or {{User:UBX/Rome}} — but if you specify the namespace, it shows it.
- Contrary to its documentation, you don't have to specify the namespace with {{tlu}}. If you don't, it's assumed to be Template: and the output will be the same as {{tl}}:
{{tlu|Hatnote}}
becomes {{Hatnote}}. But Template:Usbk uses{{Transclude}}
inside of {{tlu}}, and {{Transclude}} resolves its argument so that the namespace is always explicit, even in the Template: space.
- Anyway, transcluding a template like {{Example}} by typing
{{Template:Example}}
isn't wrong, at worst it's just slightly verbose. FeRDNYC (talk) 02:19, 14 October 2022 (UTC)