User:Wildgoosespeeder/MediaLink: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
m (Text replacement - "mww:" to "mw:")
m (Text replacement - "{{tem|!}}" to "<nowiki>{{!}}</nowiki>")
Line 69: Line 69:


===Other===
===Other===
Uses <code>{{tem|!}}</code>. Also hides media prefix usage with <nowiki><span></nowiki> tag and a simple CSS code. Special code implemented if a red link results from the file string specified.
Uses <code><nowiki>{{!}}</nowiki></code>. Also hides media prefix usage with <nowiki><span></nowiki> tag and a simple CSS code. Special code implemented if a red link results from the file string specified.
</noinclude>
</noinclude>

Revision as of 17:50, May 30, 2024

Warning.svg
ATTENTION EDITORS If you are moving files that this page links to, you have my permission to ask a sysop to change the link. If you are replacing images that this page links to instead, please leave me a message to give me a heads-up. Thank you! Wildgoosespeeder (talk) (Stats - Contribs)

Template:PArchive

Usage

Template idea for the prefix Media:.

Media: vs. :File:

Both prefixes display a link instead of embedding the image itself but there are some key differences:

Prefix Sample Special:UnusedFiles prevention Provides a file page link Provides a special link to Special:Upload if red link is detected
Media: Media:MK8 Electrodrome Alternate Screen.png
Media:aeilsdfilasjdl.png
Check mark.svg X mark.svg Check mark.svg
:File: File:MK8 Electrodrome Alternate Screen.png
File:aeilsdfilasjdl.png
X mark.svg Check mark.svg X mark.svg

That's what this template addresses by bring the best of both worlds together. This template should be used in main articles only!

Use Cases

{{media link}} testing for bugs:

MediaWiki parsing Code
File:MK8 Electrodrome Alternate Screen.pngMedia:MK8 Electrodrome Alternate Screen.png {{media link|MK8 Electrodrome Alternate Screen.png}}
File:MK8 Electrodrome Alternate Screen.pngMedia:MK8 Electrodrome Alternate Screen.png {{media link|MK8 Electrodrome Alternate Screen.png|}}
testMedia:MK8 Electrodrome Alternate Screen.png {{media link|MK8 Electrodrome Alternate Screen.png|test}}
[[Media:|test]] {{media link||test}}
[[Media:|File:]] {{media link||}}
[[Media:|File:]] {{media link|}}
[[Media:{{{1}}}|File:{{{1}}}]] {{media link}}
File:aeilsdfilasjdl.png {{media link|aeilsdfilasjdl.png}}
File:aeilsdfilasjdl.png {{media link|aeilsdfilasjdl.png|}}
test {{media link|aeilsdfilasjdl.png|test}}

Other

Uses {{!}}. Also hides media prefix usage with <span> tag and a simple CSS code. Special code implemented if a red link results from the file string specified.