Mudanças entre as edições de "Wikihelp:Documentação da predefinição"

Origem: IRChelp Brasil - Wiki
Ir para navegação Ir para pesquisar
(Criação da Página Wikipédia:Documentação da predefinição.)
 
m (Correção ortográfica.)
 
(Uma revisão intermediária pelo mesmo usuário não está sendo mostrada)
Linha 1: Linha 1:
{{Informativo aprovado|[[Wikipédia:Esplanada/propostas/Oficializar artigos informativos (30mai2012)]]}}
+
{{Informativo aprovado|[[Wikihelp:Esplanada/propostas/Oficializar artigos informativos (30mai2012)]]}}
 
[[Ajuda:Guia Prático/Predefinições|Predefinições]] são uma característica muito poderosa do [[MediaWiki]], mas podem ser confusas para novos usuários e até mesmo usuários experientes podem ter dificuldade em entender as mais complexas. Predefinições devem ser acompanhadas de [[documentação]] para melhor usabilidade.
 
[[Ajuda:Guia Prático/Predefinições|Predefinições]] são uma característica muito poderosa do [[MediaWiki]], mas podem ser confusas para novos usuários e até mesmo usuários experientes podem ter dificuldade em entender as mais complexas. Predefinições devem ser acompanhadas de [[documentação]] para melhor usabilidade.
  
Linha 11: Linha 11:
 
* '''Usage examples''': specify the exact wikitext that should be used and the result that it produces. The wikitext can be enclosed in a {{nowrap|<code><nowiki><code>…</code></nowiki></code>}} container, to make it clear and <code>easy to copy, like this</code>. If the template can be used in several different ways, with or without optional parameters, for example, provide a range of examples. A good way to do so is to transclude the template itself into the documentation a few times (i.e., use live examples), with different parameters each time and list the parameters used in each case.
 
* '''Usage examples''': specify the exact wikitext that should be used and the result that it produces. The wikitext can be enclosed in a {{nowrap|<code><nowiki><code>…</code></nowiki></code>}} container, to make it clear and <code>easy to copy, like this</code>. If the template can be used in several different ways, with or without optional parameters, for example, provide a range of examples. A good way to do so is to transclude the template itself into the documentation a few times (i.e., use live examples), with different parameters each time and list the parameters used in each case.
 
* '''Related templates''': if the template is one of a series of templates, include links to these – in particular, ensure that every template in the series is linked from each of the others, as this makes navigation easier. (A separate navigation template may be useful for this purpose, see: [[Template:Protection templates]]).
 
* '''Related templates''': if the template is one of a series of templates, include links to these – in particular, ensure that every template in the series is linked from each of the others, as this makes navigation easier. (A separate navigation template may be useful for this purpose, see: [[Template:Protection templates]]).
* '''[[Wikipedia:Categorization|Categories]]''' and '''[[Wikipedia:InterWikimedia links|InterWikimedia links]]''', where applicable. Like the documentation, these must be within a {{nowrap|<code><nowiki>&lt;noinclude>…&lt;/noinclude></nowiki></code>}} container. Many template categories are available, see: [[:Category:Wikipedia templates]] to browse through them.
+
* '''[[Wikihelp:Categorization|Categories]]''' and '''[[Wikihelp:InterWikimedia links|InterWikimedia links]]''', where applicable. Like the documentation, these must be within a {{nowrap|<code><nowiki>&lt;noinclude>…&lt;/noinclude></nowiki></code>}} container. Many template categories are available, see: [[:Category:Wikihelp templates]] to browse through them.
  
Template documentation is often placed in a [[Wikipedia:Subpages|subpage]] of the template itself, which is then [[Wikipedia:Transclusion|transcluded]] at the end of the template page. This separates the often complex template code from the documentation, making the documentation easier to edit. It also allows templates to be [[Wikipedia:Protection policy|protected]] where necessary, while allowing anyone to edit the documentation. This method is sometimes referred to as the “template doc page pattern”.
+
Template documentation is often placed in a [[Wikihelp:Subpages|subpage]] of the template itself, which is then [[Wikihelp:Transclusion|transcluded]] at the end of the template page. This separates the often complex template code from the documentation, making the documentation easier to edit. It also allows templates to be [[Wikihelp:Protection policy|protected]] where necessary, while allowing anyone to edit the documentation. This method is sometimes referred to as the “template doc page pattern”.
  
