Visit Mozilla.org

MDC:Własne szablony

z Mozilla Developer Center, polskiego centrum programistów Mozilli.

Jak pomóc: Treść
Poradnik
Na początek
Przewodnik dla edytorów
Poradnik nazywania stron
Strony ujednoznaczniające
Prawa autorskie i licencje
Dokumentacja
Opis składni Wiki
Własne klasy CSS
Własne szablony
Rozszerzenia MediaWiki
Zewnętrzne przekierowania
Dodatkowa pomoc
Edycja/przegląd listy
Słownik
FAQ
Społeczność MDC
Lista kontaktów
Ikona pomocy

UWAGA: Tłumaczenie pomocy nie zostało jeszcze zakończone. Może być ona niekompletna lub wymagać korekty.

Ta strona zawiera listę szablonów MediaWiki ogólnego zastosowania, stworzonych do użycia na MDC. Kompletną listę możemy znaleźć na stronie Special:Allpages filtrując strony, poprzez pobranie tylko tych z przestrzenią nazw Szablon. Uznaliśmy, że nie ma potrzeby wypisywać ich wszystkich tutaj.

Przeczytaj także Opis składni Wiki i listę klas CSS zdefiniowanych dla użytkownika.

Spis treści

[edytuj] Tworzenie hiperłączy

[edytuj] Szablon:anch

Szablon:anch wstawia odnośnik do kotwicy (anchor). {{anch|top}} tworzy <a href="#top">top</a> (top). Zauważ, że używając tego szablonu nie możesz wybrać opisu odnośnika innego niż nazwa kotwicy, ponieważ ideą tego szablonu było stworzenie w prosty sposób odniesienia do innego fragmentu w danym dokumencie.

[edytuj] Szablon:bug

Szablon:bug pozwala tworzyć odnośniki do błędów na bugzilla.mozilla.org poprzez użycie następującej składni: {{bug|123456}}. W tym przypadku otrzymasz: błąd 123456.

[edytuj] Szablon:enter-bug

Szablon:enter-bug lets you link to a Enter bug page on bugzilla.mozilla.org with specific product and component. For example, {{enter-bug|Core|Testing}} shows up as Core:Testing.

[edytuj] Szablon:LXRSearch

Szablon:LXRSearch can be used (somewhat painlessly) to create an LXR search URL. Składnia jest następująca: {{LXRSearch|type|param|search-string|link-text}}. Parametry są używane w następujący sposób:

  • type must be one of search (a string search through source), find (a file name search), or ident (a search through token names in Mozilla source).
  • param must be one of string (for string/file name searches) or i (for token searches). If templates had some conditional power we could get away with one parameter instead of two, but they don't. An extension could probably work around this, as always.
  • search-string is whatever you'd type in the search box on LXR if you were doing the search there, except that spaces should be converted to +.
  • link-text jest tekstem dla odnośnika, który ma zostać utworzony.

[edytuj] Szablon:source

Szablon:source allows you to link to a Mozilla source code file without having to type a long LXR URL using this syntax: {{source|browser/Makefile.in}}. This gives you: browser/Makefile.in . The text of the link is the path provided; if you want different text, then just provide a second parameter, like so: {{source|browser/Makefile.in|the browser/ Makefile.in}}, which produces the browser/ Makefile.in .

[edytuj] Odnośniki do stron w dokumentacji

(Szablon ten nie jest zbyt często stosowany)

Zastosowanie: {{cssxref|color}}: color.

Szablon pozwoli Ci zaoszczędzić trochę pisania w sposób stardardowy: [[CSS:color|color]].

[edytuj] Szablony ogólnego użytku

[edytuj] Szablon:abbr

Szablon:abbr jest odpowiednikiem znacznika <abbr>, służącego do wyjaśnienia skrótów nazw, gdy mamy problem poprzez dodanie chmurki elementu z pełnym znaczeniem skrótu. {{abbr|WWW|World Wide Web}} może być zastosowane zamiast: <abbr title="World Wide Web">WWW</abbr>. Wynik: WWW.

[edytuj] Szablon:block-title

Szablon:block-title can be used to create bolded text which visually serves as a title for a block in a page, does not appear in the auto-generated table of contents, and can act as a link target just as headings do. The syntax is: {{block-title|title}}, where title is whatever you want displayed. title also serves as the target for links to the section you are titling. Szablon:block-title is meant for use in titling Szablon:sidenotes, tables, images, and code blocks, particularly in places where you'll be referring to the particular item more than once or in places not close to the item itself.

[edytuj] Szablon:Clr

