Template:MachineInfoBox: Difference between revisions

From CoMakingSpace Wiki

(switching from optional "mainbox" to optional "extrabox" so Boxes are SMW-enriched by default)
Line 2: Line 2:
|machine name= Example: 3D Printer
|machine name= Example: 3D Printer
|image=Prusa i3 MK2S.JPG
|image=Prusa i3 MK2S.JPG
|mainbox=yup
|extrabox=yes
|access=upon introduction
|access=upon introduction
|status=working
|status=working
Line 59: Line 59:


== Advanced Users (SMW) ==
== Advanced Users (SMW) ==
Change of plans, don't do anything yet! --[[User:Lukas|Lukas]] ([[User talk:Lukas|talk]]) 21:36, 28 June 2019 (CEST)
Still testing, don't do anything yet! --[[User:Lukas|Lukas]] ([[User talk:Lukas|talk]]) 09:22, 29 June 2019 (CEST)


<strike>There is a "hidden" parameter in this template that's not in the copy template: <code>extra-image</code>.
<strike>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::".


You can use it when you '''don't''' want the InfoBox to set a "Has image::" value (as <code>image</code> automatically does). 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::" 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.


To disable the default picture (gears) in such a case, the best solution {{£}} has found so far is entering <code><nowiki>{{!}}</nowiki></code> for a barely visible empty field. Questions, feedback and further improvements are welcome!</strike>
Questions, feedback and further improvements are welcome!</strike>


== Bugs/Future Development ==
== Bugs/Future Development ==
Line 76: Line 76:
<big>'''{{{machine name|Unnamed Machine}}}'''</big>
<big>'''{{{machine name|Unnamed Machine}}}'''</big>
|-
|-
!colspan="2"| [[{{#if: {{{mainbox|}}} |Has image:: | }}File:{{#if: {{{image|}}} |{{{image}}} |machine-default.png}}|frameless|300px]]
!colspan="2"| [[{{#if: {{{extrabox|}}} |File: | Has image::File:}}{{#if: {{{image|}}} |{{{image}}} |machine-default.png}}|frameless|300px]]
|-
|-
{{#if: {{{synonyms|}}} |
{{#if: {{{synonyms|}}} |

Revision as of 09:22, 29 June 2019


MachineInfoBox

Example: 3D Printer

Prusa i3 MK2S.JPG
Type: CNC (additive manufacturing)
Material: 1.75 mm filament
Location: 3D printer farm
Access Requirements: upon introduction
Status: working
Firmware: Marlin
Software: Cura
Tutors: Mitja, Lukas

We call pretty much all electric devices and big or small power tools "machines" in this wiki. Their pages should contain this InfoBox!

Documentation

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

{{MachineInfoBox
|machine name=
|image=
|synonyms=
|type=
|material=
|location=
|access=
|status=
|firmware=
|software=
|manual=
|tutors=
|used with=
|similar=
}}

Most fields will only be shown when used, so the box can be more or less detailed. 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:

{{MachineInfoBox
|machine name= Example: 3D Printer
|image=Prusa i3 MK2S.JPG
|access=upon introduction
|status=working
|type=[[CNC]] (additive manufacturing)
|location=[[3D Printer Farm|3D printer farm]]
|material=[[3D Printing Materials|1.75 mm filament]]
|used with=
|firmware=[[Marlin]]
|software=[[Cura]]
|tutors=[[User:Mitja|Mitja]], [[User:Lukas|Lukas]]
|manual=
|similar=
}}

Advanced Users (SMW)

Still testing, don't do anything yet! --Lukas (talk) 09:22, 29 June 2019 (CEST)

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::".

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.

Questions, feedback and further improvements are welcome!

Bugs/Future Development

  • "smart" behavior like color change according to status would be nice


MachineInfoBox

Unnamed Machine

Machine-default.png
Tutors: