Plantilla:Val: diferència entre les revisions
Salta a la navegació
Salta a la cerca
Cap resum de modificació |
m (Text replacement - "[[Imatge:" to "[[Image:") |
||
Línia 1: | Línia 1: | ||
<includeonly>[[ | <includeonly>[[Image:Star_{{#ifeq: {{#expr: {{#if: {{{valor|}}} | floor {{{valor}}} | 0}} > 0 and {{#if: {{{valor|}}} | floor {{{valor}}} | 0}} < 6 }} | 1 | plena | buida }}.png|{{#ifeq: {{#expr: {{#if: {{{tamany|}}} | {{{tamany}}} | 0 }} > 0 and {{#if: {{{tamany|}}} | {{{tamany}}} | 0 }} < 100 }} | 1 | {{#expr: {{{tamany}}} round 0}} | 12 }}px]]<!-- | ||
-->[[ | -->[[Image:Star_{{#ifeq: {{#expr: {{#if: {{{valor|}}} | floor {{{valor}}} | 0}} > 1 and {{#if: {{{valor|}}} | floor {{{valor}}} | 0}} < 6 }} | 1 | plena | buida }}.png|{{#ifeq: {{#expr: {{#if: {{{tamany|}}} | {{{tamany}}} | 0 }} > 0 and {{#if: {{{tamany|}}} | {{{tamany}}} | 0 }} < 100 }} | 1 | {{#expr: {{{tamany}}} round 0}} | 12 }}px]]<!-- | ||
-->[[ | -->[[Image:Star_{{#ifeq: {{#expr: {{#if: {{{valor|}}} | floor {{{valor}}} | 0}} > 2 and {{#if: {{{valor|}}} | floor {{{valor}}} | 0}} < 6 }} | 1 | plena | buida }}.png|{{#ifeq: {{#expr: {{#if: {{{tamany|}}} | {{{tamany}}} | 0 }} > 0 and {{#if: {{{tamany|}}} | {{{tamany}}} | 0 }} < 100 }} | 1 | {{#expr: {{{tamany}}} round 0}} | 12 }}px]]<!-- | ||
-->[[ | -->[[Image:Star_{{#ifeq: {{#expr: {{#if: {{{valor|}}} | floor {{{valor}}} | 0}} > 3 and {{#if: {{{valor|}}} | floor {{{valor}}} | 0}} < 6 }} | 1 | plena | buida }}.png|{{#ifeq: {{#expr: {{#if: {{{tamany|}}} | {{{tamany}}} | 0 }} > 0 and {{#if: {{{tamany|}}} | {{{tamany}}} | 0 }} < 100 }} | 1 | {{#expr: {{{tamany}}} round 0}} | 12 }}px]]<!-- | ||
-->[[ | -->[[Image:Star_{{#ifeq: {{#expr: {{#if: {{{valor|}}} | floor {{{valor}}} | 0}} > 4 and {{#if: {{{valor|}}} | floor {{{valor}}} | 0}} < 6 }} | 1 | plena | buida }}.png|{{#ifeq: {{#expr: {{#if: {{{tamany|}}} | {{{tamany}}} | 0 }} > 0 and {{#if: {{{tamany|}}} | {{{tamany}}} | 0 }} < 100 }} | 1 | {{#expr: {{{tamany}}} round 0}} | 12 }}px]]<!-- | ||
--></includeonly><noinclude> | --></includeonly><noinclude> |
Revisió de 14:13, 3 juny 2014
- ús: {{Val|valor=|tamany=}}
- tema | en #if: http://www.mediawiki.org/wiki/Help:Parser_functions_in_templates
- si no es passa valor, el valor no és numèric, valor = , valor = 0 o valor > 5, el resultat seran 0 estrelles; si es posen decimals (.) agafarà l'enter:
sense valor | |
valor=4 | |
valor=a | |
valor=2,1 | |
valor=2.9 | |
valor=6 | |
valor=0 | |
valor= |
- si no es passa tamany, el tamany no és numèric, tamany = , tamany = 0 o tamany > 99, el tamany serà de 12px; si es posen decimals (.) arrodonirà (no entén px decimals):
sense tamany | |
tamany=25 | |
tamany=a | |
tamany=25,6 | |
tamany=25.6 | |
tamany=600 | |
tamany=0 | |
tamany= |