Template talk:User instrument

(Redirected from Template talk:User instrument/sandbox)
Latest comment: 14 years ago by TheDJ in topic usercategory changes

This template and Template:User instrument-gen make it easier to create user-page Babel templates for instruments under Category:User instruments. This one is for the specific-level templates, e.g. Template:User org-1.

Usage

edit

Simply put the following in your level-specific templates:

{{subst:user instrument|
|instrument-code = Babel code
|instrument-cat-code = Category code (e.g. piano for [[Category:User piano]])
|ist = Word referring to someone who plays this instrument (e.g. pianist)
|level = Babel skill level
}}

Suggested change

edit

Here is my suggested change for improving this template as per the ongoing shifts in userbox policy. Basically, the categories are entirely unnecessary and should be gotten rid of. Then, once this change is implemented the user instrument meta-template can be subst'ed into the templates that are linking to it according to WP:AMT.

{{user instrument/{{{level}}}|
|instrument-code = {{{instrument-code}}}
|instrument-cat-code = {{{instrument-cat-code}}}
|desc-pre=This user is|desc-post='''[[{{{instrument-cat-code}}}|{{{ist}}}]]'''.}}

--Cyde Weys 22:49, 19 February 2006 (UTC)Reply

Suggested change per Wikipedia:User categories for discussion/Archive/October 2006#Instruments

edit
{{user instrument/{{{level}}}|
|instrument-code = {{{instrument-code}}}
|instrument-cat-code = {{{instrument-cat-code}}}
|desc-pre=This user is|desc-post='''[[:Category:Wikipedian {{{ist}}}s|{{{ist}}}]]'''.}}
<includeonly><includeonly>[[Category:Wikipedian {{{ist}}}s|{{PAGENAME}}]]
[[Category:User {{{instrument-cat-code}}}-{{{level}}}|{{PAGENAME}}]]</includeonly></includeonly>

Don't edit it yet, because some categories won't have the name discussed in that nomination. The change can now be made. TimBentley (talk) 03:56, 30 October 2006 (UTC)Reply

I've now changed all the (instrument)-(level) templates to the correct -ist name from the nomination, and created all the new categories. So please implement this coding change right away, and we'll see what moves and what doesn't.--Mike Selinker 20:57, 30 October 2006 (UTC)Reply
edit
{{user instrument/{{{level}}}|
|instrument-code = [[{{{instrument-cat-code}}}|{{{instrument-code}}}]]
|instrument-cat-code = {{{instrument-cat-code}}}
|desc-pre=This user is|desc-post='''[[:Category:Wikipedian {{{ist}}}s|{{{ist}}}]]'''.}}
<includeonly><includeonly>[[Category:Wikipedian {{{ist}}}s|{{PAGENAME}}]]
[[Category:User {{{instrument-cat-code}}}-{{{level}}}|{{PAGENAME}}]]</includeonly></includeonly>

why not do it like this so that it links to the instrument article?Me... 09:02, 12 November 2006 (UTC)Reply

Recent changes to Template:User instrument subcategory

edit

Hello,

I've noticed that you've added a "level" argument to Template:User instrument subcategory/1 and /2 and so on. Isn't this superfluous, considering that we have five different templates each used for a different level of expertise for each instrument (each also displaying different colours)? Laogeodritt [ Talk | Contribs ] 22:23, 21 May 2007 (UTC)Reply

Actually, I'm attempting to figure out the possible mess of double transclusion of categories. Any suggestions are welcome. - jc37 22:28, 21 May 2007 (UTC)Reply
I suppose I'd be pointing out the obvious by suggesting that the category might be added in more than one of the string of templates used to make the final instrument userbox? Laogeodritt [ Talk | Contribs ] 22:38, 21 May 2007 (UTC)Reply
Yes, but that's not the only issue. For example, "includeonly" usage doesn't work very well if we're three templates deep. - jc37 22:43, 21 May 2007 (UTC)Reply
Ok, removed the categories from the main templates and waiting for Wikipedia to "catch-up". Might as well "start fresh", and fix these all correctly : ) - jc37 23:05, 21 May 2007 (UTC)Reply
How's that going? I noticed the categories don't seem to have been replaced yet. Laogeodritt [ Talk | Contribs ] 15:35, 26 May 2007 (UTC)Reply
My apologies for not responding sooner, I just now noticed that you had added a comment. To answer: Essentially, I plead distraction... - jc37 19:33, 1 June 2007 (UTC)Reply
{{User instrument}} is sort of superfluous, though right now it's the most convenient place to put the category. <includeonly> works fine past however many levels. The only problem may be that it categorizes the template. A solution I think is to check whether the transcluding page's namespace is Template:, if so, then set the sort key beginning with a space. –Pomte 19:25, 1 June 2007 (UTC)Reply
I agree (on both counts). I'd honestly like to see Template:User instrument deleted/removed from the hierarchical structure, since it really just adds complexity for no apparent reason. - jc37 19:33, 1 June 2007 (UTC)Reply
Let's settle this at Template talk:User instrument#Delete?. –Pomte 03:51, 2 June 2007 (UTC)Reply

Delete?

edit

