Template:Antibody/doc: Difference between revisions

From OpenWetWare
Jump to navigationJump to search
mNo edit summary
mNo edit summary
Line 5: Line 5:
<!---->
<!---->
== Purpose ==
== Purpose ==
This template should be added to the main page of all antibodys documented on this wiki (and only the main page).  It will add a useful infobox using the information supplied (see below) and will automatically add the antibody to [[:Category:All antibodys]], plus the appropriate [[:Category:Antibodys by status|status]] and [[:Category:Antibodys by implementation type|implementation type]] categories.
This template should be added to the main page of all antibodies documented on this wiki (and only the main page).  It will add a useful infobox using the information supplied (see below) and will automatically add the antibody to [[:Category:All antibodies]], plus the appropriate [[:Category:Antibodies by status|status]] and [[:Category:Antibodies by implementation type|implementation type]] categories.


== Usage ==  
== Usage ==  
Line 26: Line 26:
|imagesize    =
|imagesize    =
|update        =
|update        =
|westernblot  = yes
|immunoprecipitation =
|immunocytochemistry =
|immunohistochemistry =
}}</pre>
}}</pre>


Line 35: Line 39:
|type1        = {{{type1}}}
|type1        = {{{type1}}}
|type2        = {{{type2}}}
|type2        = {{{type2}}}
|hook1        = hook1
|hook2        = hook2
|username      = SomeUser
|username      = SomeUser
|author        = SomeAuthor
|author        = SomeAuthor
Line 42: Line 44:
|version      = {{{version}}}
|version      = {{{version}}}
|update        = {{{update}}}
|update        = {{{update}}}
|mediawiki    = {{{mediawiki}}}
|license      = {{{license}}}
|download      = {{{download}}}
|readme        = {{{readme}}}
|changelog    = {{{changelog}}}
|description  = {{{description}}}
|parameters    = {{{parameters}}}
|tags          = {{{tags}}}
|rights        = {{{rights}}}
|example      = {{{example}}}
|example      = {{{example}}}
|compatibility = {{{compatibility}}}
|westernblot  = {{{westernblot}}}
|immunoprecipitation = {{{immunoprecipitation}}}
|immunocytochemistry = {{{immunocytochemistry}}}
|immunohistochemistry = {{{immunohistochemistry}}}
}}
}}
|}
|}
Line 74: Line 70:
|<span id="status">'''status'''</span> || '''current release status'''
|<span id="status">'''status'''</span> || '''current release status'''
One of:  
One of:  
* ''[[:Category:Unstable antibodys|unstable]]'' (broken - do not use this antibody)
* ''[[:Category:Unstable antibodies|unstable]]'' (broken - documentation of this antibody is not complete)
* ''[[:Category:Experimental antibodys|experimental]]'' (early stages of development, may change drastically.)
* ''[[:Category:In-Progress antibodies|In-Progress]]'' (early stages of development, may change drastically.)
* ''[[:Category:Beta status antibodys|beta]]'' (stable but not fully tested)
* ''[[:Category:Stable antibodies|stable]]'' (stable version)
* ''[[:Category:Stable antibodys|stable]]'' (stable version)
* ''[[:Category:Antibodies with unknown status|unknown]]'' (default)
* ''[[:Category:Antibodys with unknown status|unknown]]'' (default)
If the status is anything other than the above, it will be ignored and the default value of 'Unknown' will be displayed in the template instead.  In cases where the value is omitted, it will be categorised as [[:category:antibodies with unknown status|unknown]].  In cases where the value is invalid, it will be placed in a [[:category:antibodies with invalid status|special category]] so that the error can be caught and fixed.
If the status is anything other than the above, it will be ignored and the default value of 'Unknown' will be displayed in the template instead.  In cases where the value is omitted, it will be categorised as [[:category:antibodys with unknown status|unknown]].  In cases where the value is invalid, it will be placed in a [[:category:antibodys with invalid status|special category]] so that the error can be caught and fixed.
|-
|-
| '''type1'''<br/>''type2''<br/>''type3''<br/>''type4''<br/>''type5''<br/>''type6''<br/> || <span id="type">'''implementation type'''</span><!-- id here so at top of documentation -->
| '''type1'''<br/>''type2''<br/>''type3''<br/>''type4''<br/>''type5''<br/>''type6''<br/> || <span id="type">'''implementation type'''</span><!-- id here so at top of documentation -->
Line 85: Line 80:
The  implementation strategy(s) employed in building this antibody. This parameter is used to create categories that help programmers find examples of various MediaWiki specific implementation strategies or patterns.  Although the values of this parameter sometimes coincide with the use case or purpose of an antibody, that is not reason for this parameter.  If the values you have chosen for this parameter do not adequately identify the [[w:Requirements|purpose]] or possible [[w:Use case|use case]]s, we recommend you add additional [[Help:Categories|category links]] as needed.
The  implementation strategy(s) employed in building this antibody. This parameter is used to create categories that help programmers find examples of various MediaWiki specific implementation strategies or patterns.  Although the values of this parameter sometimes coincide with the use case or purpose of an antibody, that is not reason for this parameter.  If the values you have chosen for this parameter do not adequately identify the [[w:Requirements|purpose]] or possible [[w:Use case|use case]]s, we recommend you add additional [[Help:Categories|category links]] as needed.


