Difference between revisions of "Template:Infobox Wikipedia user script"

From blackwiki
Jump to navigation Jump to search
imported>Equazcion
(fix)
imported>Kephir
(please, no. these styles are hideous.)
Line 1: Line 1:
 
{{Infobox  
 
{{Infobox  
 
  | bodyclass    = infobox-user-script
 
  | bodyclass    = infobox-user-script
  | bodystyle    = border: 2px ridge #CAE1FF; width:30em; padding-bottom:0; {{bodystyle|}}}
+
  | bodystyle    = {{{bodystyle|}}}
| title        = [[Wikipedia:User scripts|User script]]
 
| above        = {{{name|{{SUBPAGENAME}}}}}
 
  
  | titlestyle  = font-size:.95em;padding:0;margin:0
+
  | title        = {{{name|{{SUBPAGENAME}}}}}
| abovestyle  = background:#83C5DA; padding:3px 0
 
| labelstyle  = background:#DFEFFF; padding:0 7px; vertical-align:middle
 
| datastyle    = padding:5px 5px; vertical-align:middle
 
  
 
  | image        = {{{logo|}}}
 
  | image        = {{{logo|}}}
Line 14: Line 9:
  
 
  | image2      = {{{screenshot|}}}
 
  | image2      = {{{screenshot|}}}
  | caption2    = {{#if: {{{screenshot-caption|}}} | '''{{{screenshot-caption|}}}''' | <!-- nothing --> }}
+
  | caption2    = {{{screenshot-caption|}}}
  
 
  | label1      = Description
 
  | label1      = Description
Line 31: Line 26:
 
  | data5        = {{{browsers|}}}
 
  | data5        = {{{browsers|}}}
  
  | label6      = [[WP:SKIN|Skin]]&nbsp;support
+
  | label6      = [[WP:Skin|Skin]]&nbsp;support
 
  | data6        = {{{skins|}}}
 
  | data6        = {{{skins|}}}
  
 
  | label7      = Source
 
  | label7      = Source
  | data7        = {{#if: {{{source|}}} | <code style="background:none;"> | <!-- nothing --> }}
+
  | data7        = {{{source| {{#if:{{{mainsource|}}}| [[{{{mainsource|}}}]] }} }}}
{{{source| {{#if:{{{mainsource|}}}| <code style="background:none;">[[{{{mainsource|}}}]]</code> }} }}} {{#if: {{{source|}}} | </code> | <!-- nothing --> }}
 
  
 
  | belowstyle = display:none;
 
  | belowstyle = display:none;
 
  | below        = {{#if:{{{mainsource|}}}| <span class="mainsource" style="display: none; speak: none; ">{{{mainsource}}}</span> }} {{#if:{{{install-target|}}}| <span class="install-target" style="display: none; speak: none; ">{{{install-target}}}</span> }}
 
  | below        = {{#if:{{{mainsource|}}}| <span class="mainsource" style="display: none; speak: none; ">{{{mainsource}}}</span> }} {{#if:{{{install-target|}}}| <span class="install-target" style="display: none; speak: none; ">{{{install-target}}}</span> }}
 
}}<noinclude>{{documentation}}</noinclude>
 
}}<noinclude>{{documentation}}</noinclude>

Revision as of 14:42, 9 October 2013

Infobox Wikipedia user script

[[Category:Infobox templates|Template:Remove first word]]

Template documentation[view] [edit] [history] [purge]

Example

MyScript
Wikimedia-logo.svg
Floater script screenshot.png
MyScript in action
DescriptionDoes something useful
AuthorUsername
StatusStable
UpdatedTemplate:Start date and age
Browser supportFirefox, Chrome
Skin supportVector
SourceUser:Username/Example.js
[[Category:Infobox templates|Template:Remove first word]]
{{infobox user script
 | name = MyScript
 | desc = Does something useful
 | author = [[User:Username|Username]]
 | updated = {{start date and age|2013|03|03}}
 | status = Stable
 | released = {{start date and age|2008|07|07}}
 | version = 2.1.0
 | source = [[User:Username/Example.js]]
 | skins = Vector
 | browsers = [[Firefox]], [[Google Chrome|Chrome]]
 | logo = [[File:Wikimedia-logo.svg|50px]]
 | screenshot = [[File:Floater script screenshot.png|300px]]
 | screenshot-caption = MyScript in action
}}
  • Add |styled = yes for an alternate colored version (see second example):
MyScript
DescriptionDoes something useful
AuthorUsername
StatusStable
UpdatedTemplate:Start date and age
Browser supportFirefox, Chrome
Skin supportVector
SourceUser:Username/Example.js
[[Category:Infobox templates|Template:Remove first word]]
{{infobox user script
 | name = MyScript
 | desc = Does something useful
 | author = [[User:Username|Username]]
 | updated = {{start date and age|2013|03|03}}
 | released = {{start date and age|2008|07|07}}
 | status = Stable
 | version = 2.1.0
 | source = [[User:Username/Example.js]]
 | skins = Vector
 | browsers = [[Firefox]], [[Google Chrome|Chrome]]
 | styled = yes
}}

Usage

This infobox is intended to be used on user script description/documentation pages.

Parameters

  • name: The name of the script. Defaults to page name.
  • desc: A short description of what the script does.
  • author: The script author's user name.
  • release: When the script was first released.
  • updated: The date of last update. Use {{start date and age}} to automatically display time since the last update.
  • status: Script's development status. You may describe this any way you like, such as alpha/beta/release, or stable/experimental/inactive.
  • source: The source code page.
  • skins: Supported skins.
  • browsers: Supported web browser(s).
  • github: The script's repository on GitHub.
  • gitlab: The script's repository on GitLab.
  • logo: Image file address for logo
  • screenshot: Image file address for screenshot
  • screenshot-caption: Text caption for screenshot
  • styled: Set to yes for an alternate colored version (see example above)

The following parameters can aid in automatic installation:

  • mainsource: The main source file, which is to be loaded from the user's custom script.
  • install-target: The preferred page on which the script should be included. The default is common.js.

{{Wikipedia:User scripts/Navbox}}