Difference between revisions of "Template:Sec link auto"
From Self-sufficiency
(Adding a home cooked URL encode that actually works for Wikimedia links.) |
(Adding "image=no/yes" function.) |
||
Line 1: | Line 1: | ||
{{#ifeq: {{SERVERNAME}} | secure.wikimedia.org | {{#ifeq: {{SERVERNAME}} | secure.wikimedia.org | ||
− | | [https://secure.wikimedia.org/{{#switch: {{lc: {{{1|}}} }} | + | | {{#switch: {{lc: {{{image|}}} }} |
+ | | yes <!--Supress CSS icon, to no get double icon--> | ||
+ | | no = <span class="plainlinks"> | ||
+ | }}[https://secure.wikimedia.org/{{#switch: {{lc: {{{1|}}} }} | ||
| wikipedia | w = wikipedia/{{#if:{{{lang|}}}|{{{lang}}}|{{CONTENTLANG}}}} | | wikipedia | w = wikipedia/{{#if:{{{lang|}}}|{{{lang}}}|{{CONTENTLANG}}}} | ||
| wiktionary | wikt = wiktionary/{{#if:{{{lang|}}}|{{{lang}}}|{{CONTENTLANG}}}} | | wiktionary | wikt = wiktionary/{{#if:{{{lang|}}}|{{{lang}}}|{{CONTENTLANG}}}} | ||
Line 18: | Line 21: | ||
| testwiki = wikipedia/test | | testwiki = wikipedia/test | ||
| #default = wikipedia/{{#if:{{{1|}}}|{{{1}}}|{{CONTENTLANG}}}} <!-- Other language edition --> | | #default = wikipedia/{{#if:{{{1|}}}|{{{1}}}|{{CONTENTLANG}}}} <!-- Other language edition --> | ||
− | }}/wiki/{{PAGENAMEE:Template:{{{2|}}} }} {{#if:{{{3|}}} | + | }}/wiki/{{PAGENAMEE:Template:{{{2|}}} }} {{#if: {{{3|}}} |
| {{{3}}} | | {{{3}}} | ||
− | | {{#if:{{{1|}}}|{{{1}}}|{{CONTENTLANG}}}}:{{#if:{{{lang|}}} | + | | {{#if: {{{1|}}} | {{{1}}} | {{CONTENTLANG}} }}:{{#if: {{{lang|}}} |
| {{#if:x| {{{lang}}} }}: | | {{#if:x| {{{lang}}} }}: | ||
}}{{#if:x| {{{2|}}} }} | }}{{#if:x| {{{2|}}} }} | ||
− | }}] | + | }}]{{#switch: {{lc: {{{image|}}} }} |
+ | | no = </span> | ||
+ | | yes = </span>[[File:Lock icon.gif|16x13px]] | ||
+ | }} | ||
| <!--Not on the secure server, make a normal link--> | | <!--Not on the secure server, make a normal link--> |
Revision as of 18:24, 28 November 2009
[edit]
Documentation