Any other value for 'type' is invalid, and will cause the antibody to be placed in [[:Category:Antibodies with invalid or missing type]].


Legal values for the '''type1''','''type2''',... parameters are:
Note: Many antibodies have more than one type, if this applies to yours,replace <code><nowiki>|type=</nowiki></code> with <code><nowiki>|type1=|type2=|type3=...</nowiki></code>.  You may define up to six types for an antibody.
* '''''[[:Category:Parser antibodys|parser]]''''' - catchall for uncategorized [[Manual:Extending wiki markup|parser antibodys]]. If you have written a parser antibody, please use one of the following more specific types:
** ''[[:Category:Link markup antibodys|link]]'' - customized [[Manual:Extending wiki markup|link markup]], e.g. <code><nowiki>[[</nowiki>...]]</code>
** ''[[:Category:Parser function antibodys|parser function]]'' - custom [[Manual:Parser functions|parameterized template markup]], e.g. <code><nowiki>{{</nowiki>''#name:'' ... }}</code>
** ''[[:Category:Tag antibodys|tag]]'' - [[Manual:Tag antibodys|custom XML tag markup]], e.g. <code><nowiki><</nowiki>''tagname''>...<nowiki></</nowiki>''tagname''></code>
** ''[[:Category:Variable antibodys|variable]]'' - custom [[Manual:Variables|unparameterized template markup]], e.g. <code><nowiki>{{NAME}}</nowiki></code>
** ''[[:Category:Extended syntax antibodys|extended syntax]]'' - Antibodys that add non-standard wiki syntax (i.e. <em>not</em> [[Manual:Tag antibodys|tags]], [[Manual:Parser functions|parser functions]], or [[Manual:Variables|variables]]).
*:
* [[:Category:User access antibodys|'''''access''''']] - catchall for [[Manual:User access antibodys|user access antibodys]], that is, antibodys that create, authenticate, grant permissions, revoke permissions, or monitor the activity of users.  If you have written an access antibody, please use one of the following more specific types:
** [[:Category:User activity antibodys|''user activity'']] - antibodys that monitor user activity (logins, logouts, new user creation, etc)
** [[:Category:User identity antibodys|''user identity'']] - antibodys that create and delete users, and/or verify the identity of a user
** [[:Category:User rights antibodys|''user rights'']] - antibodys to the rights management system, e.g. changes to the way rights are assigned, apis, maintenance tools (does not include antibodys that merely name the rights needed to use the features of that antibody.  For this purpose use the [[#rights|rights parameter]].).
*:
* [[:Category:User interface antibodys|'''''interface''''']] - catchall for uncategorized user interface antibodys.
** ''[[:Category:Media handling antibodys|media]]'' - antibodys that permit the embedding of multimedia content on wiki pages by registering a file antibody with [[Manual:$wgMediaHandlers|$wgMediaHandlers]].
** ''[[:Category:Personalization antibodys|mywiki]]'' - antibodys that provide infrastructure so that users may personalize their MediaWiki experience and/or assist in the management of that infrastructure
** [[:Category:Notification antibodys|''notify'']] - antibodys that email users, broadcast messages and provide other forms of community notification
** ''[[:Category:Page action antibodys|''page action'']]'' - antibodys that enhance or modify [[Manual:Page action|page action]]s.  This includes anything that implements an action that reads, writes, searches for, creates, renames, deletes, redirects or discusses a page.  It does not include rights (use ''user rights'') or logs (use ''user activity'').
** [[:Category:Search antibodys|''search'']] - antibodys that search through and select articles for users.
** [[:Category:Skin antibodys|''skin'']] - antibodys adding [[w:CSS|CSS]] or [[w:JavaScript|JavaScript]], or implementing hook functions to change the look and feel of MediaWiki via the skins framework.
** [[:Category:Ajax antibodys|''ajax'']] - antibodys that use [[w:Ajax|Ajax]] programming techniques.
** [[:Category:Special page antibodys|''special'']] - antibodys that subclass the [[Manual:SpecialPage class|SpecialPage class]], use one of its hooks, or patch one or more functions in [http://svn.wikimedia.org/doc/SpecialPage_8php-source.html SpecialPage.php]. See [[Manual:Special pages]] for more information.
* '''other'''
** [[:Category:API antibodys|''api'']] - antibodys that add a new API module or extend a core API module.
** [[:Category:Hook antibodys|''hook'']] - Hook antibody - defines a <em>new</em> hook - see hook1, etc below if you want to define hooks <em>used</em> by your antibody
 
 
* ''[[:Category:Parser function antibodys|pfunc]]'' - same as ''parser function''
 
<div style="border: thin solid blue">We are in the process of revising the values of this page.  Types below this point are likely to be deprecated or redefined. We apologize for the inconvenience.  See [[Template talk:Antibody#Type taxonomy]] for more information.</div>
* ''[[:Category:Database antibodys|database]]'' - adds tables and/or fields to the database backing a MediaWiki installation
* ''[[:Category:Database antibodys|db]]'' - same as ''database''
* ''[[:Category:Data extraction antibodys|data extraction]]'' - Data extraction
* ''[[:Category:Antibody examples|example]]'' - Not a real antibody, but an example of how to write one
 
Any other value for 'type' is invalid, and will cause the antibody to be placed in [[:Category:Antibodys with invalid or missing type]].
 
Note: Many antibodys have more than one type, if this applies to yours,replace <code><nowiki>|type=</nowiki></code> with <code><nowiki>|type1=|type2=|type3=...</nowiki></code>.  You may define up to six types for an antibody.
|-
|-
| <span id="hook">'''hook1'''</span><br/>''hook2''<br/>''hook3''<br/>''hook4''<br/>...<br/>''hook30''
| <span id="username">'''username'''</span> || The author's username on OpenWetWare.org (if they have one). May be omitted, but if present it will be used to link to the author's user & user_talk page.
|valign="top"| '''name of each hook used by the antibody'''
 
Entering values in this field is a good way to get exposure for your antibody and help other developers.  Each documented hook will automatically add the antibody to a category listing antibodys that use that hook. This category is autolinked to each hook article so that programmers can easily find examples of antibodys that use a particular hook.
 
For built-in hooks:
* use the hook name alone.  Please see [[Manual:Hooks]] for values (but omit introductory '/').
 
For custom hooks defined by antibodys:
* use ''antibodyName''/''hookName''.  For a partial list of custom hooks, see [[Antibody hook registry]]. 
 
For multiple hooks, assign the first hook to '''hook1''', the second to '''hook2''' and so on.
|-
|-
| <span id="username">'''username'''</span> || The author's username on MediaWiki.org (if they have one). May be omitted, but if present it will be used to link to the author's user & user_talk page.
| <span id="author">author</span>|| The antibody author's name, if different from their OpenWetWare.org username. Free text. If omitted then the 'username' field will be used (if present).
|-
| <span id="author">author</span>|| The antibody author's name, if different from their MediaWiki.org username. Free text. If omitted then the 'username' field will be used (if present).
|-
|-
| <span id="description">'''description'''</span>|| '''short description'''
| <span id="description">'''description'''</span>|| '''short description'''
Line 147: Line 93:
|-
|-
| <span id="imagesize">imagesize</span>|| ''facultative'', size of the image (default size is 220px)
| <span id="imagesize">imagesize</span>|| ''facultative'', size of the image (default size is 220px)
|-
| <span id="version">version</span>|| last version
|-
|-
| <span id="update">update</span>|| date of the last update
| <span id="update">update</span>|| date of the last update
|-
| <span id="mediawiki">mediawiki</span>|| required version of MediaWiki
|-
| <span id="license">license</span>|| license(s) governing use of this antibody, e.g. GPL
|-
| <span id="download">'''download'''</span>|| '''link to the download''' : [http://svn.wikimedia.org/svnroot/mediawiki/trunk/antibodys/ SVN] or other. If you put the code into page in the MediaWiki Wiki, link to it using a full page name and section name, e.g. <code> <nowiki>[[Antibody:Example/version_1.22a#Code]]</nowiki> </code> (it must reamain valid when bot-copied elsewhere)
|-
| <span id="readme">readme</span>|| link to the readme file : [http://svn.wikimedia.org/svnroot/mediawiki/trunk/antibodys/Sort/Sort README] or other
|-
| <span id="changelog">changelog</span>|| link to the changelog file : [http://svn.wikimedia.org/svnroot/mediawiki/trunk/antibodys/Sort/Sort CHANGELOG] or other
|-
| <span id="parameters">parameters</span> || available parameters for LocalSettings.php
|-
| <span id="tags">tags</span> || any tags your antibody uses (e.g. &lt;tag1&gt;, &lt;tag2&gt;).
|-
| rights|| <span id="rights">rights</span> added by the antibody. '''Not to be confused with the license!''' Rights are such as ''[[Antibody:MakeBot|makebot]]'' or ''[[Antibody:Desysop|desysop]]'', not such as GFDL or LGPL or GPL - those are licenses!
|-
| <span id="example">example</span> || example, website or screenshot of working antibody
|-
| <span id="compatibility">compatibility</span> || compatibility chart, e.g. [[Template:Antibody Testing]]
|}
|}


Line 180: Line 104:


Normally left blank.  Alternate values are:
Normally left blank.  Alternate values are:
* ''nocats'' - suppresses categorization. Use this value if you are adding this template to [[Help:Subpage|subpages]] of an antibody or to how-to documentation of antibodys. For example, the usage image above sets <code>templatemode=nocats</code> because this isn't an actual antibody page and we don't want to add this page to any categories on account of it.
* ''nocats'' - suppresses categorization. Use this value if you are adding this template to [[Help:Subpage|subpages]] of an antibody or to how-to documentation of antibodies. For example, the usage image above sets <code>templatemode=nocats</code> because this isn't an actual antibody page and we don't want to add this page to any categories on account of it.




If this is left blank, this template will add the host page to [[:Category:All antibodys]] and to one or more additional categories, depending on the values assigned to the [[#Content parameters|Content parameters]].
If this is left blank, this template will add the host page to [[:Category:All antibodies]] and to one or more additional categories, depending on the values assigned to the [[#Content parameters|Content parameters]].
|}
|}


Line 211: Line 135:
To improve the create antibody button behavior:
To improve the create antibody button behavior:
* '''[[Template:Antibody/Sample]]:''' The boilerplate antibody that is preloaded into newly-created pages.
* '''[[Template:Antibody/Sample]]:''' The boilerplate antibody that is preloaded into newly-created pages.
* '''[[Template:Antibody/CreateAntibodyInputBox]]:''' An input box that can be inserted wherever you want users to easily create antibodys.  For documentation on the <code><nowiki><inputbox></nowiki></code> tag, please see [[Antibody:InputBox]].
* '''[[Template:Antibody/CreateAntibodyInputBox]]:''' An input box that can be inserted wherever you want users to easily create antibodies.  For documentation on the <code><nowiki><inputbox></nowiki></code> tag, please see [[Antibody:InputBox]].
* '''[[Antibody:MyAntibody]]:''' - Defines a placeholder, in case a user accidentally hits the create button without changing the antibody name.
* '''[[Antibody:MyAntibody]]:''' - Defines a placeholder, in case a user accidentally hits the create button without changing the antibody name.



Revision as of 00:08, 16 June 2009

Template:Antibody (talk, backlinks, edit)


Purpose

This template should be added to the main page of all antibodies documented on this wiki (and only the main page). It will add a useful infobox using the information supplied (see below) and will automatically add the antibody to Category:All antibodies, plus the appropriate status and implementation type categories.

Usage

Cut and paste:

{{Antibody|templatemode =
|name          = 
|status        =
|type1         =
|type2         =
|username      =
|author        =
|description   =
|image         =
|imagesize     =
|update        =
|westernblot   = yes
|immunoprecipitation =
|immunocytochemistry =
|immunohistochemistry =
}}

For help with parameter values, see below.

   
List of OpenWetWare Antibodies
anti {{{name}}}
Suitability for..
Western Blot  {{{westernblot}}}
Help



Content parameters

This section describes parameters that govern infobox content. For help with templatemode and other control parameters, please see Control parameters.

Content parameters
name name of the antibody
status current release status

One of:

  • unstable (broken - documentation of this antibody is not complete)
  • In-Progress (early stages of development, may change drastically.)
  • stable (stable version)
  • unknown (default)

If the status is anything other than the above, it will be ignored and the default value of 'Unknown' will be displayed in the template instead. In cases where the value is omitted, it will be categorised as unknown. In cases where the value is invalid, it will be placed in a special category so that the error can be caught and fixed.

type1
type2
type3
type4
type5
type6
implementation type

The implementation strategy(s) employed in building this antibody. This parameter is used to create categories that help programmers find examples of various MediaWiki specific implementation strategies or patterns. Although the values of this parameter sometimes coincide with the use case or purpose of an antibody, that is not reason for this parameter. If the values you have chosen for this parameter do not adequately identify the purpose or possible use cases, we recommend you add additional category links as needed.

Any other value for 'type' is invalid, and will cause the antibody to be placed in Category:Antibodies with invalid or missing type.

Note: Many antibodies have more than one type, if this applies to yours,replace |type= with |type1=|type2=|type3=.... You may define up to six types for an antibody.

username The author's username on OpenWetWare.org (if they have one). May be omitted, but if present it will be used to link to the author's user & user_talk page.
author The antibody author's name, if different from their OpenWetWare.org username. Free text. If omitted then the 'username' field will be used (if present).
description short description
image screenshot or logo of antibody
imagesize facultative, size of the image (default size is 220px)
update date of the last update

Control parameters

Control parameters
templatemode Controls auto-categorization of host page.

Normally left blank. Alternate values are:

  • nocats - suppresses categorization. Use this value if you are adding this template to subpages of an antibody or to how-to documentation of antibodies. For example, the usage image above sets templatemode=nocats because this isn't an actual antibody page and we don't want to add this page to any categories on account of it.


If this is left blank, this template will add the host page to Category:All antibodies and to one or more additional categories, depending on the values assigned to the Content parameters.

Using the infobox

Existing antibody pages

If you want to add the infobox to an existing page, copy and paste the code at the top of this page.

Create a new antibody article

If you want to create a new antibody page, enter the name below and click the button. A new page will be created with the infobox template already in place.


Please replace "MyAntibody" with the antibody name:



Enhancing this template

If you would like to improve on this template, thanks! This is a complicated template so here is some help along the way:

Fixing documentation

If you would like to fix documentation, please be aware that documentation and code is split into two files:

  • Template:Antibody/Doc - stores all documentation.
  • Template:Antibody - stores only the code for the template and a small amount of non-included material (category links, transcluded documentation link).


In addition, Template:Antibody/Sample stores the boiler plate that is preloaded into newly created pages and contains some basic documentation on how to fill in the template parameters. It needs to be kept in sync with Template:Antibody/Doc.

The Create antibody button

To improve the create antibody button behavior:

Infobox parameters

In general:

  • To make this template easy to use, each label in the infobox is linked to documentation on the template parameter(s) it displays. If you add a parameter, please be sure to also add it to the content parameter documentation and link its label to that documentation.


To change/correct/add to the implementation type parameters:


To change the behavior of the hook parameters:

Test case

See if the following pages are still ok, after edited this template.