الفرق بين النسختين بتاع «قالب:Sec link auto»

تم إزالة 274 بايت ،  قبل 12 سنة
Nah, don't show syntax. Since we can link to the main pages for most projects, when only getting project name.
(Creating this "automatic secure server link" template.)
 
(Nah, don't show syntax. Since we can link to the main pages for most projects, when only getting project name.)
{{#ifeq: {{SERVERNAME}} | secure.wikimedia.org
{{#switch: <!--Empty or undefined-->
| [https://secure.wikimedia.org/{{#switch: {{lc: {{{1|}}} }}
| {{{1|}}}
| wikinewswikipedia | nw = wikinewswikipedia/{{#if:{{{lang|}}}|{{{lang}}}|{{CONTENTLANG}}}}
| {{{2|}}} =
| wikibookswiktionary | bwikt = wikibookswiktionary/{{#if:{{{lang|}}}|{{{lang}}}|{{CONTENTLANG}}}}
<!--No project or no pagename fed, show syntax-->
| wikiquotewikinews | qn = wikiquotewikinews/{{#if:{{{lang|}}}|{{{lang}}}|{{CONTENTLANG}}}}
<code><nowiki>{{sec link auto|project|pagename|text}}</nowiki></code>
| wikiversitywikibooks | vb = wikiversitywikibooks/{{#if:{{{lang|}}}|{{{lang}}}|{{CONTENTLANG}}}}
| #default =
| wikiquote | q = wikiquote/{{#if:{{{1lang|}}}|{{{1lang}}}|{{CONTENTLANG}}}}:{{#if:{{{lang|}}}
{{#ifeq: {{SERVERNAME}} | secure.wikimedia.org
| wikisource | mws = wikipedia/mediawikisources
| [https://secure.wikimedia.org/{{#switch: {{lc: {{{1|}}} }}
| wikipediawikispecies | wspecies = wikipedia/{{#if:{{{lang|}}}|{{{lang}}}|{{CONTENTLANG}}}}species
| wiktionarywikiversity | wiktv = wiktionarywikiversity/{{#if:{{{lang|}}}|{{{lang}}}|{{CONTENTLANG}}}}
| wikimedia | foundation | wmf = wikipedia/foundation
| wikinews | n = wikinews/{{#if:{{{lang|}}}|{{{lang}}}|{{CONTENTLANG}}}}
| testwikicommons = wikipedia/testcommons
| wikibooks | b = wikibooks/{{#if:{{{lang|}}}|{{{lang}}}|{{CONTENTLANG}}}}
| meta | metawikipedia | m = wikipedia/meta
| wikiquote | q = wikiquote/{{#if:{{{lang|}}}|{{{lang}}}|{{CONTENTLANG}}}}
| wikisource | sstrategy = wikipedia/sourcesstrategy
| wikispecies | speciesincubator = wikipedia/speciesincubator
| nostmw = wikipedia/nostalgiamediawiki
| wikiversity | v = wikiversity/{{#if:{{{lang|}}}|{{{lang}}}|{{CONTENTLANG}}}}
| wikimedia | foundation | wmfnost = wikipedia/foundationnostalgia
| commonstestwiki = wikipedia/commonstest
| #default = wikipedia/{{#if:{{{1|}}}|{{{1}}}|{{CONTENTLANG}}}} <!--Other language edition-->
| meta | metawikipedia | m = wikipedia/meta
}}/wiki/{{#if:x| {{{2|}}} }} {{#if:{{{3|}}}
| strategy = wikipedia/strategy
| {{{1|3}}}
| incubator = wikipedia/incubator
| {{#if:{{{1|}}}|{{{1}}}|{{CONTENTLANG}}}}:{{#if:{{{lang|}}}
| mw = wikipedia/mediawiki
| {{#if:x| {{{lang}}} }}:
| nost = wikipedia/nostalgia
}}{{#if:x| {{{2|}}} }}
| testwiki = wikipedia/test
}}]
| #default = wikipedia/{{#if:{{{1|}}}|{{{1}}}|{{CONTENTLANG}}}} <!--Other language edition-->
}}/wiki/{{#if:x| {{{2|}}} }} {{#if:{{{3|}}}
| {{{3}}}
| {{#if:{{{1|}}}|{{{1}}}|{{CONTENTLANG}}}}:{{#if:{{{lang|}}}
| {{#if:x| {{{lang}}} }}:
}}{{#if:x| {{{2|}}} }}
}}]
 
| <!--Not on the secure server, make a normal link-->
[[:{{#if:{{{1|}}}|{{{1}}}|{{CONTENTLANG}}}}:{{#if:{{{lang|}}}
| {{#if:x| {{{lang}}} }}:
}}{{#if:x| {{{2|}}} }}|{{#if:{{{3|}}}
| {{{2|3}}} =
| {{#if:{{{1|}}}|{{{1}}}|{{CONTENTLANG}}}}:{{#if:{{{lang|}}}
| {{#if:x| {{{lang}}} }}:
}}{{#if:x| {{{2|}}} }}|{{#if:{{{3|}}}
| {{{3}}}]]
| {{#if:{{{1|}}}|{{{1}}}|{{CONTENTLANG}}}}:{{#if:{{{lang|}}}
| {{#if:x| {{{lang}}} }}:
}}{{#if:x| {{{2|}}} }}
}}]]
}}
}}<noinclude>
 
0

تعديل