Difference between revisions of "Template:Sec link auto"
From Self-sufficiency
(If MediaWiki has permission to unlink the padlock, then it is probably okay to do it here too.) |
(Adding the "anchor" and "query" parameters.) |
||
Line 1: | Line 1: | ||
{{#ifeq: {{SERVERNAME}} | secure.wikimedia.org | {{#ifeq: {{SERVERNAME}} | secure.wikimedia.org | ||
| {{#switch: {{lc: {{{image|}}} }} | | {{#switch: {{lc: {{{image|}}} }} | ||
− | | yes <!--Supress CSS icon, to | + | | yes <!--Supress CSS icon, to not get double icon--> |
| no = <span class="plainlinks"> | | no = <span class="plainlinks"> | ||
}}[https://secure.wikimedia.org/{{#switch: {{lc: {{{1|}}} }} | }}[https://secure.wikimedia.org/{{#switch: {{lc: {{{1|}}} }} | ||
Line 21: | 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:{{{query|}}} |
+ | | ?{{{query|}}} | ||
+ | | {{#if:{{{anchor|}}} | ||
+ | | #{{anchorencode:{{{anchor}}} }} | ||
+ | }} | ||
+ | }} {{#if: {{{3|}}} | ||
| {{{3}}} | | {{{3}}} | ||
| {{#if: {{{1|}}} | {{{1}}} | {{CONTENTLANG}} }}:{{#if: {{{lang|}}} | | {{#if: {{{1|}}} | {{{1}}} | {{CONTENTLANG}} }}:{{#if: {{{lang|}}} | ||
− | | {{#if:x| {{{ | + | | {{{lang}}}: |
− | }}{{#if: | + | }}{{#if:x| {{{2|}}} }}{{#if:{{{query|}}} |
+ | | ?{{{query|}}} | ||
+ | | {{#if:{{{anchor|}}} | ||
+ | | #{{{anchor}}} | ||
+ | }} | ||
+ | }} | ||
}}]{{#switch: {{lc: {{{image|}}} }} | }}]{{#switch: {{lc: {{{image|}}} }} | ||
| no = </span> | | no = </span> | ||
Line 32: | Line 42: | ||
| <!--Not on the secure server, make a normal link--> | | <!--Not on the secure server, make a normal link--> | ||
− | [ | + | {{#if:{{{query|}}} |
− | + | | <!--Make a query link--> | |
− | + | <span class="plainlinks">[{{fullurl: {{#if:{{{1|}}}|{{{1}}}|{{CONTENTLANG}}}}:{{#if: {{{lang|}}} | |
− | + | | {{{lang}}}: | |
− | | {{#if:{{{1|}}}|{{{1}}}|{{CONTENTLANG}}}}:{{#if:{{{lang|}}} | + | }}{{#if:x| {{{2|}}} }} |
− | | {{#if:x| {{{ | + | }}?{{{query|}}} {{#if: {{{3|}}} |
− | }}{{#if:x| {{{2|}}} }} | + | | {{{3}}} |
− | + | | {{#if:{{{1|}}}|{{{1}}}|{{CONTENTLANG}}}}:{{#if: {{{lang|}}} | |
+ | | {{{lang}}}: | ||
+ | }}{{#if:x| {{{2|}}} }}?{{{query|}}} | ||
+ | }}]</span> | ||
+ | | <!--Make a normal link--> | ||
+ | [[:{{#if:{{{1|}}}|{{{1}}}|{{CONTENTLANG}}}}:{{#if: {{{lang|}}} | ||
+ | | {{{lang}}}: | ||
+ | }}{{#if:x| {{{2|}}} }}{{#if:{{{anchor|}}} | ||
+ | | #{{{anchor}}} | ||
+ | }}|{{#if: {{{3|}}} | ||
+ | | {{{3}}} | ||
+ | | {{#if:{{{1|}}}|{{{1}}}|{{CONTENTLANG}}}}:{{#if: {{{lang|}}} | ||
+ | | {{{lang}}}: | ||
+ | }}{{#if:x| {{{2|}}} }}{{#if:{{{anchor|}}} | ||
+ | | #{{{anchor}}} | ||
+ | }} | ||
+ | }}]] | ||
+ | }} | ||
}}<noinclude> | }}<noinclude> | ||
Revision as of 12:58, 4 December 2009
[edit]
Documentation