Description [ edit ]
This WikiProject was formed to better manage the BattleTechWiki's myriad templates . This page contains their many useful suggestions, and it is hoped that this project will help to focus the efforts of other editors. If you would like to help, please inquire on the project's talk page and see the to-do list .
The main goal of this WikiProject is:
To help manage the template namespace of the BattleTechWiki.
Conducting efforts to better organize, document and display all templates in the template namespace, including: navigation templates, infobox templates, inline templates, image copyright tags and much more.
Solving specific templates issues, such as standardisation of content and categorization.
Improving the general documentation on how to create and use templates, in addition to improving the documentation pages of the individual templates.
Clean-up of the unused, unneeded and/or redundant templates.
Providing help and guidance in creating, updating, correcting and testing templates.
Improving template accessibility
Related WikiProjects [ edit ]
Related
Child projects [ edit ]
Participants [ edit ]
Please feel free to add yourself here, and to indicate any areas of particular interest.
Open Tasks [ edit ]
Continuation of importing needed Wikipedia templates and Modules
Doing once over of Template Documentation subpages
Making sure all links that need to be directed to Wikipedia are (using the 'w:' in their links).
Improve wording as much as can be done.
Modify examples to match our use cases.
Remove technical wordage that wouldn't be useful to our users.
Filling in the BattleTechWiki:Template index , using the below as a guide
Taking a look at what we currently have here: Category:Documentation see also templates
Reviewing, modifying and export any list templates in that category
Checking if there are any other useful list templates needed by us on on Wikipedia's version of the same
Uploading of svg file images for use on templates
It has been recommended that we use Material Design Icons
Attempt to use the most "like" icon, referencing what Wikipedia is using for it
Create real pages of the categories listed here Category:System Related Pages
Featured Content [ edit ]
Internal-linking templates for the "See also" sections or at the bottom of template documentation [ edit ]
Most of the example boxes you see here are in Category:Documentation see also templates
Main namespace Other namespaces All namespaces Navboxes of templates Inline images Related topics
Inline cleanup tags
Attribution Clarity Miscellaneous Neutrality Precision
Time-sensitivity Verifiability
Dubious Incomplete or broken citation Missing or problematic reference
General advice
String-handling templates
(help page)
Substring (select chunk of string by its position)
{{str sub new }} Select a substring based on starting and ending index counted in either direction. {{str left }} Keep the first N characters of a string, or duplicate it to N characters. {{str crop }} Return all but the last N characters of a string. {{str index }} Return the N-th character of a string.
{{str right }} Return substring starting at N-th character to end of string. {{str rightc }} Return the last N characters of a string; or a given value if empty. {{str sub old }} Return substring of given length starting at N-th character.
Trimming (select/remove chunk of string by character type)
Select/remove specific item from string
{{delink }}, {{trim brackets }} Removes wikilink brackets (wikicode); all or outer only . {{Plain text }} Removes wikicode (formatting and brackets) {{PAGENAMEBASE }} Trim off any parenthesis text at the end of a string (disambiguation). {{title disambig text }} Returns text in parentheses at the end of a string (disambiguation).
{{title year }} Returns the 3-or-4-digit year from a pagename, if any. {{title decade }} Returns the 4-digit decade (e.g. "1740s") from a pagename, if any. {{title number }} Returns any number from a pagename.
Insertion, replacement and length
{{loop }} Repeat character string a specified number of times. {{replace }} Returns the string, after replacing all occurrences of a specified string with another string. {{str rep }} Returns the string, after replacing the first occurrence of a specified string with another string. {{digits }} Returns the string, after removing all characters that are not digits 0–9 {{Nowiki }} Displays wikitext as plain text.
{{str len }} Returns a string's length. {{str ≥ len }} Check if a string is "longer or equally long" or "shorter" than a given length. {{str ≤ len }} Check if a string is "shorter or equally long" or "longer" than a given length. {{str ≠ len }} Check if a string is "not equal" or "equal" to a given length.
Analysis and searching
{{str startswith }} {{str endswith }} Check if a string starts or ends with a given string. {{str find }}, {{strfind short }} Returns the numerical location of a given string in a string. {{in string }} Returns optional string when given string is not found {{str count }} Count the number of occurrences of a pattern within a string.
{{a or an }} Takes a noun and produces the appropriate indefinite article, based on whether the first letter is a vowel. {{Array }} Array manipulation and retrieval. {{Font style }} Returns bold or italic if the input value has either formatting. {{Isnumeric }} Returns number when true, blank when not numeric. {{str letter }} Returns the number of letters that begin a string. {{str number }} Returns the number of numbers that begin a string.
Modules and built-in functions
Namespace and pagename-detecting templates
Namespace
Pagename
When on basepage Detects and acts according to whether it is on a basepage or on any subpage (that is, a ../..
subpage).
When pagename is For pattern matching on the pagename.
Module:Page Can take apart and put together pagenames in several ways.
IP-talk Returns IP-user talkpage, registered-user talkpage or non-user talkpage.
IP-user other For detecting IP-user pages.
Subpage other Pagename has an after-slash part (not in mainspace)
Sandbox other Page is subpage /sandbox (template space)
Testcases other Page is subpage /testcases (template space)
Rootpage other Page is rootpage (vs. /subpage) (template space)
Others
Stub other Detects whether it is on a page with a stub template or not.
Redirect other Detects whether it is on a redirect or not.
If preview Detects whether page is viewed as a preview or not.
If IP Displays different content to IP users and logged-in users.
If autoconfirmed Displays different content to autoconfirmed and non-autoconfirmed users.
If extended confirmed Displays different content to extended confirmed and non-extended confirmed users.
If administrator Displays content only to admins.
If mobile Displays different content to mobile users and desktop users.
Noscript Detects whether page is viewed with a JavaScript-capable client or not.
Help templates [ edit ]
[[File: | thumb | upright | right | alt= | caption ]]
<ref>{{cite web
|url=
|title=
|author=
|date=
|website=
|publisher=
|access-date=
}}</ref>
<ref>{{cite book
|last=
|first=
|author-link=
|title=
|publisher=
|series=
|year=
|doi=
|isbn=
}}</ref>
<ref>{{cite book
|last1 =
|first1 =
|last2 =
|first2 =
|author-link =
|coauthors =
|editor =
|title =
|trans-title =
|url =
|access-date =
|edition =
|series =
|volume =
|date =
|year =
|publisher =
|location =
|isbn =
|doi =
|page =
|pages =
|chapter =
}}</ref>
Single input:{{convert|original_value|original_unit|conversion_unit|abbr=on}}
Range of values:{{convert|orig_val1|range|orig_val2|original_unit|conversion_unit|abbr=on}}
Examples:{{convert|60|and|170|kg|lb|abbr=on}}
{{convert|18|°C|°F}}
{{convert|3.21|kg|lb}}
Code
Effect
{{CURRENTWEEK}}
36
{{CURRENTDOW}}
2
{{CURRENTMONTH}}
09
{{CURRENTMONTHNAME}}
September
{{CURRENTMONTHNAMEGEN}}
September
{{CURRENTDAY}}
5
{{CURRENTDAYNAME}}
Tuesday
{{CURRENTYEAR}}
2023
{{CURRENTTIME}}
19:50
{{NUMBEROFARTICLES}}
46,955
{{NUMBEROFPAGES}}
125,494
{{NUMBEROFUSERS}}
13,343
{{PAGENAME}}
Project Templates
{{NAMESPACE}}
BattleTechWiki
{{REVISIONID}}
982971
{{REVISIONUSER}}
Deadfire
{{localurl:pagename}}
/wiki/Pagename
{{localurl:Wikipedia:Sandbox |action=edit}}
/wiki/index.php?title=Wikipedia:Sandbox&action=edit
{{fullurl:pagename}}
https://www.sarna.net/wiki/Pagename
{{fullurl:pagename|query_string }}
https://www.sarna.net/wiki/index.php?title=Pagename&query_string
{{SERVER}}
https://www.sarna.net
{{ns:index }} e.g. '{{ns:1}}'
fullname of namespace e.g 'Talk'
{{SITENAME}}
BattleTechWiki
{{blockquote |text= |sign= }}
< blockquote >
< p > QUOTED PARAGRAPH</ p >
< p > NAME, SOURCE, REFERENCE</ p >
</ blockquote >
(This page is about USE1. For other uses, see About (disambiguation).)
(This page is about USE1. For other uses, see PAGE2.)
(This page is about USE1. For USE2, see PAGE2.)
{{About|USE1|USE2|PAGE2}}
(This page is about USE1. For USE2, see PAGE2. For USE3, see PAGE3. For USE4, see PAGE4. For USE5, see PAGE5.)
{{About|USE1|USE2|PAGE2|USE3|PAGE3|USE4|PAGE4|USE5|PAGE5}}
{|
|-
! scope="col" |COLUMN1
! scope="col" |COLUMN2
|-
|ROW1
|ROW1/COL2
|-
|ROW2
|ROW2/COL2
|}
{| class="wikitable"
|-
! scope="col" |COLUMN1
! scope="col" |COLUMN2
|-
|ROW1
|ROW1/COL2
|-
|ROW2
|ROW2/COL2
|}
{| class="wikitable mw-collapsible mw-collapsed" style="text-align: left;margin:0px;"
|-
! style="width:20em;" |COLUMN1
! style="width:20em;" |COLUMN2
|-
|ROW1
|ROW1/COL2
|-
|ROW2
|ROW2/COL2
|-
|}
{{col-begin|width=100%}}
{{col-break|width=}}
{{col-end}}
Wiki
Shortcut
Wikimedia Commons
[[commons:]]
Wikipedia
[[w:]]
Wiktionary
[[wikt:]]
Wikibooks
[[b:]]
Wikisource
[[s:]]
Wikispecies
[[species:]]
Metawiki
[[m:]]
MediaWiki
[[mw:]]
Special Pages [ edit ]
Templates [ edit ]
Others to check [ edit ]
Extensions [ edit ]
Work with the following Mediawiki extensions:
Extension:TemplateStyles (an extension that allows to specify that a stylesheet should be loaded from a wiki page, allowing the template to have custom styles without having to modify the site's main CSS file).
Extension:TemplateData (an extension that provides the information about templates).
Extension:TemplateWizard (an extension that adds a popup dialog box for adding template code to wikitext).
Extension:WikiEditor (an extension that provides the editing toolbar).
Extension: Page Forms (an extension allows you to have forms for creating and editing pages on your wiki, as well as for querying data, all without any programming).
BattleTechWiki's WikiProjects
Maintenance projects Category Projects General Projects If you wish to see the descriptions of these or directions on creating a new project,
please visit here