Diferencia entre revisiones de «Plantilla:URL»

De Familia Sanchez Arjona
Saltar a: navegación, buscar
(Add x prefix to avoid difficulties with URLs starting with a number, see talk page.)
(Hopefully this fixes the bug)
Línea 4: Línea 4:
 
       -->[{{#if:1|{{{1|}}}}} {{#if:{{{2|}}}|{{#if:1|{{{2|}}}}}|{{#if:1|{{{1|}}}}}}}]<!-- These "#if:1" pseudo-tests (always true) allow trimming leading spaces in their text parameter
 
       -->[{{#if:1|{{{1|}}}}} {{#if:{{{2|}}}|{{#if:1|{{{2|}}}}}|{{#if:1|{{{1|}}}}}}}]<!-- These "#if:1" pseudo-tests (always true) allow trimming leading spaces in their text parameter
 
   -->|<!--
 
   -->|<!--
       -->{{#switch:{{lc:{{#titleparts:{{{1|}}}|2}}}}<!--
+
       -->{{#switch:{{lc:{{#titleparts:{{{1|}}}|2}}}}
      -->|https:/<!--
+
        |https:/
      -->|http:/<!--
+
        |http:/
      -->|ftp:/=<!-- an FTP URL is a valid URI scheme and MUST NOT imply a default "http://" (as generated in the #default case)
+
        |ftp:/=<!-- Matches https:/ or http:/ or ftp:/
 
         -->[{{#if:1|{{{1|}}}}} <!-- This #if:1 allows trimming leading spaces in the full URL: {{{1|}}}
 
         -->[{{#if:1|{{{1|}}}}} <!-- This #if:1 allows trimming leading spaces in the full URL: {{{1|}}}
 
         -->{{#if:{{{2|}}}|{{#if:1|{{{2|}}}}}| <!-- This #if:1 allows trimming leading spaces in the specified display text : {{{2|}}}
 
         -->{{#if:{{{2|}}}|{{#if:1|{{{2|}}}}}| <!-- This #if:1 allows trimming leading spaces in the specified display text : {{{2|}}}
Línea 13: Línea 13:
 
               -->{{#ifeq:{{lc:{{padleft:|4|{{#titleparts:{{{1|}}}|1|3}}}}}}|www.<!--
 
               -->{{#ifeq:{{lc:{{padleft:|4|{{#titleparts:{{{1|}}}|1|3}}}}}}|www.<!--
 
               -->|{{Str right|{{#titleparts:{{{1|}}}|1|3}}|4}}<!--
 
               -->|{{Str right|{{#titleparts:{{{1|}}}|1|3}}|4}}<!--
               -->|{{#titleparts:{{{1|}}}||3}}<!--
+
               -->|{{#titleparts:{{{1|}}}|1|3}}<!--
 
               -->}}<!--
 
               -->}}<!--
 
             -->}}<!--
 
             -->}}<!--
             -->{{#if:{{#titleparts:{{{1|}}}||4}}<!-- rest of the ressource path
+
             -->{{#if:{{#titleparts:{{{1|}}}||4}}<!-- rest of the path
 
             -->|/{{#titleparts:{{{1|}}}||4}}<!--
 
             -->|/{{#titleparts:{{{1|}}}||4}}<!--
 
             -->}}<!--
 
             -->}}<!--
 
         -->}}<!--
 
         -->}}<!--
 
         -->]<!--
 
         -->]<!--
       -->|#default=<!-- Warning! this case implies a default "http://" URI scheme, and should NOT occur if there's another accepted URI scheme in the URL
+
       -->|#default=<!-- Not https:/ or http:/ or ftp:/
 
         -->[http://{{#if:1|{{{1|}}}}} <!-- This #if:1 allows trimming leading spaces in the full URL: {{{1|}}}
 
         -->[http://{{#if:1|{{{1|}}}}} <!-- This #if:1 allows trimming leading spaces in the full URL: {{{1|}}}
 
         -->{{#if:{{{2|}}}|{{#if:1|{{{2|}}}}}| <!-- This #if:1 allows trimming leading spaces in the specified display text : {{{2|}}}
 
         -->{{#if:{{{2|}}}|{{#if:1|{{{2|}}}}}| <!-- This #if:1 allows trimming leading spaces in the specified display text : {{{2|}}}
Línea 30: Línea 30:
 
               -->}}<!--
 
               -->}}<!--
 
             -->}}<!--
 
             -->}}<!--
             -->{{#if:{{#titleparts:{{{1|}}}||2}}<!-- rest of the ressource path
+
             -->{{#if:{{#titleparts:{{{1|}}}||2}}<!-- rest of the path
 
             -->|/{{#titleparts:{{{1|}}}||2}}<!--
 
             -->|/{{#titleparts:{{{1|}}}||2}}<!--
 
             -->}}<!--
 
             -->}}<!--

Revisión del 04:21 22 dic 2010

50px Template documentation[create]