Template:Protectedapi: Difference between revisions

m
no edit summary
m (This revision and previous are available under: CC BY-SA 3.0. See list of authors in previous history below.)
mNo edit summary
 
Line 1: Line 1:
''Should be added to the TOP of protected-always API pages. See also {{t|protectedcombatapi}} and {{t|protectedhwapi}}.''
Added to the top of any protected-always API page. See also {{t|protectedcombatapi}} and {{t|protectedhwapi}}.
 
Usage:
:{{t|protectedapi|version#|extra info or leave blank}}


;Usage
:<nowiki>{{protectedapi}} or {{protectedapi|version#|extra info or blank}} or {{protectedapi|t=type}}</nowiki>
* 1 - wow version number
* 2 or extra - extra info
* t - [member, method, type] - identifier type for page, like if page subject is an general topic, object, method, or regular member or type.
* toc - [0,1] - Force TOC enabled or disabled. Default depends on type.


[[Category:Interface customization templates|{{PAGENAME}}]]
[[Category:Interface customization templates|{{PAGENAME}}]]
----
----
;Template
;Template
<onlyinclude>{{Ambox
<onlyinclude><!--
 
-->{{#vardefine:tTYPE|{{#sub:{{PAGENAME}}|0|3}}}}<!--
-->{{#vardefine:tSTYPE|{{#sub:{{PAGENAME}}|4|4}}}}<!--
-->{{#vardefine:tNAME|{{#ifeq:{{#var:tTYPE}}|API|{{#sub:{{PAGENAME}}|{{#switch:{{#var:tSTYPE}}|TYPE=8|#default=4}}|0}}|{{PAGENAME}}}}}}<!--
-->{{#vardefine:tSTYPE|{{lc:{{{t|{{#var:tSTYPE}}}}}}}}}<!--
-->{{#switch:{{#var:tSTYPE}}|member|method={{#vardefine:tNAME|{{#replace:{{#var:tNAME}}|<nowiki> </nowiki>|{{#ifeq:{{#var:tSTYPE}}|member|.|:}}}}}}}}<!--
-->{{#vardefine:tFULLNAME|{{#switch:{{#var:tSTYPE}}|type=API types|#default=World of Warcraft API}}{{#if:|/{{{1|}}}}}}}<!--
-->{{#vardefine:tPARENTNAME|{{#switch:{{#var:tSTYPE}}|type=API types|#default=WoW API}}}}<!--
 
--><includeonly><!--
  -->{{#if:{{{nosort|}}}||{{DEFAULTSORT:{{#var:tNAME}}}}}}__NOWYSIWYG__{{#ifeq:{{{toc|}}}|1||__NOTOC__}}<!--
--></includeonly><!--
 
-->{{Ambox
| border= blue
| border= blue
| image = [[Image:Icon-addon-48x48.png]]
| image = [[Image:Icon-addon-48x48.png]]
Line 16: Line 33:
{{#if:{{{extra|{{{2|}}}}}}|
{{#if:{{{extra|{{{2|}}}}}}|
* {{{extra|{{{2|}}}}}}}}
* {{{extra|{{{2|}}}}}}}}
}}<includeonly>[[Category:World of Warcraft API/Protected Functions]]</includeonly></onlyinclude>
}}<!--
 
--><includeonly><!--
  -->{{#ifeq:{{FULLPAGENAME}}|Category:{{#var:tFULLNAME}}||[[Category:{{#var:tFULLNAME}}]]}}<!--
--></includeonly><!--
 
--><includeonly>[[Category:World of Warcraft API/Protected Functions]]</includeonly></onlyinclude>