Documentation of any sort on a template page should always be enclosed by a {{nowrap|<code><nowiki>&lt;noinclude>…&lt;/noinclude></nowiki></code>}} container, so that it does not show up when the template is used on another page. Text on the template page itself adds to the amount of text which must be processed when displaying the template, which is [[Wikipedia:Template limits|limited]] for performance reasons. Placing the documentation in a subpage avoids this (MediaWiki developers have <span class="plainlinks">[http://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&diff=prev&oldid=69888944 recommended]</span> it for this reason).
+
Documentation of any sort on a template page should always be enclosed by a {{nowrap|<code><nowiki>&lt;noinclude>…&lt;/noinclude></nowiki></code>}} container, so that it does not show up when the template is used on another page. Text on the template page itself adds to the amount of text which must be processed when displaying the template, which is [[Wikihelp:Template limits|limited]] for performance reasons. Placing the documentation in a subpage avoids this (MediaWiki developers have <span class="plainlinks">[http://wiki.irchelp.com.br/wiki/index.php?title=Wikihelp:Village_pump_(technical)&diff=prev&oldid=69888944 recommended]</span> it for this reason).
 
-->
 
-->
  
Linha 37: Linha 37:
 
== Ver também ==
 
== Ver também ==
  
*[[Wikipedia:Namespace predefinição]] - lista de predefinições organizadas (incompleta)
+
*[[Wikihelp:Namespace predefinição]] - lista de predefinições organizadas (incompleta)
 
*[[:Categoria:!Predefinições]] - categorias com todas as predefinições
 
*[[:Categoria:!Predefinições]] - categorias com todas as predefinições
 
*[[Ajuda:Guia de edição/Como criar predefinições|Ajuda:Como criar predefinições]] - Ensina como criar uma predefinição.
 
*[[Ajuda:Guia de edição/Como criar predefinições|Ajuda:Como criar predefinições]] - Ensina como criar uma predefinição.
Linha 47: Linha 47:
 
[[Categoria:!Instruções de predefinições| ]]
 
[[Categoria:!Instruções de predefinições| ]]
 
[[Categoria:!Artigos informativos|Documentação da predefinição]]
 
[[Categoria:!Artigos informativos|Documentação da predefinição]]
[[Categoria:!Recursos da Wikipédia]]
+
[[Categoria:!Recursos da Wikihelp]]
  
 
</noinclude>
 
</noinclude>

Edição atual tal como às 13h57min de 15 de dezembro de 2019

Predefinição:Informativo aprovado Predefinições são uma característica muito poderosa do MediaWiki, mas podem ser confusas para novos usuários e até mesmo usuários experientes podem ter dificuldade em entender as mais complexas. Predefinições devem ser acompanhadas de documentação para melhor usabilidade.

A documentação da predefinição deve explicar o que ela faz e como utilizá-la. Deveria ser simples o suficiente para que usuários sem conhecimento completo das intrincadas sintaxes de predefinições - incluindo muitos editores experientes que possam estar focados em outras atividades - possam usá-las corretamente. Isto é especialmente verdade no caso de predefinições amplamente utilizadas.

Categorias e interwikis

Para colocar a predefinição em uma categoria

Adicione a tag [[Categoria:nomedacategoria]] dentro de uma seção <includeonly>...</includeonly> na subpágina doc. No caso do uso da documentação por meio do parâmetro conteúdo {{Documentação|conteúdo=}}, a tag <includeonly> impede a categorização e não deve ser utilizada.

Para criar um interwiki para a predefinição

Adicione a tag [[Códigodelinguagem:nomecompletodapredefinição]] dentro de uma seção <includeonly>...</includeonly> na subpágina doc. No caso do uso da documentação por meio do parâmetro conteúdo Predefinição:Tld, a tag <includeonly> não deve ser utilizada.

Para colocar a subpágina doc em uma categoria

Adicione a tag: [[Categoria:nomedacategoria]] dentro de uma seção <noinclude>...</noinclude> na subpágina doc.

Para fazer com que a predefinição coloque um artigo em uma categoria (quando o artigo usa a predefinição)

Adicione a tag [[Categoria:nomedacategoria]] dentro de uma seção <includeonly>...</includeonly> na página da predefinição.

Ver também


Predefinição:!Conceitos do MediaWiki