This page, or parts of it, are still untranslated. Please translate it to the appropriate language (中文(简体)).
AutoCreateUserPages 允许在你至少贡献过一次的wiki上自动创建你自己的用户页面和讨论页,无论是通过编辑还是发布消息、评论或讨论帖子。它最初是出于个人用途而制作的,但是,许多wiki开始在网站上使用它来代替欢迎工具。
Installation
Configuration
此脚本的配置选项存储在全局window.AutoCreateUserPagesConfig对象。以下选项可用:
content:应该被放置在用户页面的内容。当设置的是一个字符串,它将会被放在用户页面和讨论页面上(当讨论页被启用时)。当设置的是一个对象,它的2(用户页面)和3(讨论页面)属性将会决定哪些内容应该放在哪个页面上。你可以在内容上使用变量$1,这将会被更换为正在编辑页面的用户名。这个属性的默认值为{{w:User:$1}}。summary: Summary to use while editing the user pages. By default set to "Auto creating user page".notify: If set totrue, this will notify the user that their user pages have finished creating. If set to a string, the user will be notified using that string as a message. You can use$1and$2variables in this string for the current user's name and their URL-encoded name, respectively. Some wikis may use this option as a kind of welcome message.
The script also fires a AutoCreateUserPages.loaded hook when all pages are created, with the array of created page names as the argument, in case developers want to execute further actions on these after their creation.
Example
The following configuration, for a user named User1, will create pages User:User1 and User talk:User1 (on a wiki with talkpages enabled) once they make their first edit or post, where the userpage will be created with {{:w:User:User1}} and the talkpage will be created with {{:w:User:User1/talk}}, and the user will be notified with a link to their userpage. The summary used when creating the page will be "Creating my pages".
window.AutoCreateUserPagesConfig = {
content: {
2: '{{:w:User:User1}}',
3: '{{:w:User:User1/talk}}'
},
summary: '创建我的页面',
notify: '<a href="/wiki/User:$2">这里有一个到您的用户页面链接,$1!</a>'
};