Jump to content

Manual:$wgUploadDialog/ru

From mediawiki.org
This page is a translated version of the page Manual:$wgUploadDialog and the translation is 2% complete.
Files and file uploads: $wgUploadDialog
Configuration for Upload dialog and the files uploaded through it.
Введено в версии:1.27.0 (Gerrit change 289126; git #2aaeb356)
Удалено в версии:всё ещё используется
Допустимые значения:(multi-dimensional array)
Значение по умолчанию:see below

The $wgUploadDialog global allows for configuration of the upload dialog (selecting fields to display, modifying the licensing options, and choosing special formatting for the file page which will be created and the upload comment).

This applies also to foreign uploads to this wiki, if configured (the configuration is loaded by remote wikis using the action=query&meta=siteinfo API).

Default values

See below for documentation of each property. None of the properties may be omitted.

Версия MediaWiki:
1.28
$wgUploadDialog = [
	'fields' => [
		'description' => true,
		'date' => false,
		'categories' => false,
	],
	'licensemessages' => [
		'local' => 'generic-local',
		'foreign' => 'generic-foreign',
	],
	'comment' => [
		'local' => '',
		'foreign' => '',
	],
	'format' => [
		'filepage' => '$DESCRIPTION',
		'description' => '$TEXT',
		'ownwork' => '',
		'license' => '',
		'uncategorized' => '',
	],
];
Версия MediaWiki:
1.27
$wgUploadDialog = [
	'fields' => [
		'description' => true,
		'date' => false,
		'categories' => false,
	],
	'licensemessages' => [
		'local' => 'generic-local',
		'foreign' => 'generic-foreign',
	],
	'comment' => '',
	'format' => [
		'filepage' => '$DESCRIPTION',
		'description' => '$TEXT',
		'ownwork' => '',
		'license' => '',
		'uncategorized' => '',
	],
];

Properties

fields

Upload dialog with all fields enabled

Fields to make available in the dialog. true means that this field is visible, false means that it is hidden. Note that you also have to add the matching replacement to the 'filepage' format key to make use of these.

Available fields:

  • 'description' - file description
  • 'categories' - categories
  • 'date' - file creation date

The "Name" field can't be hidden.

licensemessages

Upload dialog showing the default generic-local messages

Suffix of localisation messages used to describe the license under which the uploaded file will be released. The same value may be set for both 'local' and 'foreign' uploads.

The 'local' messages are used for local uploads on the wiki. The 'foreign' messages are used for cross-wiki uploads from other wikis to the wiki, if configured.

The default values correspond to:

  • 'generic-local'
upload-form-label-own-work-message-generic-local I confirm that I am uploading this file following the terms of service and licensing policies on MediaWiki.
Я подтверждаю, что загружаю этот файл в соответствиями с правилами и лицензионной политикой сайта MediaWiki.
upload-form-label-not-own-work-message-generic-local If you are not able to upload this file under the policies of MediaWiki, please close this dialog and try another method.
Если Вы не можете загрузить этот файл в соответствиями с правилами сайта MediaWiki, пожалуйста, закройте это диалоговое окно и попробуйте другой метод.
upload-form-label-not-own-work-local-generic-local You may also want to try the default upload page.
Возможно, вы также захотите попробовать страницу загрузки по умолчанию.
  • 'generic-foreign'
upload-form-label-own-work-message-generic-foreign I understand that I am uploading this file to a shared repository. I confirm that I am doing so following the terms of service and licensing policies there.
Я понимаю, что загружаю этот файл в общий репозиторий. Я подтверждаю, что я делаю это в соответствии с пользовательским соглашением и лицензионной политикой.
upload-form-label-not-own-work-message-generic-foreign If you are not able to upload this file under the policies of the shared repository, please close this dialog and try another method.
Если Вы не можете загрузить этот файл в соответствиями с правилами общего хранилища, пожалуйста, закройте это диалоговое окно и попробуйте другой метод.
upload-form-label-not-own-work-local-generic-foreign You may also want to try using the upload page on MediaWiki, if this file can be uploaded there under their policies.
В том случае, если этот файл может быть загружен в соответствии с правилами сайта MediaWiki, вы также можете попробовать использовать его страницу загрузки.

comment

Upload comment to use. Available replacements:

  • $HOST - domain name from which a cross-wiki upload originates
  • $PAGENAME - wiki page name from which an upload originates

This allows the wiki and the page where the upload was initiated to be documented in the upload comment.

Starting with MediaWiki 1.28, this can also be set to an array to specify different upload comments for local and foreign uploads:

$wgUploadDialog = [
	...
	'comment' => [
		'local' => '...',
		'foreign' => '...',
	],
	...
];

format

Format of the file page wikitext to be generated from the fields input by the user. This defines how the specified fields are used to construct the file description page.

  • 'filepage' - a wrapper for the whole page. Available replacements:
    • $DESCRIPTION - file description, as input by the user (only if the 'description' field is enabled), wrapped as defined below in the 'description' key
    • $DATE - file creation date, as input by the user (only if the 'date' field is enabled)
    • $SOURCE - currently, this is always the value defined below in the 'ownwork' key. The upload dialog may be extended in the future to allow choosing other sources.
    • $AUTHOR - linked user name of the uploader. The upload dialog may be extended in the future to allow choosing other authorship information.
    • $LICENSE - currently, this is always the value defined below in the 'license' key. The upload dialog may be extended in the future to allow choosing other licenses.
    • $CATEGORIES - file categories wikitext, as input by the user (only if the 'categories' field is enabled), or if no input, as defined below in the 'uncategorized' key
  • 'description' - wrapper for the file description, as input by the user. Available replacements:
    • $LANGUAGE - source wiki's content language. This is mostly useful for foreign uploads.
    • $TEXT - input by the user
  • 'ownwork' - used for $SOURCE in 'filepage'
  • 'license' - used for $LICENSE in 'filepage'
  • 'uncategorized' - used for $CATEGORIES in 'filepage' when the user input no categories

См. также