Changes
Jump to navigation
Jump to search
Template:API-head/zh (view source)
Revision as of 09:03, 28 September 2019
, 09:03, 28 September 2019Updating to match new version of source page
<noinclude>
<languages/>
</noinclude>{{#switch:
| =
<table {{Databox-layout|style=margin:{{dir|{{pagelang}}|5px 12px 5px 0|5px 0 5px 12px}};}}><tr>
<th {{Databox-head}}>{{{module|{{BASEPAGENAME}}}}}</th>
</tr><tr>
<td colspan="2" style="text-align:center; padding:0.3em; font-style:italic">{{{description|}}}{{#switch: {{{generator|}}} |#default=<br /><small>此模块不能用作{{ll|API:generator|nsp=0}}。</small>|yes=<br /><small>此模块可以用作{{ll|API:generator|nsp=0}}。</small>}}</td>
</tr><tr>
<th>前缀</th>
<td>{{#switch: {{lc:{{{prefix|none}}}}} |none=''无'' |#default={{{prefix}}} }}</td>
</tr><tr>
<th>需要的权限</th>
<td>{{#switch: {{lc:{{{rrights|none}}}}} |none=''无'' |#default={{{rrights}}} }}</td>
</tr><tr>
<th>仅限Post?</th>
<td>{{#switch: {{lc:{{{postonly|no}}}}} |no=否 |#default=是 }}</td>
</tr><tr>
<th>产生帮助</th>
<td>[//{{{site|www.mediawiki.org}}}/w/api.php?action=help&modules={{#ifeq: {{lc:{{{query|{{{generator|}}}}}}}} | yes |query+}}{{lc:{{{module|{{IfNotTranslation|{{PAGENAMEE}}|{{BASEPAGENAMEE}}}}}}}}} 当前]</td>
{{#if:{{{version|}}}|
</tr><tr>
<th>添加的版本</th>
<td>{{MW version|version={{{version|?}}}|compact=yes|comment=and after}}</td>
}}
</tr></table><includeonly>
{{#ifeq:{{{templatemode|}}}|nocat|
|{{#ifeq:{{{generator|}}}|yes
|[[Category:MediaWiki API generators{{#translation:}}]]}}
}}</includeonly>
| #default=
{{#invoke:Template translation|renderTranslatedTemplate|template=Template:API-head|noshift=1}}
}}<noinclude>
{{Documentation|content=
== 用法 ==
{{clear}}
Displays a box providing more information about an API module.
See also {{tl|ApiEx}} which transcludes the generated API documentation
== 例子 ==
{{API-head|templatemode=nocat
|version=1.11
|prefix=sr
|rrights=None
|postonly=No
|description=Perform a full text search
|generator=yes
}}
<pre>
{{API-head
|version=1.11
|prefix=sr
|rrights=None
|postonly=No
|description=Perform a full text search
|generator=yes
}}
</pre>
{{clear}}
{{API-head|templatemode=nocat
|module=edit
|version=1.13
|prefix=
|rrights=edit
|postonly=Yes
|description=
|query=no
}}
<pre>
{{API-head
|module=edit
|version=1.13
|prefix=
|rrights=edit
|postonly=Yes
|description=
|query=no
}}
</pre>
{{clear}}
}}
[[Category:API templates{{#translation:}}]]
</noinclude>
<languages/>
</noinclude>{{#switch:
| =
<table {{Databox-layout|style=margin:{{dir|{{pagelang}}|5px 12px 5px 0|5px 0 5px 12px}};}}><tr>
<th {{Databox-head}}>{{{module|{{BASEPAGENAME}}}}}</th>
</tr><tr>
<td colspan="2" style="text-align:center; padding:0.3em; font-style:italic">{{{description|}}}{{#switch: {{{generator|}}} |#default=<br /><small>此模块不能用作{{ll|API:generator|nsp=0}}。</small>|yes=<br /><small>此模块可以用作{{ll|API:generator|nsp=0}}。</small>}}</td>
</tr><tr>
<th>前缀</th>
<td>{{#switch: {{lc:{{{prefix|none}}}}} |none=''无'' |#default={{{prefix}}} }}</td>
</tr><tr>
<th>需要的权限</th>
<td>{{#switch: {{lc:{{{rrights|none}}}}} |none=''无'' |#default={{{rrights}}} }}</td>
</tr><tr>
<th>仅限Post?</th>
<td>{{#switch: {{lc:{{{postonly|no}}}}} |no=否 |#default=是 }}</td>
</tr><tr>
<th>产生帮助</th>
<td>[//{{{site|www.mediawiki.org}}}/w/api.php?action=help&modules={{#ifeq: {{lc:{{{query|{{{generator|}}}}}}}} | yes |query+}}{{lc:{{{module|{{IfNotTranslation|{{PAGENAMEE}}|{{BASEPAGENAMEE}}}}}}}}} 当前]</td>
{{#if:{{{version|}}}|
</tr><tr>
<th>添加的版本</th>
<td>{{MW version|version={{{version|?}}}|compact=yes|comment=and after}}</td>
}}
</tr></table><includeonly>
{{#ifeq:{{{templatemode|}}}|nocat|
|{{#ifeq:{{{generator|}}}|yes
|[[Category:MediaWiki API generators{{#translation:}}]]}}
}}</includeonly>
| #default=
{{#invoke:Template translation|renderTranslatedTemplate|template=Template:API-head|noshift=1}}
}}<noinclude>
{{Documentation|content=
== 用法 ==
{{clear}}
Displays a box providing more information about an API module.
See also {{tl|ApiEx}} which transcludes the generated API documentation
== 例子 ==
{{API-head|templatemode=nocat
|version=1.11
|prefix=sr
|rrights=None
|postonly=No
|description=Perform a full text search
|generator=yes
}}
<pre>
{{API-head
|version=1.11
|prefix=sr
|rrights=None
|postonly=No
|description=Perform a full text search
|generator=yes
}}
</pre>
{{clear}}
{{API-head|templatemode=nocat
|module=edit
|version=1.13
|prefix=
|rrights=edit
|postonly=Yes
|description=
|query=no
}}
<pre>
{{API-head
|module=edit
|version=1.13
|prefix=
|rrights=edit
|postonly=Yes
|description=
|query=no
}}
</pre>
{{clear}}
}}
[[Category:API templates{{#translation:}}]]
</noinclude>