Difference between revisions of "Template:Cryptography navbox/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>Plastikspork
(Templates were moved)
imported>Funandtrvl
(sync with template)
 
Line 1: Line 1:
<noinclude>{{template sandbox notice}}
+
{{Navbox
</noinclude><div class="NavFrame" style="clear: both; margin: 0.5em 0em 0em 0em; padding: 5px; background-color: #f9f9f9; font-size: 100%;">
 
{{ #if: {{{3|}}} | {{ Cryptography {{{3}}} }}
 
}}{{ #if: {{{2|}}} | {{ Cryptography {{{2}}} }}
 
}}{{ #if: {{{1|}}} | {{ Cryptography {{{1}}} }}
 
}}{{Navbox
 
|name      = Cryptography navbox/sandbox
 
|state    = uncollapsed
 
|title    = [[Cryptography]]
 
 
|listclass = hlist
 
|listclass = hlist
|bodystyle = border: none; padding: 0px; background-color: transparent;
+
 
|list1     =  
+
|list1 = {{#if:{{{1|}}}{{{2|}}}{{{3|}}}|{{Navbox|child
 +
|list1 = {{ #if: {{{1|}}} | {{ Cryptography {{{1}}}|child|state = plain }} }}
 +
|list2 = {{ #if: {{{2|}}} | {{ Cryptography {{{2}}}|child|state = plain }} }}
 +
|list3 = {{ #if: {{{3|}}} | {{ Cryptography {{{3}}}|child|state = plain }} }}
 +
|list4 = {{ #if: {{{4|}}} | {{ Cryptography {{{4}}}|child|state = plain }} }}
 +
|list5 = {{ #if: {{{5|}}} | {{ Cryptography {{{5}}}|child|state = plain }} }}
 +
|list6 = {{ #if: {{{6|}}} | {{ Cryptography {{{6}}}|child|state = plain }} }}
 +
}} }}
 +
 
 +
|list2 = {{Navbox|child
 +
|name = Cryptography navbox
 +
|state = <includeonly>collapsed</includeonly>
 +
 
 +
|title = [[Cryptography]]
 +
|below = {{icon|portal}} [[:Portal:Cryptography|Portal]]
 +
 
 +
|list1 =
 
* [[History of cryptography]]
 
* [[History of cryptography]]
 
* [[Cryptanalysis]]
 
* [[Cryptanalysis]]
* [[Portal:Cryptography|Cryptography portal]]
+
* [[Outline of cryptography]]
* [[Outline of cryptography|Topics in cryptography]]
 
  
|list2     =  
+
|list2 =
 
* [[Symmetric-key algorithm]]
 
* [[Symmetric-key algorithm]]
 
* [[Block cipher]]
 
* [[Block cipher]]
Line 24: Line 31:
 
* [[Message authentication code]]
 
* [[Message authentication code]]
 
* [[Cryptographically secure pseudorandom number generator|Random numbers]]
 
* [[Cryptographically secure pseudorandom number generator|Random numbers]]
 
+
* [[Steganography]]
}}
 
</div><noinclude>
 
 
 
{{documentation|content=
 
 
 
=== The crypto navigation testbox ===
 
 
 
This template is a test area for "crypto navigation boxes". It should NEVER be added to an article.
 
 
 
This template can be used to test the [[Template:Cryptography navbox|main crypto navigation box]]. It has the same naming as the other crypto navigation boxes (starts with "Template:Cryptography ") thus it works together with them.
 
 
 
To test code for the main crypto navigation box here, then use this code on some test page:
 
 
 
:<code><nowiki>{{cryptography testbox | stream | stream}}</nowiki></code>
 
 
 
To test this code together with the [[Template:Cryptography stream/sandbox|second crypto navigation testbox]] use this code on some test page:
 
 
 
:<code><nowiki>{{cryptography testbox | testbox2 | testbox2}}</nowiki></code>
 
 
 
For more details about these navigation boxes please see the instructions at the [[Template:Cryptography navbox|main crypto navigation box]] and at the [[Wikipedia:WikiProject Cryptography#Navigational_templates|WikiProject Cryptography]].
 
 
 
 
}}
 
}}
  
[[Category:Cryptography templates]]
+
}}<noinclude>
  
 +
{{documentation}}
 +
<!-- Add categories and interwikis to the /doc subpage, not here!  -->
 
</noinclude>
 
</noinclude>

Latest revision as of 21:03, 12 January 2016

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

The main crypto navigation box

This template is the main crypto navigation box. It can be added to the bottom of any cryptography article. This template also has some magic so it can include one or more of the specialised crypto navigation boxes inside the same frame.

To only use this template alone add this code to the bottom of an article:

{{cryptography navbox}}

If you want it to also show for instance the specialised navigation box about stream ciphers then give it the "stream" parameter, like this:

{{cryptography navbox | stream}}

You can also add several boxes in it, like this:

{{cryptography navbox | block | stream}}

Note that the parameters come sort of in backwards order. In the example above the stream cipher box will be on top, followed by the block cipher box and then with the main crypto "navbox" at the bottom.

Here is an invalid example since "navbox" should not be a parameter but instead is part of the address of this template:

{{cryptography stream | navbox}}

The available specialised boxes are:

block, stream, public-key, hash, machines, classical

For more details about these navigation boxes please see the WikiProject Cryptography.

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Cryptography navbox

Navigation box for cryptography articles

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Sub-box1

Choose the navigation sub-box to display.

Example
block / stream / public-key / hash / machines / classical
Stringsuggested
Second sub-box2

Choose another navigation sub-box to display (can have up to 6 sub-boxes).

Example
block / stream / public-key / hash / machines / classical
Stringoptional

Technical details

If / when you make a new specialised navigation box there are several things you need to know:

  • The specialised boxes need to use special naming if you want to be able to use them within the main crypto navigation box. Say you want to make a navigation box about "anonymity" then it should have the URL "Template:Crypto anonymity". Then it can automatically be used like this: {{cryptography navbox | anonymity}}
  • The specialised boxes need special code within them to function properly. So please copy the code from one of the existing boxes.
  • When you copy the code from one of the existing boxes don't forget to update the pagename in the second parameter in the Tnavbar-header to point to your new box. (To make the v-d-e links in the top right corner within the template point to the right page.)