Template:Val: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>TheFeds
Adding prefix/suffix parameters, per discussion on talk page. Existing header/footer parameters will still work if provided (and p/s are not).
meta>TheFeds
Removing category update code and removing support for deprecated h and f parameters (per discussion).
Line 33: Line 33:
               -->|<!-- Is arg "up" and "upl" specified? NO
               -->|<!-- Is arg "up" and "upl" specified? NO
END ERROR CHECKING, START OUTPUT
END ERROR CHECKING, START OUTPUT
                 -->{{{p|{{{h|}}}}}}<!-- If p (prefix) is defined, display p; if p is not defined, but (the deprecated header parameter) h is defined, display h; if h is not defined, do nothing.
                 -->{{{p|}}}<!-- If p (prefix) is defined, display it.
                 -->{{val/delimitnum|{{{1|}}}}}<!-- Output arg1, formatted.
                 -->{{val/delimitnum|{{{1|}}}}}<!-- Output arg1, formatted.
                 -->{{#if: {{{2|}}}|<!-- Are there 2 or more arguments?
                 -->{{#if: {{{2|}}}|<!-- Are there 2 or more arguments?
Line 55: Line 55:
                 -->{{#if:{{{up|}}}|/{{val/units|{{{up}}}}}}}<!-- up=per units  
                 -->{{#if:{{{up|}}}|/{{val/units|{{{up}}}}}}}<!-- up=per units  
                 -->{{#if:{{{upl|}}}|/{{val/unitswithlink|{{{upl}}}}}}}<!-- up=per units with link
                 -->{{#if:{{{upl|}}}|/{{val/unitswithlink|{{{upl}}}}}}}<!-- up=per units with link
                 -->{{{s|{{{f|}}}}}}<!-- If s (suffix) is defined, display s; if s is not defined, but (the deprecated footer parameter) f is defined, display f; if f is not defined, do nothing.
                 -->{{{s|}}}<!-- If s (suffix) is defined, display it.
               -->}}<!-- End Is arg "up" and "upl" specified?
               -->}}<!-- End Is arg "up" and "upl" specified?
             -->}}<!-- End Is arg "u" and "ul" specified?
             -->}}<!-- End Is arg "u" and "ul" specified?
Line 64: Line 64:
   -->}}<!-- End Is arg2 not a valid number?
   -->}}<!-- End Is arg2 not a valid number?
-->}}<!-- End Is arg1 not a valid number?
-->}}<!-- End Is arg1 not a valid number?
--></span><!--
--></span></includeonly>
EXAMINING USAGE OF H AND F PARAMETERS:
-->{{#if:{{{h|}}}|[[Category:Pages using val header or footer parameters]]}}<!-- If h is defined, add to category.
-->{{#if:{{{f|}}}|[[Category:Pages using val header or footer parameters]]}}<!-- If f is defined, add to category.
--></includeonly>

Revision as of 06:14, 21 April 2009