This template is unneeded in the WP:INST system because Template:User instrument subcategory/1 thru 4 can be transcluded directly. But since it's already being widely used (I myself have recently edited a bunch of userboxes to transclude it), and it doesn't affect the category issue, there's not a strong need to get rid of it either. –Pomte 03:51, 2 June 2007 (UTC)Reply

Except that it makes future editing of the template(s) needlessly complex. I would favour deletion of Template:User instrument, and just have a bot replace it with the directly trancluded 1-4 templates. - jc37 10:39, 7 June 2007 (UTC)Reply
There shouldn't be much future editing (these templates were unchanged for almost a year before this). Your call. –Pomte 01:37, 12 June 2007 (UTC)Reply
Well, it's interesting to see the mess that has resulted from the initially orderly system I started two years ago (with thanks to CyberSkull for inspiration and template groundwork and Krun for assistance, of course). Well, actually, it was a reform of something haphazard that was already in place. But in any case, I thought I would give a little explanation.
It was my intention that having a templates would simplify editing. You don't, for instance, have to copy an entire chunk of code and edit it, which would be an error-prone process. The only reason for the helper templates (/1, /2, ...) was that I could find no way to change the bit of text ("novice", etc.) based on a parameter at the time. I don't think that parser functions existed then, or else I couldn't find the documentation. If I were to do this whole thing over again today, I would definitely use those instead of the helpers. Ddawson 21:12, 20 June 2007 (UTC)Reply

Reinstate categories

edit