Szablon:Clr inserts a <br style="clear:both;" /> to make sure the text following it is below any floating images or other figures. Usage: {{Clr}}.

  • Please note that using this template may mess up the layout of the whole page, for example because the navigational panel in default skin is floated at the left side, so everything after {{Clr}} will also be below the navigational panel.

[edytuj] Szablon:deprecated_header

Szablon:deprecated_header inserts a deprecated mark bar spread out across the page to discourage the use of e.g. a function, method or property which is officially deprecated. The deprecated bar would typically be placed directly underneath the main page title (or breadcrumb navigation if available) of e.g. a specific function, method or property specification page. Usage: {{deprecated_header}}. Rezultat:

Wycofywany

[edytuj] Szablon:deprecated_inline

Szablon:deprecated_inline inserts an in-line deprecated mark to discourage the use of e.g. a function, method or property which is officially deprecated. Usage: {{deprecated_inline}}. Example:

  • Pozycja 1
  • Pozycja 2 Wycofywany
  • Pozycja 3

[edytuj] Szablon:disambig

Szablon:disambig ...docs still need to be done.

[edytuj] Template:non-standard_inline

Template:non-standard_inline inserts an in-line non-standard mark to discourage the use of, e.g., a function, method, property, or attribute which has not been standardized. Usage: {{non-standard_inline}}. Example:

  • Item 1
  • Item 2 Niestandardowy
  • Item 3

[edytuj] Szablon:Note

Szablon:Note inserts a specially-formatted "note" block into the article's text. This is intended to call out an interesting or important fact. It uses the "note" CSS class. Using the template instead of directly using the class allows us to make more changes to the appearance of the notes more easily in the future. Usage: {{Note|This is an important note.}}. Result:

Uwaga: To jest ważna uwaga.

[edytuj] Szablon:ref i Szablon:note

Szablon:ref i Szablon:note can be used to implement footnotes to articles. The footnote "number" is created using {{ref|coś}}, where coś should be some suitably descriptive word for whatever's being mentioned in the footnote. Then, at the end of the document, insert the following to create a numbered list for the footnotes' information:

# {{note|something}} Blah blah, tekst dla pierwszego footnote
# {{note|something-else}} Tekst dla innego footnote
# ...

[edytuj] Szablon:LockedPage

Szablon:LockedPage inserts a mark bar across the page that provides an explanation for why a page is locked. There are two parameters: the first is the length of time for which the page is expected to be locked, and the second is the reason why it's locked. A link to the page's discussion page is also included in the bar.

Ta strona jest oznaczona jako zabezpieczona trwale z następujących powodów: ciągłe spamowanie.
Proszę o przedyskutowanie zmian, które miałyby być wprowadzone, na stronie dyskusji.

[edytuj] Szablon:obsolete_header

Szablon:obsolete_header inserts an obsolete mark bar spread out across the page to prevent the use of e.g. a function, method or property which is officially obsolete. The obsolete bar would typically be placed directly underneath the main page title (or breadcrumb navigation if available) of e.g. a specific function, method or property specification page. Użycie: {{obsolete_header}}. Rezultat:

Przestarzały

[edytuj] Szablon:obsolete_inline

Szablon:obsolete_inline inserts an in-line obsolete mark to prevent the use of e.g. a function, method or property which is officially obsolete. Użycie: {{obsolete_inline}}. Przykład:

  • Pozycja 1
  • Pozycja 2 Przestarzały
  • Pozycja 3

[edytuj] Szablon:Previous, Szablon:Next, i Szablon:PreviousNext

Szablon:Previous, Szablon:Next, i Szablon:PreviousNext dostarczają kontrolki nawigacji w artykułach, które są częścią odpowiadającą za porządek na MDC. Kontrolki jednokierunkowe wymagają tylko jednego parametru, którym jest lokalizacja poprzedniego lub kolejnego artykułu. Szablon PreviousNext wymaga 2 parametrów, z których pierwszy oznacza lokalizację poprzedniego artykułu, a drugi - kolejnego.

[edytuj] Szablony informujące o wersji

[edytuj] Do usuniecia?

[edytuj] Szablon:sidenote

Due to limitations of templates in Mediawiki which prevent templates from being nested (e.g., {{sidenote|left|See also {{bug|123456}}.}}, where the end of the inner template is incorrectly parsed as the end of the outer template), this template should no longer be used. Instead, use the following:

<div class="side-note-left">...</div> <!-- for a left-floated sidebar -->
<div class="side-note-right">...</div> <!-- for a right-floated sidebar -->

[edytuj] Zobacz także