Guild Wars Wiki talk:Formatting/Templates

From Guild Wars Wiki
Jump to navigationJump to search

Reason?[edit]

"The reason is because of how MediaWiki handle newlines (dropped if only 1, new paragraph if 2). With template nesting, extra double-spacing might occur where undesired/unexpected." Extra double-spacing might occur? IS that the only reason for preferring the uglier syntax (imho)? Pipe-terminated lines looks messy unless you also request indentation on the parameters. But isn't this easily fixed by removing the extra newline in the nested template or any extra newline between parameters? I'm bringing this up because almost every single article that uses one of the infobox templates does not use them in a "pipe-terminated" manner. And as a sidenote, I think Wikipedia doesn't do that too. -- ab.er.rant sig 01:32, 10 May 2007 (EDT)

Never mind that last part. I just noticed that Wikipedia isn't too consistent with this particular thing as well. -- ab.er.rant sig 03:20, 16 May 2007 (EDT)
Just found this and want to make this clear. When using parameter = value syntax, all whitespaces before and after the value are removed. So it does not make a difference between param1 = Name| and | param1 = Name. The only thing where whitespaces are not removed is when using unnamed parameters, for example: {{gr|10|100}} is different to
{{gr
| 10
| 100
}}
And this is different to
{{gr|
10|
100}}
Both multiline examples could not work as the parameters always include newlines (\n). But as said before, the following does work:
{{gr
| 1 = 10
| 2 = 100
}}
I will change the formatting guide and maybe it can be accepted soon. (btw. source) poke | talk 13:55, 28 July 2007 (UTC)

Template and Category rework[edit]

After making this formatting guide more informative, I would like to go through all existing templates and add missing things like descriptions etc. Also I would like to recategorize all templates because in my opinion the existing category looks a bit messy and not always reasoned (example). My proposal for a category tree would be like this:

Category:Templates
|- Infobox templates
|  |-- all infoboxes
|
|- Profession templates
|  |-- Profession icons and colors
|
|- Skill templates
|  |-- everything which belongs to Skill, Skill trainers, Hero skill trainers
|
|- Navigation templates
|  |- Region navigation templates
|  |  |-- Missions, Explorable areas, Outposts in ... (etc.)
|  |
|  |- Armor navigation templates
|  |  |-- All armor navigation templates
|  |
|  |-- Other navigation templates
|
|- NPC templates
|  |- Merchant templates
|  |- Artisan templates
|
|- Maintenance templates
|- User templates
|- Notice templates
|  |- Image templates
|  |  |-- Arenanet image, User image etc.
|  |
| ... (something like this)

(got lazy to the end ^^) - Comments please! :) poke | talk 16:26, 28 July 2007 (UTC)

Well, just keep in mind that the templates are not always exclusive, so I'd say templates like skill trainers and hero skill trainers would also go under NPC templates as a trainer templates or something. Either that or maybe call NPC templates a "NPC service templates"... or just "Services templates"? Hmm... but overall, I think it's fine to just go ahead and restructure it. It probably doesn't need to be documented in detail as guidelines. The current categories were created in a as-needed basis and there wasn't really much thought about it yet. -- ab.er.rant sig 06:57, 29 July 2007 (UTC)

Finishing this formatting guide[edit]

Are there any objections? poke | talk 14:04, 30 July 2007 (UTC)

I don't like the rules being attached to template creation. Anyone should feel completely free to create helpful templates without doing the extra work to conform to all of those. If it's okay, I'd like to rewrite those to remove the burden of work. --Rezyk 20:09, 9 August 2007 (UTC)
I think it's important that others can clearly see what a templates does and how it is to use. By saying that templates should base on this formatting guide, we can be sure that all templates will be documented well. Of course it is not important to do this exactly as written here and some templates don't need most of the sections, but I think we should encourage template designers to have some kind of description in it. poke | talk 20:14, 9 August 2007 (UTC)
I think it looks good, it is much simpler to edit or scavenge another template of the coding is more uniform. Hopefully it won't discourage other users from creating them, but I think to get to the level when you are creating templates a wiki user has reached a certain level of understanding/comprehension about how the wiki works. --LemmingUser Lemming64 sigicon.png 20:18, 9 August 2007 (UTC)
Also as I mentioned above this, I will try to make all existing templates compatible to this formatting guide (which of course will take some time ^^) poke | talk 20:27, 9 August 2007 (UTC)
I don't mind encouraging stuff like categorization/descriptions, but I don't want to burden creators with them. If someone wants to write a helpful template without doing all that, they should be very much encouraged rather than discouraged. That's much more important than being sure that all templates will be documented well. --Rezyk 20:36, 9 August 2007 (UTC)
I don't think that adding a short description is that difficult. Also if anyone has difficulties with creating a description I think there are enough helpers available which will do that.. poke | talk 20:44, 9 August 2007 (UTC)

Ok, is this accepted then? poke | talk 14:24, 12 August 2007 (UTC)

