2023年政策修订增补工作正在进行中,欢迎参与!
  • Moegirl.ICU:萌娘百科流亡社群 581077156(QQ),欢迎对萌娘百科运营感到失望的编辑者加入
  • Moegirl.ICU:账号认领正在试运行,有意者请参照账号认领流程

模板沙盒

萌娘百科,万物皆可萌的百科全书!转载请标注来源页面的网页链接,并声明引自萌娘百科。内容不可商用。
(重定向自User:Wentdd/沙盒
跳转到导航 跳转到搜索

目田,氏王
——扬帆远洋TEL

模版

投票模版

如何投票

(+)同意
如果您想表达对此提案的认可,您可以在您的观点前加入{{同意}}、{{带条件同意}}、{{支持}}

(-)反对
如果您想表达对此提案的反对,您可以在您的观点前加入{{反对}}

(=)中立
如果您对此提案持观望的态度,您可以在您的观点前加入{{中立}}

本用户页面(User:Wentdd/Sandbox/沙盒)正在投票中,请在下方投票,投票开始时间为xx年x月x日 (x) xx:xx (CST),本投票将持续7天,每位用户拥有一票,在投票时间内选择一方投票并留下签名(--~~~~),亦可以在结束前更改选票,将原选票用删除线删除,重新投票。计票时如有多投的不计其投票。详见xxxxx

票数统计模版(未完工)

通过/否决票数统计
(+)同意 (-)反对 (=)中立 总计
x票 y票 z票 x+y+z票
其中
(+)支持 (+)带条件同意
a票 b票

表格放不进info么。。。。图片还要再改改



此处模版可修改(记得留下签名或在讨论中发言~)(求大触修改参数部分语句!)

如何投票

(+)同意
如果您想表达对此提案的认可,您可以在您的观点前加入{{同意}}、{{带条件同意}}、{{支持}}

(-)反对
如果您想表达对此提案的反对,您可以在您的观点前加入{{反对}}

(=)中立
如果您对此提案持观望的态度,您可以在您的观点前加入{{中立}}

本用户页面(User:Wentdd/Sandbox/沙盒)正在投票中,请在下方投票,投票开始时间为xx年x月x日 (x) xx:xx (CST),本投票将持续7天,每位用户拥有一票,在投票时间内选择一方投票并留下签名(--~~~~),亦可以在结束前更改选票,将原选票用删除线删除,重新投票。计票时如有多投的不计其投票。详见xxxxx


  1. Template是模,不是模
  2. 时间引用已完成Special:永久链接/341833
  3. 这个好丑【不——From AnnAngela the sysop (Talk) 2015年3月4日 (三) 14:00 (CST)
模板已完成User:AnnAngela/SandBox——From AnnAngela the sysop (Talk) 2015年3月4日 (三) 19:37 (CST)

{{投票}}

资料

施工中

<includeonly>{{info | text = {{color|red|'''萌娘百科提示您,本{{NS}}({{FULLPAGENAME}})正在施工中。'''}}<br> *本{{NS}}的编辑将'''{{#ifeq:{{{直到|}}}||持续<u>{{{持续时间|{{{1|最多两小时}}}}}}|直到<u>{{{直到}}}}}{{#if:{{{m|{{{信息|{{{2|{{#if:{{{直到|}}}|{{{1|}}}|}}}}}}}}}}}|({{{m|{{{信息|{{{2|{{#if:{{{直到|}}}|{{{1|}}}|}}}}}}}}}}})|}}</u>'''。在此期间请{{color|red|不要}}编辑''这个'''''{{NS}}''',以免发生[[Help:编辑冲突|编辑冲突]]。 *本{{NS}}的'''最后'''编辑时间{{#if:{{{直到|}}}|为<b><u>{{#time:Md日H:i|{{LOCALTIMESTAMP}}}}(UCT+8)</u></b>|距现在为<b><u>{{TimeSinceLastEdit}}</u></b>({{purge|-{zh-hans:刷新; zh-hant:重新整理}-}})。}}如果这个时间已逾<b><u>{{{直到|{{{持续时间|{{{1|两小时}}}}}}}}}</u></b>,你可以<b>自行{{color|red|移除}}此模板</b>。 *如果你对此有什么疑问,可以与本{{NS}}的最后编辑者{{user|{{REVISIONUSER}}}}取得联系。 *你也可以在本页的<span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=history}} 历史]</span>中查看所有的编辑版本。如果你认为有必要,可以到相应版本编辑者的讨论页留言。 | leftimage= [[File:Commons-emblem-hand.svg|75px|link=]] |color = red}}{{#ifeq:{{NAMESPACE}}||[[Category:正在编辑的条目]]|}}</includeonly><noinclude>{{documentation}}<!-- 请将分类与跨语言链结增加在/doc子页面 / 請將分類與跨語言連結增加在/doc子頁面 --></noinclude>


#ifeq


'''{{#ifeq:
           {{{直到|}}}
                     ||
                       持续<u>{{{持续时间|{{{1|最多两小时}}}}}}
                                                           |直到<u>{{{直到}}}}}

                                                            
{{#if:{{{m|{{{信息|{{{2|{{#if:{{{直到|}}}|{{{1|}}}|}}}}}}}}}}}|
                                                             ({{{m|{{{信息|{{{2|{{#if:{{{直到|}}}|{{{1|}}}|}}}}}}}}}}})
                                                                                                                      |}}</u>'''

维基


#if

这个函数判断一个字符串是否为空。只包含空格的字符串被视为空字符串。

{{#if: 字符串 | value if test string is not empty | value if test string is empty (or only white space) }}

{{#if: 参数1 | 参数2 | 参数3 }}

这个函数首先判断参数1是否为空。如果参数1不为空,则输出参数2。如果参数1为空或只包含空白内容(空格、换行等),则输出参数3。

{{#if: | yes | no}} → no
{{#if: string | yes | no}} → yes
{{#if: | yes | no}} → no
{{#if:


| yes | no}} → no

字符串内容会被处理为纯文本,因此数学表达式不会被计算:

{{#if: 1==2 | yes | no }} → yes
{{#if: 0 | yes | no }} → yes

返回值可能并可能都被忽略:

{{#if: foo | yes }} → yes
{{#if: | yes }} →
{{#if: foo | | no}} →

The function may be nested. To do so, nest the inner #if function in its full form in place of the third parameter of the enclosing #if function. A depth of at least seven levels of nesting is possible, although that may depend on the wiki or a memory limit.

Example: {{#if: test string | value if test string is not empty | {{#if: test string | value if test string is not empty | value if test string is empty (or only white space) }} }}

See Help:Parser functions in templates for more examples of this parser function.


#ifeq

这个函数判断两个字符串是否相同。

{{#ifeq: string 1 | string 2 | value if identical | value if different }}

如果两个字符串均为数字,则函数会进行数值的比较:

{{#ifeq: 01 | 1 | equal | not equal}} → equal
{{#ifeq: 0 | -0 | equal | not equal}} → equal
{{#ifeq: 1e3 | 1000 | equal | not equal}} → equal
{{#ifeq: {{#expr:10^3}} | 1000 | equal | not equal}} → equal

否则函数会进行文本的比较(大小写敏感):

{{#ifeq: foo | bar | equal | not equal}} → not equal
{{#ifeq: foo | Foo | equal | not equal}} → not equal
{{#ifeq: "01" | "1" | equal | not equal}} → not equal (对比上面没有引号的例子)
{{#ifeq: 10^3 | 1000 | equal | not equal}} → not equal (对比上面带有#expr的例子)

As a practical example, given an existing template Template:Size used to set standard short and long sizes, defined as:

{{#ifeq: {{{1|}}} | short | 20 | 40}}

the following ensue:

{{size|short}} → 20
{{size|20}} → 40
{{size}} → 40


Warning:
Numerical comparisons with #ifeq and #switch are not equivalent to comparisons with #expr:
not equal → not equal
not equal → not equal

because PHP compares two numbers of type integer, whereas:

equal → equal

because MediaWiki converts literal numbers in expressions to type float, which, for large integers like these, involves rounding.

Warning:
Tags and parser functions inside parser tags (such as ) are temporarily replaced by a unique code. This affects comparisons:
{{#ifeq: <nowiki>foo | foo | equal | not equal}} → not equal
equal → not equal
equal → not equal
equal → equal

If the strings to be compared are given as equal calls to the same template containing such tags, then the condition is true, but in the case of two templates with identical content containing such tags it is false.

Warning:

Be careful when comparing against the current page title using the page name magic words. These magic words convert special characters into numeric HTML entities. This may result in misleading results. For example, if you are on a page titled "L'Aquila"...

not equal → not equal

To work around this, apply the magic word to both parameters:

not equal → equal