Template talk:Red link: Difference between revisions
From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
(→ifexist function: new section) |
(→New coding: new section) |
||
Line 7: | Line 7: | ||
Like this: {{#ifexist:Pokémon world (Mystery Dungeon)|[[Pokémon world (Mystery Dungeon)]]|{{redlink|Pokémon world (Mystery Dungeon)}}}} (edit to see what I mean) | Like this: {{#ifexist:Pokémon world (Mystery Dungeon)|[[Pokémon world (Mystery Dungeon)]]|{{redlink|Pokémon world (Mystery Dungeon)}}}} (edit to see what I mean) | ||
I think it would work better, so you could see whether it actually exists. --[[User:Abcboy|Abcboy]] ([[User talk:Abcboy|talk]]) 15:49, 14 October 2012 (UTC) | I think it would work better, so you could see whether it actually exists. --[[User:Abcboy|Abcboy]] ([[User talk:Abcboy|talk]]) 15:49, 14 October 2012 (UTC) | ||
== New coding == | |||
I would like the coding to be this: | |||
<pre> | |||
<templatestyles src="Red link/colors.css" /><span class="plainlinks redlink">[{{fullurl:{{{1}}}|action=edit}} <span title="{{FULLPAGENAME:{{{1}}}}} {{int:parentheses|{{int:wikieditor-toolbar-tool-link-int-target-status-notexists}}}}">{{{2|{{{1}}}}}}</span>]</span> | |||
</pre> | |||
'''Explanation:''' | |||
* The <code><templatestyles></code> tag requires the extension [[mw:Extension:TemplateStyles|TemplateStyles]] to work. In the <code>src</code> parameter, you should specify from what wiki page the style sheet needs to be (defaults to the Template namespace; the page must have the <code>sanitized-css</code> content model). The page's content should be: | |||
<pre> | |||
span.redlink > a:link {color:#ba0000} | |||
span.redlink > a:visited {color:#c57d58} | |||
</pre> | |||
* Otherwise, the above content has to be added to the page [[MediaWiki:Common.css]] (only {{bp|administrators}} have the specific user right to do this). | |||
* The transclusion filter <code>int:</code> makes the transclusion <code>{{<nowiki />int:xyz}}</code> same as <code>{{<nowiki />MediaWiki:xyz}}</code>, but the content is adjusted to the user's interface language. Displays as ⧼xyz⧽ if {{red link|MediaWiki:xyz}} doesn't exist. | |||
** <span style="font-size: 2.5em">{{m|Protect|{{int:vector-action-protect}}!}}</span> | |||
** To change the above word, see the page in <span class="plainlinks">[{{fullurl:Template talk:Red link|uselang=fr}} French], [{{fullurl:Template talk:Red link|uselang=ja}} Japanese] and [{{fullurl:Template talk:Red link|uselang=pl}} Polish]</span>. | |||
* {‍{FULLPAGENAME}‍} will automatically apply capital letters when possible to the given page name. | |||
Hope that clears out things. <span lang="ja">[[User:TheICTLiker4|<span style="color:#333">'''TheI'''</span>]][[Special:Contributions/TheICTLiker4|<span style="color:#f30">'''CTLi'''</span>]][[User talk:TheICTLiker4|<span style="color:#bbb">'''ker4'''</span>]]</span> 13:49, 25 January 2020 (UTC) |
Revision as of 13:49, 25 January 2020
chould someone please remove the <font> tag? it is VERY outdated --Hanmac 08:31, 1 December 2010 (UTC)
ifexist function
Would it be possible to integrate the ifexist function? Like this: Pokémon world (Mystery Dungeon) (edit to see what I mean) I think it would work better, so you could see whether it actually exists. --Abcboy (talk) 15:49, 14 October 2012 (UTC)
New coding
I would like the coding to be this:
<templatestyles src="Red link/colors.css" /><span class="plainlinks redlink">[{{fullurl:{{{1}}}|action=edit}} <span title="{{FULLPAGENAME:{{{1}}}}} {{int:parentheses|{{int:wikieditor-toolbar-tool-link-int-target-status-notexists}}}}">{{{2|{{{1}}}}}}</span>]</span>
Explanation:
- The
<templatestyles>
tag requires the extension TemplateStyles to work. In thesrc
parameter, you should specify from what wiki page the style sheet needs to be (defaults to the Template namespace; the page must have thesanitized-css
content model). The page's content should be:
span.redlink > a:link {color:#ba0000} span.redlink > a:visited {color:#c57d58}
- Otherwise, the above content has to be added to the page MediaWiki:Common.css (only administrators have the specific user right to do this).
- The transclusion filter
int:
makes the transclusion{{int:xyz}}
same as{{MediaWiki:xyz}}
, but the content is adjusted to the user's interface language. Displays as ⧼xyz⧽ if MediaWiki:xyz doesn't exist. - {{FULLPAGENAME}} will automatically apply capital letters when possible to the given page name.
Hope that clears out things. TheICTLiker4 13:49, 25 January 2020 (UTC)