Manual:小さい南京錠アイコン

From mediawiki.org
This page is a translated version of the page Manual:Small padlock icon and the translation is 67% complete.

If you want to use the small padlock icons which are used on protected pages on wikipedia, here is how to make them. You first must download the icons and upload them to your wiki.

テスト

まず試してみましょう。

いずれかのページに以下のコードを追加してください。

<div style="position:absolute; z-index:50; right:25px; top:5px;" class="metadata topicon"  id="featured-star">
[[file:Padlock-red.svg|25px]]
</div>

変更する

<div style="position:absolute; z-index:50; right:25px; top:5px;" class="metadata topicon" id="featured-star">

ページ内でのアイコンの表示位置を変更します。

[[file:Padlock-red.svg|25px]]

画像を変更します。

[[file:Padlock-red.svg|25px]]

画像のサイズを変更します。ウィキペディアと同じサイズの 25px にすることをお勧めします。

[[file:Padlock-red.svg|25px|Mouse over message]]

This makes a message appear when the mouse is over the icon.

Automatically appearing when a template is on the page

To make the small icon appear when a template is placed on the page, put the code for the small icon at the top of the template, and it will be added to a page when the template is placed on the page.

Only showing the icon when a template is on a page

これを行うにはテンプレートを作成します。例えば {{protectsmall}} という名前にしましょう。 When making this template, only add the code to the template and save. Now, when you add {{protectsmall}} it will only make a small icon appear.

注記

ページに小さいアイコンや保護されたテンプレートを追加することでそのページが保護されるわけではありません。 保護する権限がある利用者のみがページを保護できます。

デモ

デモのコード:

<div style="position:absolute; z-index:50; right:25px; top:5px;" class="metadata topicon"  id="featured-star">
[[file:Padlock-red.svg|25px|これはデモのアイコンです]]
</div>