Extension:MyVariables/zh
Appearance
This extension is professionally maintained by the WikiTeq team.
WikiTeq provides official support for MediaWiki LTS releases only. It may work with other MediaWiki releases.
MyVariables 发行状态: 稳定版 |
|
---|---|
实现 | 变量 |
描述 | Adds new built-in variables |
作者 | |
维护者 | WikiTeq team |
最新版本 | 4.3 (2021-09-23) |
兼容性政策 | 对于每个有长期支持的MediaWiki发行版本,扩展内都有对应的分支。 |
MediaWiki | 1.31-1.35, 1.39 |
数据库更改 | 否 |
许可协议 | GNU通用公眾授權條款2.0或更新版本 |
下載 | |
季度下載量 | 26 (Ranked 110th) |
前往translatewiki.net翻譯MyVariables扩展 | |
問題 | 开启的任务 · 报告错误 |
The MyVariables extension adds new built-in variables:
变量 | 描述 | Sample |
---|---|---|
{{currentuser}}
|
Login of current user or the IP for anonymous users. | "Pastakhov" or "x.x.x.x" |
{{currentloggeduser}}
|
Login of current user or empty for anonymous users. | "Pastakhov" or "" |
{{currentuserrealname}}
|
Real name of current user. | "Pavel Astakhov" |
{{hitcounter}}
|
Number of visits (hits) to the current page according to Extension:HitCounters or empty if the extension isn't installed. | "123" or "" |
{{logo}}
|
Path to wiki logo. | "/w/skins/common/images/wiki.png" |
{{uuid}}
|
Random (v4) UUID. | "65ba1a51-c723-4b9d-b1f3-13148d628322" |
{{userlanguagecode}}
|
Language that the user specified in the preferences. | "en", "en-ca", "ru", etc. |
{{userregistration}}
|
Timestamp of the date at which the user registered or empty if the page isn't a user page. | "20100809003006" or "" |
{{firstrevisionid}}
|
ID of the first revision of the current page or empty if page isn't yet created. | "1" or "" |
{{firstrevisiontimestamp}}
|
Timestamp of the first revision of the current page or empty if page isn't yet created. | "20100809003006" or "" |
{{firstrevisionuser}}
|
The user name (without the User prefix) or IP address associated to the first revision of the current page or empty if page isn't yet created. | "Pastakhov", "x.x.x.x" or "" |
{{pageimage}}
|
The main image of the current page as determined by Extension:页面图片 . If the extension is not installed or no main image was determined then {{PAGEIMAGE}} will output nothing. | "Logo.png" or "" |
{{realname}}
|
When used in a user page, will output the real name of the user. However, if used like this {{REALNAME:Jimbo}} it will output the real name of the user Jimbo. This dual behavior is similar to core variables like {{PAGENAME}}. | "Pastakhov" or "" |
{{redirects}}
|
Comma-separated list of redirects to the current page or empty if there're no redirects. | "Foo, Bar, Baz" or "" |
{{subpages}}
|
The subpages of the current page, in plain text, comma-separated and in alphabetic order. If there are no any subpages, it will output nothing. | "Pastakhov/Subpage1, Pastakhov/Subpage2" or "" |
{{whatlinkshere}}
|
The titles of the pages that link to the current page, comma-separated and in alphabetic order. It will be empty if there are no linked pages. | "Bar, Baz, Foo" or "" |
安裝
- 下载文件,并将解压后的
MyVariables
文件夹移动到extensions/
目录中。
开发者和代码贡献人员应从Git安装扩展,输入:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyVariables - 将下列代码放置在您的LocalSettings.php 的底部:
wfLoadExtension( 'MyVariables' );
- 完成 – 在您的wiki上导航至Special:Version,以验证已成功安装扩展。
注释
- This extension should not be confused with the 变量 extension, which allows the use of variables in the computer programming sense.
參見
- 扩展:语义额外特殊属性 - Semantic properties for page authors, subpages and more
- Extension:IDProvider
- Extension:UserFunctions
- Extension:界面语言代码
- Extension:PageMagic
此扩展在以下wiki农场/托管网站和/或软件包中提供: 這不是一份權威名單。 即使某些wiki农场/托管网站和/或软件包未在这里列出,它们也可能提供此扩展。 请检查你的wiki农场/托管网站或软件包以确认提供情况。 |
Categories:
- Extensions by WikiTeq/zh
- Stable extensions/zh
- Variable extensions/zh
- GPL licensed extensions/zh
- Extensions in Wikimedia version control/zh
- GetMagicVariableIDs extensions/zh
- ParserFirstCallInit extensions/zh
- ParserGetVariableValueSwitch extensions/zh
- ParserOptionsRegister extensions/zh
- All extensions/zh
- Extensions included in Canasta/zh
- Extensions included in Miraheze/zh
- Extensions included in MyWikis/zh
- Extensions included in Open CSP/zh
- Extensions included in ProWiki/zh
- Extensions included in wiki.gg/zh
- Extensions included in WikiForge/zh