Small Padlock Icon

From MediaWiki.org
Jump to: navigation, search

if you want to use the small padlock icons what are used on protected pages on wikipedia, here is how to make them.

Contents

[edit] Testing

first lets test it out.

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

[edit] Changing it

<div style="position:absolute; z-index:50; right:25px; top:5px;" class="metadata topicon" id="featured-star">
These change where the icon appears on the page.


[[file:Padlock-red.svg|25px]]
This changes the image.


[[file:Padlock-red.svg|25px]]
This changes the size of the image. 25px is recommended as its the same size as wikipedia.


[[file:Padlock-red.svg|25px|Mouse over message]]
This makes a message appear when the mouse is over the icon.

[edit] 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.

[edit] Only Showing The Icon When A Template Is On A Page

To do this, make a template, for example, lets call it {{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.

[edit] NOTE

By adding a small icon or a protected template to a page does not mean its protected. Only users with the protect permision can protect pages.

[edit] Demo

You will only be able to see this section in the edit view.

Language: English  • Polski
Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox