Gaming
 

Talk:Crystal Colors Template

From FFXIclopedia, the free Final Fantasy XI encyclopedia

Okay, they are called "templates" but they don't use real wiki templates. I've created true crystal color templates. For example previously if you wanted to use the color indicator for a green crystal you would type:
"{{Wind|Wind}}" and get Wind
With true wiki templates you now type:
"{{Wind|Wind Crystal}}" and getWind Crystal
Please take note that default values on templates are a feature of the 1.6 wiki engine (and don't seem to be supported on this site) so I couldn't use:
"{{Wind}}" and get Wind instead I get Wind.
To get Wind you need to type "{{Wind|Wind}}". —The preceding unsigned comment was added by Strangeone (talkcontribs).


Your light is a green color. FYI —The preceding unsigned comment was added by Ferine (talkcontribs).

Shouldn't this be moved to project space?Mifaco 21:44, 28 June 2007 (CDT)

Why? All the other templates are on the main namespace. --CharitwoTalk 21:46, 28 June 2007 (CDT)

Template Upgrades

In order to distinguish the elemental/crystal color templates from the color template and make them a bit more useful, I've come up with the following code (using {{Wind}} as the example):

{{#switch:{{{1|}}}
| Crystal = [[Wind Crystal|<font color="green">'''Wind Crystal'''</font>]]
| Element = [[Wind|{{Wind|Wind}}]]
| #default = <font color="green">'''{{{1|Wind}}}'''</font>
}}

I've changed the default value to "Wind", so typing {{Wind}} will result in Wind instead of {{{1}}}. In addition, I've added a #switch, so typing {{Wind|Crystal}} will result in Wind Crystal, making it much easier to link to the crystal, and typing {{Wind|Element}} will result in Wind, making linking to the element much easier as well. I think it'll make the templates much more useful while still keeping them simple. ~ Karuberu 02:48, 19 October 2007 (UTC)

What if you don't enter Wind or Crystal? --Chrisjander t/ c 01:34, 22 October 2007 (UTC)

It'll work the same as before; it will bold and color whatever text you enter. ~ Karuberu 01:42, 22 October 2007 (UTC)

Well, at least we don't have to change 23623652345 pages again. --CharitwoTalk 01:38, 22 October 2007 (UTC)

I noticed this but honestly I can't quite follow the code. If it doesn't effect existing use of the template then it seems fine. --GAHOO t/ c 19:48, 23 October 2007 (UTC)
Any uses of {{Wind|Wind}} will become Wind once it's changed. The same goes for {{Wind|Crystal}} becoming Wind Crystal. So it will change existing uses, but it's a rather harmless change. ~ Karuberu 22:04, 24 October 2007 (UTC)

To avoid some potential conflicts, I changed the {{Wind|Wind}} use to {{Wind|Element}}. Now it shouldn't affect very many, if any, existing uses of this template. ~ Karuberu 01:33, 26 October 2007 (UTC)

Since there's no real opposition, I'll go ahead and make the changes to the templates. As always, feel free to revert my changes if there are unforseen problems with the switch. ~ Karuberu 08:45, 31 October 2007 (UTC)