Шаблон:Modeling/doc — различия между версиями

Материал из SRNS
Перейти к: навигация, поиск
(Использование)
(Создание описания модели с помощью шаблона)
 
(не показаны 8 промежуточных версий 1 участника)
Строка 79: Строка 79:
 
В данном разделе описаны параметры, задающие содержимое инфобокса. Информация по параметру '''templatemode''' и другим управляющим параметрам приведена в разделе ''[[#Управляющие параметры|Управляющие параметры]]''.
 
В данном разделе описаны параметры, задающие содержимое инфобокса. Информация по параметру '''templatemode''' и другим управляющим параметрам приведена в разделе ''[[#Управляющие параметры|Управляющие параметры]]''.
  
{|
+
{|  
 
|
 
|
{|border="1"
+
{|class="wikitable"
 
|+ '''Информационные параметры'''
 
|+ '''Информационные параметры'''
 
|-
 
|-
Строка 108: Строка 108:
 
| <span id="changelog">changelog</span>|| Ссылка на CHANGELOG-файл
 
| <span id="changelog">changelog</span>|| Ссылка на CHANGELOG-файл
 
|-
 
|-
| <span id="category">tags</span> || Категории, к которым можно отнести модель. Например, <code>Коррелятор</code>.
+
| <span id="repository">'''repository'''</span>|| Ссылка на репозиторий
 +
|-
 +
| <span id="category">category</span> || Дополнительные категории, к которым можно отнести модель. Например, <code>Коррелятор</code>. Категории [[:Category:Моделирование|Моделирование]] и [[:Category:Список всех моделей|Список всех моделей]] добавляются автоматически.
 
|}
 
|}
  
== Control parameters ==
+
== Управляющие параметры ==
{| border="1"
+
{| class="wikitable"
|+ '''Control parameters'''
+
|+ '''Управляющие параметры'''
 
|-
 
|-
| '''templatemode''' || '''Controls auto-categorization of host page.'''
+
| '''templatemode''' || при значении параметра ''nocats'' страница не добавляется в категории [[:Category:Моделирование|Моделирование]] и [[:Category:Список всех моделей|Список всех моделей]] и категории, указанные в параметрах category. По умолчанию следует оставлять пустым.
 
+
Normally left blank.  Alternate values are:
+
* ''nocats'' - suppresses categorization. Use this value if you are adding this template to [[Help:Subpage|subpages]] of an extension or to how-to documentation of extensions. For example, the usage image above sets <code>templatemode=nocats</code> because this isn't an actual extension page and we don't want to add this page to any categories on account of it.
+
 
+
 
+
If this is left blank, this template will add the host page to [[:Category:All extensions]] and to one or more additional categories, depending on the values assigned to the [[#Content parameters|Content parameters]].
+
 
|}
 
|}
  
== Using the infobox ==
+
== Создание описания модели с помощью шаблона ==
=== Existing extension pages ===
+
If you want to add the infobox to an existing page, copy and paste the code at the [[#CutAndPaste|top of this page]].
+
 
+
=== Create a new extension article ===
+
If you want to create a new extension page, enter the name below and click the button. A new page will be created with the infobox template already in place.
+
 
+
  
 +
С помощью шаблона <nowiki>{{Modeling/CreateExtensionInputBox}}</nowiki> можно создавать новые статьи-описания для моделей:
 
{{Modeling/CreateExtensionInputBox}}
 
{{Modeling/CreateExtensionInputBox}}
 
 
== Enhancing this template ==
 
If you would like to improve on this template, thanks!  This is a complicated template so here is some help along the way:
 
 
=== Fixing documentation ===
 
If you would like to fix documentation, please be aware that documentation and code is split into two files:
 
* '''[[Template:Modeling/doc]]''' - stores all documentation.
 
* '''[[Template:Modeling]]''' - stores only the code for the template and a small amount of non-included material (category links, transcluded documentation link).
 
 
 
In addition, [[Template:Modeling/Sample]] stores the boiler plate that is preloaded into newly created pages and contains some basic documentation on how to fill in the template parameters.  It needs to be kept in sync with [[Template:Modeling/doc]].
 
 
=== The Create Modeling button ===
 
To improve the create extension button behavior:
 
* '''[[Template:Modeling/Sample]]:''' The boilerplate extension that is preloaded into newly-created pages.
 
* '''[[Template:Modeling/CreateExtensionInputBox]]:''' An input box that can be inserted wherever you want users to easily create extensions.  For documentation on the <code><nowiki><inputbox></nowiki></code> tag, please see [[Extension:InputBox]].
 
 
 
=== Infobox parameters ===
 
In general:
 
* To make this template easy to use, each label in the infobox is linked to documentation on the template parameter(s) it displays.  If you add a parameter, please be sure to also add it to the [[Template:Modeling/Doc#Content parameters|content parameter documentation]] and link its label to that documentation.
 
 
 
To change/correct/add to the implementation type parameters:
 
* Check the [[Template_talk:Extension|talk page]] - there have been some extensive discussions about this field.
 
* '''[[Template:Modeling/TypeSwitch]]:''' Stores the possible values for the type field.  Multiple values are implemented by calling this template with [[Template:Foreach]].
 
* '''[[Template:Modeling/TypeSwitchNoCats]]:''' Used instead of [[Template:Modeling/TypeSwitch]] when this template is used in <code>templatemode=nocats</code>.  Templates used with [[Template:Foreach]] can only take one parameter so we need to wrap the call to [[Template:Modeling/TypeSwitch]] with another template that sets the mode.
 
* '''[[Template:Modeling/doc]]:''' Documentation for this template needs to be kept in sync with any changes to the implementation type taxonomy.
 
 
 
To change the behavior of the hook parameters:
 
* '''[[Template:Modeling/HookInUse]]:''' Adds links and categories for a hook in use.  Multiple hooks in use are implemented by calling this template with [[Template:Foreach]].
 
* '''[[Template:Modeling/HookInUseNoCats]]:''' Used instead of [[Template:Modeling/HookInUse]] when this template is used in <code>templatemode=nocats</code>.  Templates used with [[Template:Foreach]] can only take one parameter so we need to wrap the call to [[Template:Modeling/HookInUse]] with another template that sets the mode.
 

Текущая версия на 21:18, 23 апреля 2011

Template:Modeling


Содержание

[править] Назначение

Этот шаблон должен добавляться на каждую страницу, описывающую ту или иную компьютерную модель. Он добавляет полезный инфобокс с общим описанием модели и автоматически добавляет страницу в категории Моделирование и Список всех моделей. Дополнительные категории можно указать с помощью набора параметров category.

[править] Использование

Скопировать и вставить на свою страницу:

{{Modeling|templatemode =
|name          = 
|status        = stable
|username      = 
|author        = 
|description   = 
|image         = 
|imagesize     = 250
|version       = 
|update        = 
|download      = 
|readme        = 
|changelog     = 
|repository    = 
|category1     = 
|category2     = 
|category3     = 
|category4     = 
|category5     = 
|category6     = 
|category7     = 
|category8     = 
|category9     = 
|category10    = 
|category11    = 
|category12    = 
}}

Описание каждого параметра приведено ниже.

Список всех моделей
Crystal Clear action run.png
{{{name}}}
[[Image:{{{image}}}|250px]]
Описание {{{description}}}
Автор(ы) {{{author}}} ([[User:{{{username}}}|{{{username}}}]][[User talk:{{{username}}}|обсуждение]])
Последняя версия {{{version}}} ({{{update}}})
Загрузить {{{download}}}
{{{readme}}}
{{{changelog}}}
Хранилище {{{repository}}}


[править] Информационные параметры

В данном разделе описаны параметры, задающие содержимое инфобокса. Информация по параметру templatemode и другим управляющим параметрам приведена в разделе Управляющие параметры.

Информационные параметры
name Название модели
status Степень отладки программы: stable или unstable
Имя wiki-пользователя, то имя, которое Вы используете при авторизации
author Имя автора в произвольной форме
description Описание модели
image Логотип, скриншот или любое другое изображение. Указывается без namespace типа File: и без скобок [[]].
imagesize Размер изображения в инфобоксе (по умолчанию 220px)
version Последняя версия модели
update Дата последнего обновления модели
download Ссылка на скачивание архива с моделью, например Zip-архив
readme Аналогичная ссылка на README-файл
changelog Ссылка на CHANGELOG-файл
repository Ссылка на репозиторий
category Дополнительные категории, к которым можно отнести модель. Например, Коррелятор. Категории Моделирование и Список всех моделей добавляются автоматически.

[править] Управляющие параметры

Управляющие параметры
templatemode при значении параметра nocats страница не добавляется в категории Моделирование и Список всех моделей и категории, указанные в параметрах category. По умолчанию следует оставлять пустым.

[править] Создание описания модели с помощью шаблона

С помощью шаблона {{Modeling/CreateExtensionInputBox}} можно создавать новые статьи-описания для моделей:


Персональные инструменты
Пространства имён

Варианты
Действия
SRNS Wiki
Рабочие журналы
Приватный файлсервер
QNAP Сервер
Инструменты