Extensión:NewUserMessage

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Extension:NewUserMessage and the translation is 28% complete.

Outdated translations are marked like this.
Other languages:
Deutsch • ‎English • ‎Nederlands • ‎català • ‎dansk • ‎español • ‎français • ‎italiano • ‎polski • ‎português • ‎português do Brasil • ‎sicilianu • ‎suomi • ‎中文 • ‎日本語 • ‎한국어
MediaWiki extensions manual
Crystal Clear action run.svg
NewUserMessage
Release status: estable
Implementación User activity, Hook
Descripción Add a message to newly created user's talk pages
Autor(es) Nad, Siebrand
Última versión 3.6.0 (2016-10-31)
MediaWiki 1.26+
PHP 5.4+
Cambios de la base de datos No
Licencia GNU General Public License 2.0 or later
Descarga
Parámetros

  • $wgNewUserSuppressRC
  • $wgNewUserMinorEdit
  • $wgNewUserMessageOnAutoCreate
Hooks que usa
AddNewAccount
AuthPluginAutoCreate
UserGetReservedNames
LocalUserCreated
Hooks provided
CreateNewUserMessage
Translate the NewUserMessage extension if it is available at translatewiki.net
Verificar uso y versión de la matriz.
Asuntos Tareas abiertas · Reportar un bug

The NewUserMessage extension adds a message to the talk pages of newly created wiki accounts.

Usually after a new user registers on a wiki powered by MediaWiki, the message in MediaWiki:Welcomecreation is displayed. This extension allows a message in a specified template to be added into the new user's talk page instead.

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

Instalación

  • Descarga y extrae los archivos en el directorio «NewUserMessage» dentro del directorio extensions/ existente.

Para quienes usan MediaWiki 1.26 o versiones anteriores:

Estas instrucciones describen la nueva forma de instalar extensiones usando wfLoadExtension(). Si necesitas instalar esta extensión en versiones anteriores (MediaWiki 1.26 y anteriores), debes usar lo siguiente en lugar de wfLoadExtension( 'NewUserMessage' );:

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

Configuración

Variables globales

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 Valor predeterminado Significado
$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.

Título de página Valor predeterminado Significado
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:

== Te damos la bienvenida a nuestra wiki ==
Template parameters
  • {{{name}}}: User name
  • {{{realName}}}: Real name (can be empty)

Example NewUserMessage pages with LiquidThreads

Asunto

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

Hola, {{{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.

Parámetro de plantilla
  • name: User name (user real name if used at registration)

Cuerpo

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

Te damos la bienvenida a nuestra 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.
Parámetros de plantilla
  • name: User name
  • realName: User real name

Hooks

This extension adds one new hook:

See also