Jump to content

User:Willscrlt/meta/iw

From Meta, a Wikimedia project coordination wiki
English English: 


{{User:Willscrlt/meta/iw}} automatically inserts interwiki links for each project to which Willscrlt contributes. It uses parser functions, variables, and other advanced template techniques to dynamically determine the current project and language, and based on that, the standard interwiki links that should be displayed on that project.

As-is, this template probably is not particularly useful to other people, but the logic used to determine the current project and which interwikis to display might be quite useful to others as a starting point for developing other templates. You are welcome to copy this template and adapt it however you like, but please do not edit this template, because it could break many other templates.

Usage

Copy the following text into the bottom of a page below any categories:

<!-- Transclude my standard interwikis or override them -->
{{{{ns:user}}:Willscrlt/meta/iw|/{{SUBPAGE}}}}
<!-- Enter any additional interwikis below -->

Attributes

To pick a specific page under my home user page, set the first attribute to the appropriate destination. Examples:
The default interwikis can be disabled or enabled as a group or individually.
  • |all=n suppresses interwikis for projects and languages other than: en.wiki, en.books, de.wiki, es.wiki, fr.wiki, it.wiki, pt.wiki, and simple.wiki
  • To disable interwikis for specific project types, set the corresponding value to "n" (overrides the 'all' setting)
    • |wiki=n — Wikipedia (also Commons and Test)
    • |books=n — Wikibooks
    • |news=n — Wikinews
    • |quote=n — Wikiquote
    • |versity=n — Wikiversity
    • |wikt=n — Wiktionary
  • To disable interwikis for specific languages, set the corresponding language value to "n" (overrides the 'all' setting)
    • Examples: |ar=n, |az=n, |be=n, |en=n, |simple=n, etc.


Examples

{{User:Willscrlt/meta/iw}}
Adds the standard interwikis to the page based on the project name (Meta), the language (en), and server name (meta.wikimedia.org).
{{User:Willscrlt/meta/iw|books=n}}
Does not display standard interwikis on Wikibooks sites (for example, if a template is not ported over to any Wikibooks site)
{{User:Willscrlt/meta/iw|ar=n|az=n|be=n|ca=n|et=n
|ia=n|id=n|ie=n|ja=n|lt=n|lmo=n|nds=n|pl=n|sco=n|tr=n}}
Does not display interwikis on projects where the listed languages are set to "n"


Version information

v3.2.0 (06:20, 12 February 2010 (UTC)) — This is the most current version available.

This template is used on multiple wiki projects. Unless it is horribly broken and causing major disruptions, please do not edit this template. The master template is located at m:User:Willscrlt/meta/iw and is manually distributed to other projects by its creator, Willscrlt (Talk).

History
  • v3.2.0 - Added new exclusion and other minor tweaks.
  • v3.1.0 - Revised the automatic categorization and added additional instructions to make it easy for people to disable the feature.
  • v3.0.0 - Adds parameter '1' subpage support and uses new logic to determine support (incl. better English and Simple English .determination)
  • v2.0.0 - Added switches for each language option and projects.
  • v1.2.0 - Fixes problems with Simple English sites that mimic the standard English language code ("en") instead of ("simple"), which would make templating things much easier.
  • v1.1.0 - Uses newer interwiki logic and has more links.
  • v1.0.0 - Initial version.