{{User instrument subcategory/{{{level}}} | instrument-code = {{{instrument-code}}} | ist = {{{ist}}} | desc-pre = This user is | desc-post = '''[[:Category:Wikipedian {{{ist}}}s|{{{ist}}}]]'''.}}{{{nocat|[[Category:Wikipedian {{{ist}}}s{{#ifeq:{{NAMESPACE}}|User|{{!}}{{PAGENAME}}]|{{!}}*]}}][[Category:Wikipedian {{{ist}}}s-{{{level}}}{{#ifeq:{{NAMESPACE}}|User|{{!}}{{PAGENAME}}]|{{!}}*]}}]}}}

The code above sorts each page depending to namespace: If the transcluding page is in Template:, then the sort key is set as a space. If the transcluding page is a userpage, then the sort key is {{PAGENAME}}.

Categorizing the templates themselves is useful for maintenance and to immediately see how one can add oneself to the category.

In both cases, the transcluding page is added to both the parent and the level category. Despite the clutter at the bottom of userpages, it'd be unfair to not categorize in the parent because the parent is a catch-all category for the ambiguous/generic template, and, in many cases, includes userpages containing other related userboxes. If this is unwanted, there'd need to be a massive proposal to rename all parent categories into empty "by" categories. –Pomte 03:51, 2 June 2007 (UTC)Reply

That looks great (though easier to read in the editing window : ) - One thing though, I've been using "space" for related articles or lists, and "asterisk" (*) for templates. It just makes things clearer. - jc37 10:39, 7 June 2007 (UTC)Reply
That is a good sorting structure to have, even though there appear to be no lists for instruments. Added a nocat option as well. Please make the change so user pages are re-categorized, because I'm sure they've been dying to be again able to browse the pages of other players. –Pomte 02:42, 12 June 2007 (UTC)Reply
edit

I think the instrument name in desc-post should be linked not to the category, but to the article on the instrument. The category is already at the bottom of the user page. Linking to an actual article is more intuitive and informative, as not everyone knows what some of these instruments are. This will require a new instrument-name parameter. If this is agreed upon, do not change the template yet - the parameter has to be set first so they don't break in the interim. –Pomte 03:51, 2 June 2007 (UTC)Reply

Absolutely : ) - jc37 10:39, 7 June 2007 (UTC)Reply

Clarify

edit

So do we agree on the following?:

  • The link should be to the intrument in question.
  • The categories need to be reinstated as discussed.
  • Template:Instrument may be deleted.

(For the bot work to change the last, I think we could ask User:Cyde.) - jc37 10:10, 12 June 2007 (UTC)Reply

  1. Yes, but only after the parameter is added to all userboxes.
  2. Yes.
  3. Don't care, unless reducing some thousands of nested transclusions will have give the server an amount of slack that is less than the cost of bot edits. –Pomte 02:03, 16 June 2007 (UTC)Reply

Ok, since you don't care about the third, I'll leave a request with some bot (I'll start with Cyde, but he seems busy atm?)

As to the rest, you can feel free to implement as far as I am concerned (or did I miss something?) - jc37 11:53, 16 June 2007 (UTC)Reply

Fine, I'll be the one who does all the grunt work. :@ Maybe I'll even figure out how to start a bot myself. –Pomte 13:27, 17 June 2007 (UTC)Reply
Ohhhh, ROFL. You were waiting for me to make the changes, and I thought you were waiting for me to agree so that you could make the changes. Too funny : )
To clarify, I don't think I entirely understand what you mean by the first one to implement it.
Re-adding the categories would seem to make more sense after Template:User instrument (and Template:User instrument subcategory for that matter) is dealt with.
I'll try to figure out what text should be replaced with what, and I'll start requesting bot owners. Though probably not today, need to step away from the machine soon, real life calls : ) - jc37 13:50, 17 June 2007 (UTC)Reply
No, just kidding. I'll do the instrument links in userboxes. I was waiting for you to change this template (to the pre-bot version, which would still be working) because I can't edit it, but that can wait until the bot is done. I mean, only one person has complained, so you wonder whether the categories are used at all. –Pomte 14:04, 17 June 2007 (UTC)Reply

Empty

edit

Pomte 02:38, 12 June 2007 (UTC)Reply

It's been 4 days so you may wish to get rid of these before they re-populate. –Pomte 13:27, 17 June 2007 (UTC)Reply
Ok, thanks for the clarification : ) - jc37 13:50, 17 June 2007 (UTC)Reply
All deleted. - jc37 22:27, 18 June 2007 (UTC)Reply

Explanation page

edit

Have you seen this:

I haven't read it all fully yet, but this looks like the explanation we were looking for : ) - jc37 22:30, 18 June 2007 (UTC)Reply

Since I haven't been involved in most of the process discussed above, tell me: what does that explain that Wikipedia:Instruments/Adding (or some early version thereof) doesn't? Ddawson 21:15, 20 June 2007 (UTC)Reply
It has that link on it as well : )
I just meant that it was a starting point for finding out how this was intended to work. We've been trying to determine just from the code, etc.
Also, you noted above that you would do it differently. Would you be willing to help to implement that? - jc37 21:56, 20 June 2007 (UTC)Reply
Well, it should be a fairly simple matter of taking the helper code and merging in the code for the templates that use them, replacing the hard-coded level numbers with {{{level}}} or an appropriate conditional. So for this template, for instance, how about:
<div style="float: left; border: solid #C0C8FF 1px; margin: 1px;">
{| cellspacing="0" style="width: 238px; background: #F0F8FF;"
| style="width: 45px; height: 45px; background: #C0C8FF; text-align: center; font-size: 13pt" | '''{{{instrument-code}}}-{{{level}}}'''
| style="font-size: 8pt; padding: 4pt; line-height: 1.25em;" | This user is '''[[:Category:Wikipedian {{{ist}}}s-{{{level}}}|{{#switch:{{{level}}}|1=a novice|2=an intermediate|3=an advanced|4=a professional}}]] [[:Category:Wikipedian {{{ist}}}s|{{{ist}}}]]'''.
|}</div>
I haven't tested this code, although I tested #switch; I think it will work. Ddawson 20:45, 26 June 2007 (UTC)Reply

Confused

edit

Why have so many of the user instrument categories been deleted? It causes unsightly redlinks in the userboxes. Powers T 00:41, 3 July 2007 (UTC)Reply

Seconded. I'm using {{user organ-3}} and whilst there are categories for "organ 2" and "organ 4", "organ 3" has disappeared, leaving me with a redlink that I've only just spotted... BencherliteTalk 02:17, 4 July 2007 (UTC)Reply

Category/PAGENAME fix

edit

{{editprotected}} I believe this was suggested a while ago above but I don't think it was ever implemented. Right now (as far as I can tell), all users who place an instrument userbox on their user page get categorized under the letter "U", for "User:". I know how to fix this for plain userboxes, so that users are categorized alphabetically according to their username:

<includeonly>{{{category|[[Category:(category name here)|{{PAGENAME}}]]}}}</includeonly>

-- but the fix is probably much more complex for a template like this and besides which the page is protected. Can an admin please look into this? It's frustrating to look at the categories only to see everyone showing up under "U". Thanks.

Equazcionargue/improves02:39, 10/14/2007
I don't understand the problem here. Could you give a specific example of a userpage and the category-list where you see its (mis)categorization? DMacks (talk) 16:36, 8 January 2008 (UTC)Reply
Adding <noinclude>[[Category:Musical instrument user templates| ]]</noinclude> would be handy as well I guess. --TheDJ (talkcontribs) 01:26, 8 January 2008 (UTC)Reply
 Y Done categorized. DMacks (talk) 16:27, 8 January 2008 (UTC)Reply

Edit protected

edit

This is how the template should look:

{{User instrument subcategory/{{{level}}}
|instrument-code = {{{instrument-code}}}
|instrument-cat-code = {{{instrument-cat-code}}}
|ist = {{{ist}}}
|desc-pre=This user is
|desc-post='''[[:Category:Wikipedian {{{ist}}}s|{{{ist}}}]]'''.
}}<noinclude>[[Category:Music user templates| ]]</noinclude>

67.167.255.17 (talk) 02:10, 3 January 2008 (UTC)Reply

Category:Musical instrument user templates is more appropriate here (it's a subcat of Category:Music user templates and a more specific category). See above {{editprotected}} request. DMacks (talk) 16:32, 8 January 2008 (UTC)Reply

usercategory changes

edit

{{editprotected}} Can the sandbox version be copied over which uses the usercategory options of the userbox template. Thanks -- WOSlinker (talk) 18:51, 13 February 2010 (UTC)Reply

  DoneTheDJ (talkcontribs) 19:55, 13 February 2010 (UTC)Reply