|
|
Line 1: |
Line 1: |
− | 正體中文(Tradition Chinese),僅供參考(for reference only),歡迎您一起參與修訂(Welcome to edit it)。
| + | ==Calendar Demo== |
− | {{#form: name= demo | action=/wiki/index.php|
| + | Now we are going to include ''Current events'' which will give us the actual calendar right here. ''Current events'' understands the following parameters: |
− | {{#input: name= title | type= hidden | value = Special:Call/User:Roc_michael}}
| + | * year - defaults to the current year |
− | <table cellpadding=2 cellspacing=0 margins=0 width=100% border rules=cols>
| + | * month - defaults to the current month |
− | <tr valign=top><td width=30% colspan="3">
| + | * purpose - empty or a string which will be used as a category filter. Only events belonging to that category will be shown. |
− | '''選取頁面:''' | + | * namespace - empty or a namespace string. Only event defined in articles in that namespace will be shown; new events wilöl be created in an article which belongs to that namespace |
− | <table cellpadding=0 cellspacing=0 margins=0>
| + | * eventList = {no|current|all}, defaults to 'current'; produces a tabular report of the selected events |
− | <tr>
| + | * width = empty or a width specification for the table, e.g. '500px' or '100%'; default is to make the calendar as small as possible |
− | <td align="right">名字空間(namespace)</td>
| + | * noadd = empty or '1'; when set to '1' the calendar will not offer a link to create an event page |
− | <td> {{#input: name=namespace | type=select | value = {{{namespace|}}} |<!-- *? {{#dpl: namespace=* | format=,\n*%TITLE%,, }}-->
| |
− | *all
| |
− | *main
| |
− | *Talk
| |
− | *Template
| |
− | *Category
| |
− | *Image
| |
− | *User
| |
− | *DPL
| |
− | *Wgraph
| |
− | }}
| |
− | </td>
| |
− | <td align="right">但非(not)</td>
| |
− | <td> {{#input: name=notnamespace | type=select | value = {{{notnamespace|}}} |
| |
− | *- | |
− | *main | |
− | *Talk
| |
− | *Template
| |
− | *Category
| |
− | *Image
| |
− | *User
| |
− | *DPL
| |
− | *Wgraph
| |
− | }}
| |
− | </td>
| |
− | </tr>
| |
− | <!-------------------->
| |
− | <tr>
| |
− | <td align="right">分類(category)</td>
| |
− | <td> {{#input: name=category | value = {{{category|}}} | type=select | *? {{#dpl: namespace=Category | format=,\n*%TITLE%,,}}}}
| |
− | </td>
| |
− | <td align="right">但非(not)</td>
| |
− | <td> {{#input: name=notcategory | value = {{{notcategory|}}} | type= select | *? {{#dpl: namespace=Category | format = ,\n*%TITLE%,,}}}}
| |
− | </td>
| |
− | </tr>
| |
− | <!-------------------->
| |
− | <tr>
| |
− | <td align="right">內嵌樣板(Template)</td>
| |
− | <td> {{#input: name=uses | value = {{{uses|}}} | type=select | *? {{#dpl: namespace=Template | format=,\n*%TITLE%,,}}}}
| |
− | </td>
| |
− | <td align="right">但非(not)</td>
| |
− | <td> {{#input: name=notuses | value = {{{notuses|}}} | type=select | *? {{#dpl: namespace=Template | format=,\n*%TITLE%,,}}}}
| |
− | </td>
| |
− | </tr>
| |
− | <!-------------------->
| |
− | <tr>
| |
− | <td align="right">頁面名稱(title; 使用時須加百分號「%」)</td>
| |
− | <td> {{#input: name=titlematch | value = {{{titlematch|}}}}}
| |
− | </td>
| |
− | <td align="right">非此頁面名稱(%)</td>
| |
− | <td> {{#input: name=nottitlematch | value = {{{nottitlematch|}}}}}
| |
− | </td>
| |
− | </tr>
| |
− | <!-------------------->
| |
− | <tr>
| |
− | <td align="right">內含章節(include ex:#Ch A,#Ch B) </td>
| |
− | <td> {{#input: name=include | value = {{{include|}}}}}
| |
− | </td>
| |
− | <td align="right">欄位標題(table; ex:,,Ch A,Ch B)</td>
| |
− | <td> {{#input: name=table | value = {{{table|}}}}}
| |
− | </td>
| |
− | </tr>
| |
− | <!-------------------->
| |
− | <tr>
| |
− | <td align="right">連結至某頁(links to) </td>
| |
− | <td> {{#input: name=linksto | value = {{{linksto|}}} }}
| |
− | </td>
| |
− | <td align="right">(無連結至某頁)not to </td>
| |
− | <td> {{#input: name=notlinksto | value = {{{notlinksto|}}} }}
| |
− | </td>
| |
− | </tr>
| |
− | <!-------------------->
| |
− | <tr>
| |
− | <td align="right"> 頁面創建者(created by) </td>
| |
− | <td> {{#input: name= createdby | value = {{{createdby|}}} |type= select
| |
− | | *? {{#dpl: namespace=User | |titleregexp=^[^/]+$ | format=,\n*%TITLE%,, }} }}
| |
− | </td>
| |
− | <td align="right"> 頁面修改者(modified by) </td>
| |
− | <td> {{#input: name= modifiedby | value = {{{modifiedby|}}} |type= select
| |
− | | *? {{#dpl: namespace=User | titleregexp=^[^/]+$ | format=,\n*%TITLE%,, }} }}
| |
− | </td>
| |
− | </tr>
| |
− | <!-------------------->
| |
− | <tr>
| |
− | <td align="right"> 截至某日前最後的版本 last rev. before </td>
| |
− | <td> {{#input: name=lastrevisionbefore | value = {{#if:{{{lastrevisionbefore|}}}|{{{lastrevisionbefore|}}}|YYYY-MM-DD}}}}</td>
| |
− | <td align="right"> 某日後最早的版本 first rev. since </td>
| |
− | <td> {{#input: name=firstrevisionsince | value = {{#if:{{{firstrevisionsince|}}}|{{{firstrevisionsince|}}}|YYYY-MM-DD}}}}</td>
| |
− | </tr>
| |
− | <!-------------------->
| |
− | <tr>
| |
− | <td align="right"> 某日前的所有版本''all revs.'' before</td>
| |
− | <td> {{#input: name=allrevisionsbefore | value = {{#if:{{{allrevisionsbefore|}}}|{{{allrevisionsbefore|}}}|YYYY-MM-DD}}}}</td>
| |
− | <td align="right"> 某日後所有的版本''all revs.'' since</td>
| |
− | <td> {{#input: name=allrevisionssince | value = {{#if:{{{allrevisionssince|}}}|{{{allrevisionssince|}}}|YYYY-MM-DD}}}}</td>
| |
− | </tr></table>
| |
| | | |
− | | + | ==Calendar test== |
− | </tr>
| + | {{#vardefine:year|{{#if:{{{year|}}}|{{#replace:{{{year}}}|/YYYY/|{{#time:Y}}}}|{{#time:Y}}}}}}<!-- |
− | <tr>
| + | -->{{#vardefine:month|{{#if:{{{month|}}}|{{#replace:{{{month}}}|/MM/|{{#time:m}}}}|{{#time:m}}}}}}<!-- |
− | <td valign=top>
| + | -->{{Calendar month|year={{#var:year}}|month={{#var:month}}|basepage=Current events|width={{{width|}}}|eventList={{{eventList|current}}}|purpose={{{purpose|}}}|namespace={{{namespace|}}}|noadd={{{noadd|}}}}} |
− | '''頁面資訊 Information Display<br>(某些須搭配排序依據使用 <br>Some item must use with some Order Method):'''
| |
− | | |
− | {{#input: name=shownamespace | type=checkbox | value = {{{shownamespace|}}}}}名字空間(namespace)<br>
| |
− | {{#input: name=addcategories | type=checkbox | value = {{{addcategories|}}}}}分類(categories)<br>
| |
− | {{#input: name=includesubpages | type=checkbox | value = {{{includesubpages|}}}}}子頁面(subpages)<br> | |
− | {{#input: name=addpagecounter | type=checkbox | value = {{{addpagecounter|}}}}}瀏覽人氣(visits)<br> | |
− | {{#input: name=addpagesize | type=checkbox | value = {{{addpagesize|}}}}}頁面字數(size)<br>
| |
− | {{#input: name=adduser | type=checkbox | value = {{{adduser|}}}}}該版本的編輯者(user) <br>
| |
− | {{#input: name=addeditdate | type=checkbox | value = {{{addeditdate|}}}}}}}該版本的編輯日期(editdate)<br>
| |
− | {{#input: name=addpagetoucheddate | type=checkbox | value = {{{addpagetoucheddate|}}}}}造訪日(touch date)
| |
− | | |
− | <td valign=top>'''排序方法(order method):'''<br>
| |
− | | |
− | | |
− | 排序依據(sort key)
| |
− | {{#input: name=ordermethod |type=select | value = {{{ordermethod|}}} |
| |
− | *-
| |
− | *category,firstedit
| |
− | *category,lastedit
| |
− | *category,pagetouched
| |
− | *category,sortkey
| |
− | *categoryadd
| |
− | *counter
| |
− | *firstedit
| |
− | *lastedit
| |
− | *pagetouched
| |
− | *size
| |
− | *title
| |
− | *titlewithoutnamespace
| |
− | *user,firstedit
| |
− | *user,lastedit
| |
− | }}
| |
− | 升(降)冪(order):{{#input: name=order | type=select | value = {{{order|}}} |
| |
− | *ascending
| |
− | *descending
| |
− | }}
| |
− | {{#input: name=escapelinks | type=checkbox | value = {{{escapelinks|}}}}} 以連結取代顯示圖像(image)或分類(category)頁面 (escapelinks): | |
− | | |
− | {{#input: name=export | type=checkbox | value = {{{export|}}}}}輸出export
| |
− | | |
− | <!----------------->
| |
− | <div style="margin:0;background-color:#ddeeff;margin-top:0px;padding:0.3em 0.3em 0.3em 0.3em; border:1px solid #999999;font-size:100%;font-weight:bold;">排序依據說明(order method description):</div>
| |
− | <div style="height:60px; overflow:auto; margin:0; margin-top:0px; padding:0.3em .3em 0.5em 0.3em; border:1px solid #999999; background-color:#ffffdd;">
| |
− | *分類,初次修訂(category,firstedit)
| |
− | *分類,最後修訂(category,lastedit)
| |
− | *分類,瀏覽人氣(category,pagetouched)
| |
− | *分類,排序值(category,sortkey)
| |
− | *最近才加入的分類(categoryadd)
| |
− | *瀏覽人氣(counter)
| |
− | *初次修訂(firstedit)
| |
− | *最後修訂(lastedit)
| |
− | *頁面被瀏覽的時間(pagetouched)
| |
− | *頁面字數(size)
| |
− | *頁面名稱(title)
| |
− | *頁面名稱不含名字空間(titlewithoutnamespace)
| |
− | *作者,首次版本user,firstedit
| |
− | *作者,最終版本user,lastedit
| |
− | </div>
| |
− | <!--------------------->
| |
− | </td>
| |
− | | |
− | <td valign=top width=30% valign=top>'''版面安排 (Layout):'''
| |
− | | |
− | | |
− | 欄位數量(columns){{#input: name=columns | type=select | value = {{{columns|}}} |
| |
− | *1
| |
− | *2
| |
− | *3
| |
− | *4
| |
− | *5
| |
− | }}
| |
− | 輸出紀錄筆數上限(maxrecords) {{#input: name=count | value = {{{count|}}} | size=2
| |
− | }}<br>
| |
− | 隨機選取頁數(randomcount): {{#input: name=randomcount | type= select | value = {{{randomcount|}}} |
| |
− | *-
| |
− | *1
| |
− | *3
| |
− | *5
| |
− | *10
| |
− | }} | |
− | </td></tr></table>
| |
− | | |
− | <center>{{#input: type=submit | value = 執行 List members }}
| |
− | <small>[[:Template:Catlist_zh|重填]] <!--, [[:Template:Catgraph|graph]]--></small></center>
| |
− | }}
| |
− | | |
− | ==其他說明 (Other Description)==
| |
− | <div style="height:100px; overflow:auto; margin:0; margin-top:0px; padding:0.3em .3em 0.5em 0.3em; border:1px solid #999999; background-color:#ffffdd;">
| |
− | {| class= wikitable width=100%
| |
− | |---
| |
− | |+字元代換(當使用樣板語法時)"character escaping":
| |
− | ! width=50% |中文
| |
− | !English
| |
− | |----
| |
− | | » 代換為 >
| |
− | | » is translated to >
| |
− | |----
| |
− | | « 代換為 <
| |
− | | « is translated to <
| |
− | |----
| |
− | | ²{ 代換為 <nowiki>{{</nowiki>
| |
− | | ²{is translated to <nowiki>{{</nowiki>
| |
− | |----
| |
− | | }² 代換為 <nowiki>}}</nowiki>
| |
− | | }² is translated to <nowiki>}}</nowiki>
| |
− | |----
| |
− | | ¦ 代換為 <nowiki>|</nowiki>
| |
− | | ¦ is translated to <nowiki>|</nowiki>
| |
− | |----
| |
− | | ¶ 表換行
| |
− | | ¶ is translated to a newline
| |
− | |----
| |
− | | \n 表換行
| |
− | | \n is translated to a newline
| |
− | |}
| |
− | </div>
| |
− | <!------------------------------------------------------------------------------------------------------------->
| |
− | <includeonly>
| |
− | {{#if:{{{name|}}}| | |
− | ==== {{{name}}} ====
| |
− | |}}
| |
− | {{#dpl: resultsheader=<small>%PAGES% results<br><hr></small>\n
| |
− | |noresultsheader=<small>No results<br><hr></small>\n
| |
− | |oneresultheader=<small>1 result<br><hr></small>\n
| |
− | | |
− | {{#dpl: resultsheader=<small>有%PAGES%筆紀錄相符(%PAGES% results)<br><hr></small>\n
| |
− | |noresultsheader=<small>查無相符之紀錄(No results.)<br><hr></small>\n
| |
− | |oneresultheader=<small>找到1筆相符的紀錄(1 result)<br><hr></small>\n
| |
− | | |
− | |{{#ifeq:{{{namespace|}}}|all||{{#if:{{{namespace|}}}|{{#ifeq:{{{namespace|}}}|main|namespace=|namespace={{{namespace|}}}}}}}}}
| |
− | |{{#ifeq:{{{notnamespace|}}}|-||{{#if:{{{notnamespace|}}}|{{#ifeq:{{{notnamespace|}}}|main|notnamespace=|notnamespace={{{notnamespace|}}}}}}}}}
| |
− | |{{#ifeq:{{{category|}}}|?||{{#if:{{{category|}}}|category={{{category|}}}}}}}
| |
− | |{{#ifeq:{{{notcategory|}}}|?||{{#if:{{{notcategory|}}}|notcategory={{{notcategory|}}}}}}}
| |
− | |{{#ifeq:{{{uses|}}}|?||{{#if:{{{uses|}}}|uses=Template:{{{uses|}}}}}}}
| |
− | |{{#ifeq:{{{notuses|}}}|?||{{#if:{{{notuses|}}}|notuses=Template:{{{notuses|}}}}}}}
| |
− | |{{#ifeq:{{{createdby|}}}|?||{{#if:{{{createdby|}}}|createdby={{{createdby|}}}}}}}
| |
− | |{{#ifeq:{{{modifiedby|}}}|?||{{#if:{{{modifiedby|}}}|modifiedby={{{modifiedby|}}}}}}}
| |
− | |titlematch={{{titlematch|}}}
| |
− | |nottitlematch={{{nottitlematch|}}}
| |
− | |linksto={{{linksto|}}}
| |
− | |notlinksto={{{notlinksto|}}}
| |
− | |{{#if:{{{columns|}}}|columns={{{columns|}}}|columns=3}}
| |
− | |{{#ifeq:{{{export|}}}|yes|columns=1}}
| |
− | |order={{{order|}}}
| |
− | |{{#ifeq:{{{ordermethod|}}}|-||ordermethod={{{ordermethod|}}}}}
| |
− | |escapelinks={{{escapelinks|}}}
| |
− | |{{#ifeq:{{{randomcount|}}}|-||randomcount={{{randomcount|}}}}}
| |
− | |{{#ifeq:{{{count|}}}|-||{{#if:{{{count|}}}|count={{{count|}}}}}}}
| |
− | |shownamespace={{{shownamespace|}}}
| |
− | |addcategories={{{addcategories|}}}
| |
− | |addpagecounter={{{addpagecounter|}}}
| |
− | |addpagesize={{{addpagesize|}}}
| |
− | |addeditdate={{{addeditdate|}}}
| |
− | |addpagetoucheddate={{{addpagetoucheddate|}}}
| |
− | |adduser={{{adduser|}}}
| |
− | |{{#ifeq:{{{lastrevisionbefore|}}}|YYYY-MM-DD||lastrevisionbefore={{{lastrevisionbefore|}}}}}
| |
− | |{{#ifeq:{{{firstrevisionsince|}}}|YYYY-MM-DD||firstrevisionsince={{{firstrevisionsince|}}}}}
| |
− | |{{#ifeq:{{{allrevisionsbefore|}}}|YYYY-MM-DD||allrevisionsbefore={{{allrevisionsbefore|}}}}}
| |
− | |{{#ifeq:{{{allrevisionssince|}}}|YYYY-MM-DD||allrevisionssince={{{allrevisionssince|}}}}}
| |
− | |{{#ifeq:{{{export|}}}|yes|include={export.dpl}}}
| |
− | |{{#ifeq:{{{export|}}}|yes|format=[http://gs-nb/dpldemo/index.php/Special:Export?pages=,,%0D%0A, click to start export of '''all selected pages''']}}
| |
− | }}
| |
− | ----
| |
− | <small><u>The query used the following parameters</u><br/>
| |
− | {{#ifeq:{{{namespace|}}}|all||{{#if:{{{namespace|}}}|{{#ifeq:{{{namespace|}}}|main|namespace=<br>|namespace={{{namespace|}}}<br>}}}}}}<!--
| |
− | -->{{#ifeq:{{{notnamespace|}}}|-||{{#if:{{{notnamespace|}}}|{{#ifeq:{{{notnamespace|}}}|main|notnamespace=<br>|notnamespace={{{notnamespace|}}}<br>}}}}}}<!--
| |
− | -->{{#ifeq:{{{category|}}}|?||{{#if:{{{category|}}}|category={{{category|}}}<br>}}}}<!--
| |
− | -->{{#ifeq:{{{notcategory|}}}|?||{{#if:{{{notcategory|}}}|notcategory={{{notcategory|}}}<br>}}}}<!--
| |
− | -->{{#ifeq:{{{uses|}}}|?||{{#if:{{{uses|}}}|uses=Template:{{{uses|}}}<br>}}}}<!-- | |
− | -->{{#ifeq:{{{notuses|}}}|?||{{#if:{{{notuses|}}}|notuses=Template:{{{notuses|}}}<br>}}}}<!--
| |
− | -->{{#ifeq:{{{createdby|}}}|?||{{#if:{{{createdby|}}}|createdby={{{createdby|}}}<br>}}}}<!--
| |
− | -->{{#ifeq:{{{modifiedby|}}}|?||{{#if:{{{modifiedby|}}}|modifiedby={{{modifiedby|}}}<br>}}}}<!--
| |
− | -->{{#if:{{{titlematch|}}}|titlematch={{{titlematch|}}}<br>}}<!--
| |
− | -->{{#if:{{{nottitlematch|}}}|nottitlematch={{{nottitlematch|}}}<br>}}<!--
| |
− | -->{{#if:{{{linksto|}}}|linksto={{{linksto|}}}<br>}}<!--
| |
− | -->{{#if:{{{notlinksto|}}}|notlinksto={{{notlinksto|}}}<br>}}<!--
| |
− | -->{{#if:{{{include|}}}|linksto={{{include|}}}<br>}}<!--
| |
− | -->{{#if:{{{table|}}}|linksto={{{table|}}}<br>}}<!--
| |
− | -->{{#if:{{{columns|}}}|columns={{{columns|}}}<br>|columns=3<br>}}<!--
| |
− | -->{{#ifeq:{{{export|}}}|yes|columns=1<br>}}<!--
| |
− | -->{{#ifeq:{{{order|}}}|ascending||order={{{order|}}}<br>}}<!--
| |
− | -->{{#ifeq:{{{ordermethod|}}}|-||ordermethod={{{ordermethod|}}}<br>}}<!--
| |
− | -->{{#ifeq:{{{escapelinks|}}}|true||escapelinks={{{escapelinks|}}}<br>}}<!--
| |
− | -->{{#ifeq:{{{randomcount|}}}|-||randomcount={{{randomcount|}}}<br>}}<!--
| |
− | -->{{#ifeq:{{{count|}}}|-||{{#if:{{{count|}}}|count={{{count|}}}<br>}}}}<!--
| |
− | -->{{#ifeq:{{{shownamespace|}}}|no||shownamespace={{{shownamespace|}}}<br>}}<!--
| |
− | -->{{#ifeq:{{{addcategories|}}}|no||addcategories={{{addcategories|}}}<br>}}<!--
| |
− | -->{{#ifeq:{{{addpagecounter|}}}|no||addpagecounter={{{addpagecounter|}}}<br>}}<!--
| |
− | -->{{#ifeq:{{{addpagesize|}}}|no||addpagesize={{{addpagesize|}}}<br>}}<!--
| |
− | -->{{#ifeq:{{{addeditdate|}}}|no||addeditdate={{{addeditdate|}}}<br>}}<!--
| |
− | -->{{#ifeq:{{{addpagetoucheddate|no||}}}|addpagetoucheddate={{{addpagetoucheddate|}}}<br>}}<!--
| |
− | -->{{#ifeq:{{{adduser|}}}|no||adduser={{{adduser|}}}<br>}}<!--
| |
− | -->{{#ifeq:{{{lastrevisionbefore|}}}|YYYY-MM-DD||lastrevisionbefore={{{lastrevisionbefore|}}}<br>}}<!--
| |
− | -->{{#ifeq:{{{firstrevisionsince|}}}|YYYY-MM-DD||firstrevisionsince={{{firstrevisionsince|}}}<br>}}<!--
| |
− | -->{{#ifeq:{{{allrevisionsbefore|}}}|YYYY-MM-DD||allrevisionsbefore={{{allrevisionsbefore|}}}<br>}}<!--
| |
− | -->{{#ifeq:{{{allrevisionssince|}}}|YYYY-MM-DD||allrevisionssince={{{allrevisionssince|}}}<br>}}<!--
| |
− | --></small><br></includeonly>
| |
{{#vardefine:year|2024}}{{#vardefine:month|11}} {{#vardefine:width|}}{{#vardefine:noadd|}}{{#vardefine:nolink|}}{{#vardefine:purpose|}}{{#vardefine:show|}}{{#vardefine:namespace|}}
There are 2 events planned this month.