Template:Eyecatch3/doc: Difference between revisions

From AniDB
Jump to navigation Jump to search
m (Using page for test code.)
Line 1: Line 1:
{{TOCright}}
{{TOCright}}


==1111==
==Example Category Weight Tables==
{{eyecatch3|test|n1}}
===CatWeightTable 1, 2 and 6 rows===
{{eyecatch3|test|n2}}
<nowiki>{{catWeightTable|1|blue|1|Level 1 does this and that.}}</nowiki> (LAYOUT ISSUE)
{{eyecatch3|test|n3}}
{{catWeightTable|1|blue|1|Level 1 does this and that.}}


{{eyecatch3|test|n4}}
<nowiki>{{catWeightTable|1|red|1|Level 1 does this and that.|2|Level 2 does this and that.}}</nowiki> (LAYOUT ISSUE)
{{eyecatch3|test|n5}}
{{catWeightTable|1|red|1|Level 1 does this and that.|2|Level 2 does this and that.}}
{{eyecatch3|test|n6}}


{{eyecatch3|test|n7}}
<nowiki>{{catWeightTable|1|green
{{eyecatch3|test|n8}}
|1|Level 1 does this and that.
|2|Level 2 does this and that.
|3|Level 3 does this and that.
|4|Level 4 does this and that.
|5|Level 5 does this and that.
|6|Level 6 does this and that.}}</nowiki>
{{catWeightTable|1|green
|1|Level 1 does this and that.
|2|Level 2 does this and that.
|3|Level 3 does this and that.
|4|Level 4 does this and that.
|5|Level 5 does this and that.
|6|Level 6 does this and that.}}


{{eyecatch3|test|n9}}


==2222==
===Real-world application===
{{eyecatch3|0|test|:0}}
{{CatWeightTable|1|amount
{{eyecatch3|1|test|:1}}
|1|There are some people in uniform in a few of the episodes. They're probably in the army or something. Oh, wait, maybe they're just police. Ah, no, it's cosplay.
{{eyecatch3|2|test|:2}}
|2|Several characters are often addressed by rank rather than name. They have medals. Someone might even salute one of them, if you're lucky.
{{eyecatch3|3|test|:3}}
|3|The anime concerns an organised armed force, and its members. Said body should have both the equipment and hierarchy found in military groups, and should ideally be actively utilising their power against an opponent. Characters are either employed as professional soldiers or enlisted on a volunteer basis, for ideological reasons.
 
|4|Main character joins an armed force, and gets the rank of private at least. They have to salute their superiors at least once per episode. If special, they might get some hardware to play with, but on the downside killing people may be involved.
{{eyecatch3|3|test|:3}}
|5|Main character at least a sergeant. They go on missions, and probably blow shit up. One or more characters is introduced, only to be summarily dispatched, to show that war costs lives. Three salutes per episode, minimum.
{{eyecatch3|3|test|:3}}
|6|Main character no less than a colonel. The salutes flow thick and fast, too many to count, and medals shine from every chest. Most of the dialogue is the discussion of battle tactics - in fact, there's so much war, you just don't know where to look. One of the characters was in Nam. They still have nightmares.}}
 
==Real-world Examples==
''Real-world test of the code, issue '''empty line''' before <tt>eycatch</tt>:''
 
===Test 0 - Old code, if "info" = 2, it would indent by 2===
'''<span style="color:red">No longer an issue!</span>'''<br>
{{eyecatch3|2|'''Special case<nowiki>{{eyecatch3|2|blah}}</nowiki>''' - Not all groups provide CRC checksums for their files. This means that this status has no meaning and will have the value "not checked against official CRC".}}
 
===Test 1 - Empty line before and after eyecatch3===
'''<span style="color:red">Spacing below and above box is OK, <s>space above box shows one "empty line" too much. VERY UGLY!</s> FIXED!</span>'''<br>
Indicates whether the file entry in AniDB represents a perfect copy of the original file or not. You may request a change of the CRC Status if its not checked yet.
 
{{eyecatch3|Note|'''<nowiki>{{eyecatch3|Note|blah}}</nowiki>''' - Not all groups provide CRC checksums for their files. This means that this status has no meaning and will have the value "not checked against official CRC".}}
 
