AINWiki | Flag icon information

Find all you need to know about the AIN in here - maps, wiki articles, union resources and in-depth details about events and union life.
Post Reply
User avatar
Zack
Posts: 2007
Joined: January 28th 2012, 12:40 am
Location: In a forest of syntax trees
Contact:

AINWiki | Flag icon information

Post by Zack » March 29th 2014, 9:57 am

Since there seems to be some confusion regarding my recent updates to the flag icon templates, let me clarify a few things about them.

A couple of weeks ago, I updated the wiki's flag icon templates to match their counterparts on Wikipedia. These updates also required adding a bunch of country data templates, which the new versions of our flag templates need in order to function properly, and which also let us do some cool new things with the flag templates. For example, it's now possible to use a historical version of a country's flag in a flag icon, which makes a lot of sense when writing history articles involving countries that haven't always used their current flags. As an example, when I created the country data template for Kingston and Boyce, I set that country's pre-1943 flag as a variant, which I then used in the article for the Puget Sound War. I'm sure you all can come up with other ways to use this new feature.

Also, it's now possible to use country codes in a flag icon template if that country's data template is set up to accept redirects from the country code (this also requires country data templates named with the country code to be created as redirects to the main country data template). I did this with the Lower Columbia country data template, which has a redirect from "Template:Country data LCO". For an article that uses these redirect aliases in its flag icon templates, take a look at Nathan's Neu Westfalen Air Force article.

In addition, the updated flag icon templates now produce different results from one another. Specifically, the "flag" template produces both a flag icon and a linked label with the country's name, while the "flagicon" template produces only the flag icon, which also serves as a link to the country's main article. There is also now a "flagcountry" template, which is more useful with redirect aliases, since it forces the label to be the country's full name instead of the redirect name. So if you want both the flag icon and the country name, you no longer need to type out both the flag template and a wikilink to the country's main article; but if you only want the flag icon, you can just use the "flagicon" template by itself.

The one downside to these updated templates is that they require us to have country data templates for any country (or subnational entity, or organization) we want to use in them. However, country data templates are very easy to make; all you have to do is copy the block of code from the "country showdata" template, paste it into your new country data template, and fill out the fields as appropriate. If you're not sure how to properly fill them out, just look at your own country's data template as an example (you can also edit your country's data template if you want to add anything to it).

That should be everything you need to know. If you have any questions, feel free to ask. :)
Feel brand new. Be inspired.
NYHAVEN
User avatar
InvaderNat
Posts: 1916
Joined: December 12th 2012, 4:59 am
Nation: Neu Westfalen
Location: New Zealand

Re: AINWiki | Flag icon information

Post by InvaderNat » April 4th 2014, 12:02 am

I've had a bit of trouble with them, usually i just go to wiki and find the template I'm looking for. Of course this doesn't always work when linking to wiki from AIN wiki. So I've still got a few red links around.
User avatar
Zack
Posts: 2007
Joined: January 28th 2012, 12:40 am
Location: In a forest of syntax trees
Contact:

Re: AINWiki | Flag icon information

Post by Zack » April 4th 2014, 12:58 am

If you're referring to the flag icons for RL countries, that's largely because we don't have articles on them (or redirects to their Wikipedia articles). Generally, when using these new templates for RL countries, it's best to use a line of code like the following:

Code: Select all

{{flagicon|Country}} [[w:Country|Country]]
This method is a bit more cumbersome, but it eliminates the red links without us having to create a bunch of redirects to Wikipedia articles.
Feel brand new. Be inspired.
NYHAVEN
User avatar
InvaderNat
Posts: 1916
Joined: December 12th 2012, 4:59 am
Nation: Neu Westfalen
Location: New Zealand

Re: AINWiki | Flag icon information

Post by InvaderNat » April 4th 2014, 1:12 am

Oh I see, thanks a lot. That method seems much better. :up:
Post Reply

Return to “Library of the Alliance”