• Moegirl.ICU:萌娘百科流亡社群 581077156(QQ),欢迎对萌娘百科运营感到失望的编辑者加入
  • Moegirl.ICU:账号认领正在试运行,有意者请参照账号认领流程

模板沙盒

萌娘百科,萬物皆可萌的百科全書!轉載請標註來源頁面的網頁連結,並聲明引自萌娘百科。內容不可商用。
跳至導覽 跳至搜尋

目田,氏王
——揚帆遠洋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