Template:Val: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>TheFeds
Adding category check for header and footer parameters, per discussion on talk page. (Of course, revert this if it breaks things.)
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).
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
                 -->{{{h|}}}<!-- h=Header
                 -->{{{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.
                 -->{{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
                 -->{{{f|}}}<!-- f=Footer
                 -->{{{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.
               -->}}<!-- 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?

Revision as of 20:48, 13 April 2009