Templat:Imbox: Perbedaan antara revisi
Konten dihapus Konten ditambahkan
update |
Hidayatsrf (bicara | kontrib) perbarui +uji coba modul lua |
||
Baris 1: | Baris 1: | ||
{{#invoke:Message box|imbox}}<noinclude> |
|||
<table class="{{#if:{{yesno|{{{plainlinks|yes}}}}}|plainlinks}} imbox |
|||
{{documentation}} |
|||
{{#switch:{{{type|}}} |
|||
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> |
|||
| speedy = imbox-speedy |
|||
| delete = imbox-delete |
|||
| content = imbox-content |
|||
| style = imbox-style |
|||
| move = imbox-move |
|||
| protection = imbox-protection |
|||
| license = imbox-license |
|||
| featured = imbox-featured |
|||
| notice <!-- notice = default --> |
|||
| #default = imbox-notice |
|||
}} {{{class|}}}" style="{{{style|}}}"> |
|||
<tr> |
|||
{{#ifeq:{{{image|}}}|none |
|||
| <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. --><td class="mbox-empty-cell"></td> |
|||
| <td class="mbox-image"> |
|||
{{#if:{{{image|}}} |
|||
| {{{image}}} |
|||
| {{#switch:{{{type|}}} |
|||
| speedy = [[Image:Imbox speedy deletion.png|40x40px|alt=|link=]] |
|||
| delete = [[Image:Imbox deletion.png|40x40px|alt=|link=]] |
|||
| content = [[Image:Imbox content.png|40x40px|alt=|link=]] |
|||
| style = [[Image:Edit-clear.svg|40x40px|link=|alt=]] |
|||
| move = [[Image:Imbox move.png|40x40px|alt=|link=]] |
|||
| protection = [[Image:Imbox protection.png|40x40px|alt=|link=]] |
|||
| license = [[Image:Imbox license.png|40x40px|alt=|link=]] |
|||
| featured = [[Image:Imbox featured.png|40x40px]] |
|||
| notice <!-- notice = default --> |
|||
| #default = [[Image:Imbox notice.png|40x40px|alt=|link=]] |
|||
}} |
|||
}}</td> |
|||
}} |
|||
<td class="mbox-text" style="{{{textstyle|}}}"> {{{text}}} </td> |
|||
{{#if:{{{imageright|}}} |
|||
| <td class="mbox-imageright"> {{{imageright}}} </td> |
|||
}} |
|||
</tr> |
|||
{{#if:{{{below|}}} |
|||
| <tr><td colspan={{#if:{{{imageright|}}}|3|2}} class="mbox-text" style="{{{textstyle|}}}"> {{{below}}} </td></tr> |
|||
}} |
|||
</table><!-- Detect and report usage with faulty "type" parameter: |
|||
-->{{#switch:{{{type|}}} |
|||
| <!-- No type fed, is also valid input --> |
|||
| speedy |
|||
| delete |
|||
| content |
|||
| style |
|||
| move |
|||
| protection |
|||
| license |
|||
| featured |
|||
| notice = <!-- Do nothing, valid "type" --> |
|||
| #default = <div style="text-align: center;">This message box is using an invalid "type={{{type|}}}" parameter and needs fixing.</div>[[Category:Wikipedia message box parameter needs fixing|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace --> |
|||
}}<!-- |
|||
--><includeonly>{{#ifeq:{{BASEPAGENAME}}|{{SUBPAGENAME}}|{{#ifeq:{{NAMESPACE}}|Template|[[Category:File message boxes]]}}}}</includeonly><!-- |
|||
--><noinclude> |
|||
---- |
|||
Ini adalah templat dasar untuk '''kotak info berkas''' seperti {{tl|DU}} dll. Cara penggunaannya sama persis dengan {{tl|ambox}}. |
|||
{{Templat-templat kotak pesan}} |
|||
[[Kategori:Templat meta Wikipedia]] |
|||
{{templat berisiko tinggi|small=yes}} |
|||
[[Kategori:Templat lisensi gambar|{{PAGENAME}}]] |
|||
[[en:Template:Imbox]] |
|||
</noinclude> |
</noinclude> |
Revisi terkini sejak 28 November 2017 16.48
Templat ini digunakan pada 905.000+ halaman, atau sekira 24% dari keseluruhan halaman halaman. Untuk mencegah suntingan mengganggu skala besar dan beban peladen, setiap perubahan perlu diuji di subhalaman /bak pasir atau /kasus uji templat, atau subhalaman pengguna Anda. Perubahan yang diuji dapat ditambahkan ke halaman ini dalam satu suntingan. Pertimbangkan untuk mendiskusikan perubahan di halaman pembicaraan sebelum mengimplementasikannya. |
Templat ini menggunakan Lua: |
Templat-templat kotak pesan | |
---|---|
templat | context |
{{Ambox}} | artikel |
{{Cmbox}} | kategori |
{{Imbox}} | gambar |
{{Tmbox}} | pembicaraan |
{{Fmbox}} | footer / header |
{{Ombox}} | halaman lain |
{{Mbox}} | auto-detect |
{{Asbox}} | stub artikel |
{{Dmbox}} | disambiguasi |
Templat ini adalah templat meta {{Imbox}} ([I]mage [m]essage [box]).
Templat ini digunakan untuk membuat template kotak pesan untuk halaman berkas (gambar), seperti {{cleanup-image}} dll. Templat ini menawarkan beberapa warna yang berbeda, menggunakan gambar default jika tidak ada parameter gambar yang diberikan dan memiliki beberapa fitur lain.
Template ini bekerja hampir persis seperti {{Ambox}} dan menggunakan parameter yang sama.
Penggunaan
Contoh sederhana:
{{Imbox |text=Some text.}}
Some text. |
Contoh kompleks:
{{Imbox | type = style | style = width:400px; | image = [[File:Emblem-question-yellow.svg|40px]] | textstyle = font-style:italic; font-weight:bold; color:red; | text = The message body text. }}
The message body text. |