Template:ToolInfoBox: Difference between revisions

From CoMakingSpace Wiki

(add template parameter)
(invisible page contents (category, SMW) inside the wikitable code were only okay if the "similar" field was unused, otherwise the empty lines appeared there. New solution: all in one line...)
 
(11 intermediate revisions by 2 users not shown)
Line 22: Line 22:
{{ToolInfoBox
{{ToolInfoBox
|tool name=
|tool name=
|german=
|image=
|image=
|synonyms=
|synonyms=
Line 42: Line 43:
{{ToolInfoBox
{{ToolInfoBox
|tool name=Example: Woodturning Tools
|tool name=Example: Woodturning Tools
|german=
|image=cheap woodturning tools.JPG
|image=cheap woodturning tools.JPG
|synonyms=DE: Drechseleisen, Drechselmesser
|synonyms=DE: Drechseleisen, Drechselmesser
Line 48: Line 50:
|material=[[wood]]
|material=[[wood]]
|used with=[[Wood Lathe|wood lathe]]
|used with=[[Wood Lathe|wood lathe]]
|location=[[Wood Workshop|wood workshop]]<br>(wall above wood lathe)
|location=[[Location::Wood Workshop|wood workshop]]<br>(wall above wood lathe)
|access=[[Woodturning Introduction|woodturning introduction]]
|access=[[Woodturning Introduction|woodturning introduction]]
|tutors=[[Lukas]]
|tutors=[[Lukas]]
Line 57: Line 59:
</pre>
</pre>


There are a few tool categories such as [[woodworking]] or [[saws]] - please also [[Help:Wiki Basics#Categories & Namespaces|categorize]] your page to make it easier to find!
There are a few tool categories such as [[woodworking]] or [[saws]] that might be nice to link from "type" - please also [[Help:Wiki Basics#Categories & Namespaces|categorize]] your page to make it easier to find!


== Advanced Users (SMW) ==
== Advanced Users (SMW) ==
There is a "hidden" parameter in this template that's not in the copy template: <code>extrabox</code>. To enable <code>extrabox</code>, just give it any value (e.g. "true", "blablabla") and it should cause the box to behave as an extra without "Has image::".
There is a "hidden" parameter in this template that's not in the copy template: <code>extrabox</code>. To enable <code>extrabox</code>, just give it any value (e.g. "true", "blablabla") and it should cause the box to behave as an extra without "Has image::" and "Has German::".


You can use it when you '''don't''' want the InfoBox to set a "Has image::" value (as it automatically does for "image"). That's useful on pretty much every page with multiple InfoBoxes so there is just one "main" image to represent the page in galleries.
You can use it when you '''don't''' want the InfoBox to set a "Has image::" and "Has German::" value (as it automatically does for "image" and "german"). That's useful on pretty much every page with multiple InfoBoxes so there is just one "main" image to represent the page in galleries.


Questions, feedback and further improvements are welcome!
Questions, feedback and further improvements are welcome!


</noinclude>
</noinclude>
{| class="wikitable" style="float:right; margin-left: 10px; border-style: solid; border-width: 5px; border-color: black"
{| class="wikitable" style="float:right; margin-left: 10px; border-style: solid; border-width: 5px; border-color: black"
!colspan="2"|<small style="float:right">[[Template:ToolInfoBox|ToolInfoBox]]</small><br>
!colspan="2"|<small style="float:right">[[Template:ToolInfoBox|ToolInfoBox]]</small><br>
Line 84: Line 84:
{{!}}-
{{!}}-
{{!}} Type:
{{!}} Type:
{{!}} {{{type|hand tool or power tool?}}}
{{!}} {{{type|tool classification?}}}
|}}
|}}
|-
|-
Line 140: Line 140:
{{!}}  {{{similar}}}
{{!}}  {{{similar}}}
|}}   
|}}   
|}
|}[[Category:Tools]] [[Has caption::{{#if: {{{extrabox|}}} | |{{PAGENAME}}}}| ]] {{#if:{{{german|}}} | [[Has German::{{{german}}}|]] | }}<noinclude>
[[Category:Tools]]
 
[[Has caption::{{#if: {{{extrabox|}}} | |{{PAGENAME}}}}| ]]
== Template Parameters ==
[[Has redirect::{{#if: {{{extrabox|}}} | |{{PAGENAME}}}}| ]]
<noinclude>
<templatedata>
<templatedata>
{
{
Line 154: Line 152:
"default": "Unnamed Tool",
"default": "Unnamed Tool",
"required": true
"required": true
},
"german": {
"label": "The (best) German name of your tool (invisible)",
"description": "The (best) German name of your tool (not visible, but usable for advanced pages like automatic galleries)",
"type": "string",
"suggested": true
},
},
"extrabox": {
"extrabox": {
"label": "Extrabox?",
"label": "Extrabox? (advanced - if in doubt, ignore this)",
"description": "Apply this parameter if you use the template as an additional InfoBox on a tool page. This will remove the \"Has Image\" parameter from this infobox.",
"description": "Apply this parameter if you use the template as an additional InfoBox on a tool page with an existing \"main\" box. This will remove the \"Has Image\" parameter from this infobox so its image is NOT included as an SMW property of the page.",
"type": "boolean"
"type": "boolean"
},
},
"image": {
"image": {
"label": "An image of the tool (example.jpg)",
"label": "An image of the tool (example.jpg)",
"description": "The file name of the image which represents the tool the best. If you do not fill the parameter \"extabox\", this will be added as a Semantic MediaWiki parameter to the page.",
"description": "The file name of the image which represents the tool the best. If you do not fill the parameter \"extrabox\", this will be added to the page as a Semantic MediaWiki property. Do not include 'File:' or '[[', just the file name.",
"type": "wiki-file-name",
"type": "wiki-file-name",
"default": "tool-default.png",
"default": "tool-default.png",
Line 168: Line 172:
},
},
"synonyms": {
"synonyms": {
"label": "Synonyms for the tool´s name",
"label": "Synonyms for the tool's name",
"description": "Existing synonyms for the name of the tool. You might include translations here.",
"description": "Existing synonyms for the name of the tool. You might include translations here.",
"example": "DE:Schraubendreher",
"example": "DE: Schraubendreher",
"type": "string",
"type": "string",
"suggested": true
"suggested": true
Line 177: Line 181:
"label": "Which type of tool is it?",
"label": "Which type of tool is it?",
"description": "Which type of tool is this InfoBox referring to? ",
"description": "Which type of tool is this InfoBox referring to? ",
"example": "Hand Tool or Power Tool",
"example": "[[saw]]",
"suggested": true,
"type": "string"
"type": "string"
},
},
Line 189: Line 192:
"material": {
"material": {
"label": "Material the tool can be used with",
"label": "Material the tool can be used with",
"description": "Links to Materials the tool can be used with. Links should ideally be within our wiki.",
"description": "Links to materials the tool can be used with. Links should ideally be within our wiki.",
"example": "[[wood]]",
"example": "[[wood]]",
"type": "wiki-page-name",
"type": "wiki-page-name",
Line 197: Line 200:
"label": "Machines to use the tool with",
"label": "Machines to use the tool with",
"description": "Links to machines the tool can be used with. Links should ideally be within our wiki",
"description": "Links to machines the tool can be used with. Links should ideally be within our wiki",
"example": "[[wood lathe]]",
"example": "[[Wood Lathe|wood lathe]]",
"type": "wiki-page-name"
"type": "wiki-page-name"
},
},
Line 203: Line 206:
"label": "The location of the tool",
"label": "The location of the tool",
"description": "The location of the tool within the CoMakingSpace",
"description": "The location of the tool within the CoMakingSpace",
"example": "[[wood workshop]]",
"example": "[[Location::Wood Workshop|wood workshop]]",
"type": "wiki-page-name",
"type": "wiki-page-name",
"suggested": true
"suggested": true
Line 215: Line 218:
"tutors": {
"tutors": {
"label": "Tutors for the tool (if applicable)",
"label": "Tutors for the tool (if applicable)",
"description": "List of tutors which can give introductions to the tool",
"description": "List of tutors who can give introductions to the tool",
"example": "[[Tutor::User:Lukas|Lukas]]",
"example": "[[Tutor::User:Lukas|Lukas]]",
"type": "string"
"type": "string"
Line 239: Line 242:
"paramOrder": [
"paramOrder": [
"tool name",
"tool name",
"german",
"image",
"image",
"synonyms",
"synonyms",

Latest revision as of 11:34, 7 September 2022

ToolInfoBox

Example: Woodturning Tools

Cheap woodturning tools.JPG
Synonyms: DE: Drechseleisen, Drechselmesser
Material: wood
Used with: wood lathe
Location: wood workshop
(wall above wood lathe)
Access Requirements: woodturning introduction
Tutors: Lukas

Pretty much everything that does not qualify as a machine/power tool and is (usually) not a consumable material is called a "tool" in this wiki and should get its own page eventually. Dangerous or complicated tools first, of course!

Documentation

To use this template, simply copy this code into your page and enter the relevant parameters:

{{ToolInfoBox
|tool name=
|german=
|image=
|synonyms=
|type=
|status=
|material=
|used with=
|location=
|access=
|tutors=
|manual=
|donation=
|similar=
}}

Most fields will only be shown when they are actually used, i.e. you can easily create more or less detailed boxes (at least name and image). Make frequent use of the "Show preview" button and it should be clear.

For example, entering the following leads to the box on the right:

{{ToolInfoBox
|tool name=Example: Woodturning Tools
|german=
|image=cheap woodturning tools.JPG
|synonyms=DE: Drechseleisen, Drechselmesser
|type=
|status=
|material=[[wood]]
|used with=[[Wood Lathe|wood lathe]]
|location=[[Location::Wood Workshop|wood workshop]]<br>(wall above wood lathe)
|access=[[Woodturning Introduction|woodturning introduction]]
|tutors=[[Lukas]]
|manual=
|donation=
|similar=
}}

There are a few tool categories such as woodworking or saws that might be nice to link from "type" - please also categorize your page to make it easier to find!

Advanced Users (SMW)

There is a "hidden" parameter in this template that's not in the copy template: extrabox. To enable extrabox, just give it any value (e.g. "true", "blablabla") and it should cause the box to behave as an extra without "Has image::" and "Has German::".

You can use it when you don't want the InfoBox to set a "Has image::" and "Has German::" value (as it automatically does for "image" and "german"). That's useful on pretty much every page with multiple InfoBoxes so there is just one "main" image to represent the page in galleries.

Questions, feedback and further improvements are welcome!


ToolInfoBox

Unnamed Tool

Tool-default.png

Template Parameters

Pretty much everything that does not qualify as a machine/power tool and is (usually) not a consumable material is called a "tool" in this wiki and should get its own page eventually. Dangerous or complicated tools first, of course!

Template parameters

ParameterDescriptionTypeStatus
The name of your tooltool name

The name of your tool

Default
Unnamed Tool
Stringrequired
The (best) German name of your tool (invisible)german

The (best) German name of your tool (not visible, but usable for advanced pages like automatic galleries)

Stringsuggested
An image of the tool (example.jpg)image

The file name of the image which represents the tool the best. If you do not fill the parameter "extrabox", this will be added to the page as a Semantic MediaWiki property. Do not include 'File:' or '[[', just the file name.

Default
tool-default.png
Filesuggested
Synonyms for the tool's namesynonyms

Existing synonyms for the name of the tool. You might include translations here.

Example
DE: Schraubendreher
Stringsuggested
Which type of tool is it?type

Which type of tool is this InfoBox referring to?

Example
[[saw]]
Stringoptional
The status of the toolstatus

The status of the tool

Example
available / broken
Stringoptional
Material the tool can be used withmaterial

Links to materials the tool can be used with. Links should ideally be within our wiki.

Example
[[wood]]
Pagesuggested
Machines to use the tool withused with

Links to machines the tool can be used with. Links should ideally be within our wiki

Example
[[Wood Lathe|wood lathe]]
Pageoptional
The location of the toollocation

The location of the tool within the CoMakingSpace

Example
[[Location::Wood Workshop|wood workshop]]
Pagesuggested
Access requirements (if applicable)access

If applicable, use this to indicate the access requirements to use the tool

Example
ask nicely
Stringoptional
Tutors for the tool (if applicable)tutors

List of tutors who can give introductions to the tool

Example
[[Tutor::User:Lukas|Lukas]]
Stringoptional
Link to the manualmanual

Link to the manual of the tool. This should be a public source. If there is no link, indicate where the manual is located in the CoMakingSpace. Leave empty if not applicable

URLoptional
Donationdonation

Indicate a suggested donation for the use of this tool. This is used mainly for expensive tools which generate maintenance costs based on their usage.

Example
5ct
Stringoptional
Links to similar toolssimilar

Provide links to similar tools in our wiki.

Pageoptional
Extrabox? (advanced - if in doubt, ignore this)extrabox

Apply this parameter if you use the template as an additional InfoBox on a tool page with an existing "main" box. This will remove the "Has Image" parameter from this infobox so its image is NOT included as an SMW property of the page.

Booleanoptional