I just want to nitpick a little before throwing my support. In order to make it less authoritative (to address concerns raised above), rather than saying "this is a good way to do it", just say "here's an example of how you can do it". And since this is meant as a guidelines, I'd rather see it in a less "policy-style" in that there are more explanations or elaborations on why this should be done and why that should not be done in a more friendly and helpful/educational style rather than the strict and concise "policy-style" wordings :) just nitpicking, feel free to ignore me. -- ab.er.rant sig 03:18, 13 August 2007 (UTC)
Ok, I reworded the guide a bit, now it should be less "policy style" ;) Comments please, I want to finish this ^^ poke | talk 08:28, 14 August 2007 (UTC)
Tweaks accepted, Ab.er.rant ;) poke | talk 12:58, 14 August 2007 (UTC)

FOO & BAR[edit]

Fubar? LeFick 13:56, 4 October 2007 (UTC)

Foo & Bar. tldr: Foo & Bar are commonly used exemplar variable names. - User HeWhoIsPale sig.PNG HeWhoIsPale 14:03, 4 October 2007 (UTC)

A compact reference to user templates?[edit]

One of the huge disadvantages of user templates is the amount of clutter referencing them requires.  The following is a suggestion for a way to reduce the clutter. 

  • Add a single compactly named template to the main space that reduces the amount of clutter.  Perhaps 'ut'. 
  • Positional parameters: User Name and Template Name

Typical use: {{ut|Example|MyTemplate}}
Generates:   User:Example/templates/MyTemplate

mtew 19:11, 19 December 2008 (UTC)

I'm not sure what you want to say with that, I think you want a way to shorten up the use of other's user templates. If that's the case you forget an very important thing: Not everybody is storing them as subpages of a "templates"-subpage and not everybody even has such a subpage system. For your own templates, you can always use relative paths btw.
Apart from that I don't see the reason why we should make it easier to use user templates!? They are for user space and it is not very likely that people use that many templates that it will clutter a page - and even if, it is their page and their problem (also such a template doesn't really save any room, it just makes it more complicated to use a template) poke | talk 19:31, 19 December 2008 (UTC)
Apologies.  The description is incomplete.  The intent is not to let users reference each others templates easily, but to ease the migration of material from a users space to the main space.  To that end, the proposed template would check to see if the template exists in namespace Template: and refer to the user space version only if it did not exist in Template:.  It would also check to see if the template existed in the user's top level space and try the user's 'templates' subpage tree as a last resort. 
I was thinking that the following steps would occur: 
  1. A set of material is developed in a user's space using this template for internal references. 
  2. The material is reviewed by the community. 
  3. If and when the material is accepted, it would be moved to the main space. 
  4. The use of this template would be removed from the accepted pages after they had been moved, disconnecting them from the user's space. 
Since there may be several parts to a large project, it could take some time to move the pieces.  This would be especially true if only a subset of the projects pages were approved. 
Part of the problem this template would address is that the templates in the incomplete, and therefore unaccepted, pieces of the project to the accepted pieces should not break when the redirects in the user's space are removed. 
And that shows that I had not thought about the details quite enough.  There should also be a template for project internal links.  The logical name would be '{{ul}}' but that might get confused with the HTML tag <ul>.      mtew 18:10, 20 December 2008 (UTC)
I don't think there are enough projects in userspace to justify such an idea. Templates from the user namespace just shouldn't be used in the main space, reasons for that include the fact that it is a well known etiquette to not change anything in other's user pages. Also, if I understand you correct, you want to use that ul-template then in the main space articles, and it won't be changed when the template is moved to the real template namespace. But that is only confusing for people who look at those articles and it always leaves the username in the article that shouldn't be there at all.
In the past, whenever we had something developed in the user namespace (take for example the whole infobox design - especially the skill infoboxes), there were example pages made in the user namespace and then it was discussed on appropriate pages. When it was approved, the template was moved to the template namespace and the articles could start to use the template. And that is the best way in my opinion, there is no need to make it too complicated for the low number of bigger projects we might implement in the future; fact is that the wiki is really complete, from the basic structure. poke | talk 13:38, 21 December 2008 (UTC)
Once moved to main space, invocations of both of these templates should be removed.  They could remain in pieces of the project that remain in the users space.  In both cases, there would be no need for haste in making the edits.  The links and template references would switch as soon as the page was moved to main space.  It would be a good idea, but not necessary, to remove there use from any pages that remain in the users project space that point to the moved pages.  This is intended to be a tool to be used in exactly the situation you describe and also so article sets could be developed in user space with appropriate discussion before being <humor>inflicted</humor> on the public. 
The idea is to simplify larger projects, not to complicate them.  If these templates do not exist or are not used, the page interconnections would break when the redirect pages go away.  Admittedly, not a huge problem.      mtew 17:56, 21 December 2008 (UTC)

Usage sections[edit]

I've been seeing a fair few templates being edited to add usage sections, for example Template:Infinity. However, a lot of them have no parameters, meaning it's standard template usage - i.e. wrap with curly braces. Are these sections really necessary? -- pling User Pling sig.png 15:34, 12 November 2009 (UTC)

No, I wouldn't say that. The whole description/usage/examples sections are only useful for thos templates that actually require the users to work with the template. Not for icon template or such. poke | talk 22:06, 12 November 2009 (UTC)
Most of the icon templates edited by others have some how included the usage section. Just had that one become like the others. However, I don't see a problem either way. -- User Ariyen sig icon.gifriyen 22:22, 12 November 2009 (UTC)