Open main menu

확장기능:새 사용자 메시지

This page is a translated version of the page Extension:NewUserMessage and the translation is 13% complete.

Other languages:
Deutsch • ‎English • ‎dansk • ‎español • ‎polski • ‎中文 • ‎日本語 • ‎한국어
미디어위키 확장 기능 매뉴얼
OOjs UI icon advanced.svg
NewUserMessage
출시 상태: 안정
구현 User activity , Hook
설명 새로 생성된 계정의 토론 문서에 메시지 추가
만든이 Nad, Siebrand
최신 버전 3.6.0 (2016-10-31)
MediaWiki 1.26+
PHP 5.4+
데이터베이스 변경 아니오
라이선스 GNU 일반 공중 사용 허가서 2.0 or later
다운로드

  • $wgNewUserSuppressRC
  • $wgNewUserMinorEdit
  • $wgNewUserMessageOnAutoCreate
NewUserMessage 확장 기능 번역 (translatewiki.net에서 가능한 경우)
사용법과 버전 매트릭스를 확인합니다.
이슈 미해결 작업 · 버그 보고

새 사용자 메시지 확장 기능은 로컬 위키에 새로 생성된 계정의 토론 문서에 자동으로 메시지를 남기는 기능입니다.

특수:계정만들기 페이지를 통해 '계정 만들기' 버튼을 누르면 대개 새 계정이 가입됨과 동시에 MediaWiki:Welcomecreation이 표출됩니다. 이 확장 기능은 해당 메시지를 표출하는 대신에, 새 계정의 토론 문서에 특정한 틀 메시지를 남길 수 있도록 합니다.

In case LiquidThreads is installed, this extension will create a new thread on the user talk page. See In-wiki configuration for details.

설치

  • 파일을 다운로드해서, extensions/ 폴더 내의 NewUserMessage 이라는 이름의 디렉터리 내에 설치합니다.

미디어위키 1.26 이하를 실행 중인 사용자에게:

위의 지시사항은 wfLoadExtension()을 사용하여 이 확장기능을 설치하는 새로운 방법을 기술한 것으로, wfLoadExtension( 'NewUserMessage' ); 대신 초기 버전(미디어위키 1.26 이하)에 이 확장기능을 설치하려면 다음을 사용해야 합니다:

require_once "$IP/extensions/NewUserMessage/NewUserMessage.php";

설정

전역 변수

There are some global variables which affect the operation of the extension. These should be set in your LocalSettings file after the require_once of the NewUserMessage.php script.

Variable Default value Meaning
$wgNewUserSuppressRC false Specify whether or not the new user message creation should show up in recent changes. If set to true, those edits won't be displayed even if "show bot edits" is selected on RecentChanges or Watchlist.
$wgNewUserMinorEdit true Should the new user message creation be a minor edit?
$wgNewUserMessageOnAutoCreate false Should auto creation (CentralAuth) trigger a new user message?

In-wiki configuration

Other settings of the extension can be made in the MediaWiki: namespace.

Page title Default value Meaning
MediaWiki:Newusermessage-template Template:Welcome Specify a template to wrap the new user message within. You can create translations (e.g. MediaWiki:Newusermessage-template/es) that will be used when the registered user has set a different interface language on registration (this is possible through &uselang parameter or more easily through login language links).
MediaWiki:Newusermessage-template-subject Template:Welcome-subject Specify a template to wrap the new user message thread subject within. Only used when LiquidThreads is installed and active on user talk pages. Always preprocessed and substituted by the parser.
MediaWiki:Newusermessage-template-body Template:Welcome-body Specify a template to wrap the new user message thread body within. Only used when LiquidThreads is installed and active on user talk pages.
MediaWiki:Newuseredit-summary Adding [[welcome message]] to new user's talk page Edit summary for the recent changes entry of a new users message. Always in content language.
MediaWiki:Newusermessage-editor New user message Set the username of the user that makes the edit on user talk pages. If this user does not exist, "MediaWiki default" will show up as editing user. The user set here is marked as reserved and won't be able to login!
MediaWiki:Newusermessage-signatures None Optional feature. if it exists and contains a list of user names (* signature newline * etc…), these user names will be added after the template (randomly) along with the date and time. This feature is inactive when LiquidThreads is installed and new user messages are posted as threads.
MediaWiki:Newusermessage-substitute‎ None Optional feature. If the page exists and contains any text (but spaces or a single dash ("-")), the welcome template will be substituted in the talk page.

Note that these items are articles, to edit them go to the article in your browser and edit the text accordingly.

Example NewUserMessage page

A very simple example of the page you should create as Template:Welcome:

== Welcome to our Wiki ==
Hello {{{name}}} ...
Template parameters
  • {{{name}}}: User name
  • {{{realName}}}: Real name (can be empty)

Example NewUserMessage pages with LiquidThreads

Subject

A very simple example of the page you should create as Template:Welcome-subject:

Hello {{{name}}}

This message will be used as the thread subject — preprocessed and substituted. If this page is empty, this extension will not do anything when LiquidThreads is installed.

Template parameter
  • name: User name (user real name if used at registration)

Body

A very simple example of the page you should create as Template:Welcome-body:

Welcome to our Wiki, {{{realName|{{{name}}}}}}

This message will be used as the thread body. It will be substituted if MediaWiki:Newusermessage-substitute‎ has contents. If this page is empty, this extension will not do anything when LiquidThreads is installed.

Please note that the {{{realName|{{{name}}}}}} syntax currently does not work. As a workaround {{#if: {{{realName|}}} | {{{realName}}} | {{{name}}} }} may be used if the ParserFunctions extension is available.
Template parameters
  • name: User name
  • realName: User real name

Hooks

This extension adds one new hook:

See also