Read more about [http://en.wikipedia.org/wiki/File_verification file verification] if you are unfamiliar with this subject.
 
===Test 2 - Empty line before and after eyecatch3, indent 1===
'''<span style="color:red">Spacing below box is OK, space above box shows one "empty line" too much. VERY UGLY!</span>'''<br>
Indicates whether the file entry in AniDB represents a perfect copy of the original file or not. You may request a change of the CRC Status if its not checked yet.
 
{{eyecatch3|1|Note|'''<nowiki>{{eyecatch3|1|Note|blah}}</nowiki>''' - Not all groups provide CRC checksums for their files. This means that this status has no meaning and will have the value "not checked against official CRC".}}
 
Read more about [http://en.wikipedia.org/wiki/File_verification file verification] if you are unfamiliar with this subject.
 
{{eyecatch3|4|Note|'''<nowiki>{{eyecatch3|4|Note|blah}}</nowiki>''' - Not all groups provide CRC checksums for their files. This means that this status has no meaning and will have the value "not checked against official CRC".}}
 
Text text and even more text to test the code. Text text and even more text to test the code. Text text and even more text to test the code.
 
===Test 3 - NO Empty line before and after eyecatch3===
'''<span style="color:red">Spacing above and below the box looks OK.</span>'''<br>
Indicates whether the file entry in AniDB represents a perfect copy of the original file or not. You may request a change of the CRC Status if its not checked yet.
{{eyecatch3|Note|'''<nowiki>{{eyecatch3|Note|blah}}</nowiki>''' - Not all groups provide CRC checksums for their files. This means that this status has no meaning and will have the value "not checked against official CRC".}}
Read more about [http://en.wikipedia.org/wiki/File_verification file verification] if you are unfamiliar with this subject.
 
===Test 4 - NO Empty line before and after eyecatch3, indent 1===
'''<span style="color:red">Spacing above and below the box looks OK.</span>'''<br>
Indicates whether the file entry in AniDB represents a perfect copy of the original file or not. You may request a change of the CRC Status if its not checked yet.
{{eyecatch3|1|Note|'''<nowiki>{{eyecatch3|1|Note|blah}}</nowiki>''' - Not all groups provide CRC checksums for their files. This means that this status has no meaning and will have the value "not checked against official CRC".}}
Read more about [http://en.wikipedia.org/wiki/File_verification file verification] if you are unfamiliar with this subject.
 
===Test 5 - Two eyecatch3 blocks, no empty lines===
'''<span style="color:red">Spacing above and below the boxes looks OK. IMO it would be better to have a slight space between the two eyecatch3 boxes for the normal un-indented eyecatch3 usage.</span>'''<br>
AniDB stores the name and short name of the group/person that produced and released a file. The short name is usually found as ''tags'' in file names, for example "[AonE]".
{{eyecatch3|Note|'''<nowiki>{{eyecatch3|Note|blah}}</nowiki>''' - If a file is a joint release, like a file by e.g. ANBU-AonE, that joint group has its own group entry. The file should not be registered under either ANBU or AonE, but to the group that combines them both.}}
{{eyecatch3|Note|'''<nowiki>{{eyecatch3|Note|blah}}</nowiki>''' - Not all RAW groups are credited. See [[which RAW groups to credit]].}}
Please note that not all groups registered in AniDB are listed with the tag they actually use, as AniDB can only have one distinctive tag for each group.
 
===Test 6 - Two eyecatch3 blocks, indent 1, no empty lines===
'''<span style="color:red">The slight space above, below and between the two eyecatch3 boxes looks fine, when NOT using extra empty lines in-text. But only for the indented eyecatch3!</span>'''<br>
AniDB stores the name and short name of the group/person that produced and released a file. The short name is usually found as ''tags'' in file names, for example "[AonE]".  
{{eyecatch3|1|Note|'''<nowiki>{{eyecatch3|1|Note|blah}}</nowiki>''' - If a file is a joint release, like a file by e.g. ANBU-AonE, that joint group has its own group entry. The file should not be registered under either ANBU or AonE, but to the group that combines them both.}}
{{eyecatch3|1|Note|'''<nowiki>{{eyecatch3|1|Note|blah}}</nowiki>''' - Not all RAW groups are credited. See [[which RAW groups to credit]].}}
Please note that not all groups registered in AniDB are listed with the tag they actually use, as AniDB can only have one distinctive tag for each group.
 
==Results==
* <nowiki>{{eyecatch3|0|Note|blah}}</nowiki> works exactly the same as <nowiki>{{eyecatch3|Note|blah}}</nowiki>
* Empty or wrong entries (e.g. xyz) in # field, yields default eyecatch3 without an indent.<br>e.g. <nowiki>{{eyecatch3||Note|blah}}</nowiki> or <nowiki>{{eyecatch3|xyz|Note|blah}}</nowiki><br>-> seems to be fool proof.
 
 
==Solution==
Basically the code works better than the original old version, i.e. the spacing above and below the the eyecatch3 boxes *now* looks really nice.
 
'''So, *never* add an empty line above the eyecatch3 box!'''
 
A empty line below the eyecatch3 box is ignored!
 
 
 
----
----
----
 
{{TOCright}}
 
==Documentation for this template==
This template creates an ''eye-catcher bar'' that can be indented up to '''6 times''' via parameter value, letting the user better customize his "Note"s. The code is backwards compatible, letting the user keep on using the old 2 parameter version as well.
{{eyecatch3|1|New|Subtle one-pixel border added, padding improved, <info> is not word-wrapped.}}
 
==Alternative names==
* <tt><nowiki>{{eyecatch3|info|text}}</nowiki></tt>
* <tt><nowiki>{{Eyecatch3|info|text}}</nowiki></tt>  - alternate spelling of template
* <tt><nowiki>{{eyecatch3|#|info|text}}</nowiki></tt> 
* <tt><nowiki>{{Eyecatch3|#|info|text}}</nowiki></tt> - alternate spelling of template
 
==Syntax==
The template can have '''2''' or '''3 parameters''':
#'''<tt><nowiki>{{eyecatch3|<info>|<text>}}</nowiki></tt>''' - Default mode, no indentation.
#'''<tt><nowiki>{{eyecatch3|<#>|<info>|<text>}}</nowiki></tt>''' - Define indentation via # parameter.
        '''<#>''' =  Number '''0''' (min) to '''6''' (max), defines indentation level.
    '''<info>''' =  The info to highlight (not word-wrapped), i.e. ''Note'' or ''Important''.
    '''<text>''' =  The descriptive text for the info.
{{eyecatch3|1|Note|Only the '''<#>''' values '''1''' to '''6''' are actually checked, any '''other values''' (e.g. 0 or abc) yield '''no indentation''' at all, and are treated the same as <tt><nowiki>{{eyecatch3|info|text}}</nowiki></tt>!}}
{{eyecatch3|1|Note|The '''<info>''' parameter is intended for short message headers. To improve readability the '''word-wrapping''' is turned '''off'''!}}
 
==Examples==
<nowiki>{{eyecatch3|0|Note|'''No''' indentation, just like the normal <tt>eyecatch</tt>.}}</nowiki>
<nowiki>{{eyecatch3|abc|Note|'''No''' indentation, just like the normal <tt>eyecatch</tt>.}}</nowiki>
<nowiki>{{eyecatch3||Note|'''No''' indentation, just like the normal <tt>eyecatch</tt>.}}</nowiki>
{{eyecatch3|0|Note|'''No''' indentation, just like the normal <tt>eyecatch</tt>.}}
 
<nowiki>{{eyecatch3|1|Another note|'''One''' indentation, just like <tt>eyecatch2</tt>.}}</nowiki>
{{eyecatch3|1|Another note|'''One''' indentation, just like <tt>eyecatch2</tt>.}}
 
<nowiki>{{eyecatch3|2|Important|Level '''two''' indentation!}}</nowiki>
{{eyecatch3|2|Important|Level '''two''' indentation!}}
 
<nowiki>{{eyecatch3|6|Very important|Maximum indentation level of '''six'''! "Very important" is ...}}</nowiki>
{{eyecatch3|6|Very important|Maximum indentation level of '''six'''! "Very important" is '''not''' word-wrapped.}}

Revision as of 23:09, 3 May 2009

Example Category Weight Tables

CatWeightTable 1, 2 and 6 rows

{{catWeightTable|1|blue|1|Level 1 does this and that.}} (LAYOUT ISSUE)
Category Weight +   Level 1 does this and that.
{{catWeightTable|1|red|1|Level 1 does this and that.|2|Level 2 does this and that.}} (LAYOUT ISSUE)
Category Weight +   Level 1 does this and that.
  *   Level 2 does this and that.
{{catWeightTable|1|green
 |1|Level 1 does this and that.
 |2|Level 2 does this and that.
 |3|Level 3 does this and that.
 |4|Level 4 does this and that.
 |5|Level 5 does this and that.
 |6|Level 6 does this and that.}}
Category Weight +   Level 1 does this and that.

  *   Level 2 does this and that.

  *+  Level 3 does this and that.

  **  Level 4 does this and that.

  **+ Level 5 does this and that.

  *** Level 6 does this and that.


Real-world application

Category Weight +   There are some people in uniform in a few of the episodes. They're probably in the army or something. Oh, wait, maybe they're just police. Ah, no, it's cosplay.

  *   Several characters are often addressed by rank rather than name. They have medals. Someone might even salute one of them, if you're lucky.

  *+  The anime concerns an organised armed force, and its members. Said body should have both the equipment and hierarchy found in military groups, and should ideally be actively utilising their power against an opponent. Characters are either employed as professional soldiers or enlisted on a volunteer basis, for ideological reasons.

  **  Main character joins an armed force, and gets the rank of private at least. They have to salute their superiors at least once per episode. If special, they might get some hardware to play with, but on the downside killing people may be involved.

  **+ Main character at least a sergeant. They go on missions, and probably blow shit up. One or more characters is introduced, only to be summarily dispatched, to show that war costs lives. Three salutes per episode, minimum.

  *** Main character no less than a colonel. The salutes flow thick and fast, too many to count, and medals shine from every chest. Most of the dialogue is the discussion of battle tactics - in fact, there's so much war, you just don't know where to look. One of the characters was in Nam. They still have nightmares.