Template:DailyForecastLogRow: Difference between revisions

From Ephinea PSO Wiki
(Rephrasing)
(Adjusted parameters, will require a 2nd edit)
Line 1: Line 1:
|-
|-
|{{#ifeq:{{{1|}}}|date|{{subst:<noinclude/>#time:j F Y}}{{!}}{{!}}|}}|{{{job|}}}||{{{race|}}}||{{{sex|}}}<noinclude>
|{{subst:<noinclude/>#time:j F Y}}||{{{job|}}}||{{{race|}}}||{{{sex|}}}<noinclude>
==Usage==
==Usage==


Line 7: Line 7:
It is possible to omit fields other than date, but it is good practice to instead omit the field values if missing for today's forecast to prevent user-created errors.
It is possible to omit fields other than date, but it is good practice to instead omit the field values if missing for today's forecast to prevent user-created errors.


''This template can be substituted,''
''This template must be substituted,''
<br>
<br>
with the intention of writing to the page source table directly and, if the optional date field is used, print the at-time-of-submission day-month-year date properly.
with the intention of writing to the page source table directly and, if the optional date field is used, print the at-time-of-submission day-month-year date properly.
<br>
<br>
Note: This substitution currently exhibits undesired excess logging, but shouldn't have an adverse visual effect on tables.
 
==Examples==
==Examples==
<pre>
{| class="wikitable" style="text-align: center;"
! Profession !! Race !! Gender
{{DailyForecastLogRow|job=Forces|race=Newmans|sex=Males}}
|}
</pre>
{| class="wikitable" style="text-align: center;"
! Profession !! Race !! Gender
|-
{{DailyForecastLogRow|job=Forces|race=Newmans|sex=Males}}
|}
<pre>
<pre>
{| class="wikitable sortable" style="text-align: center;"
{| class="wikitable sortable" style="text-align: center;"
! Date !! class="unsortable" | Profession !! class="unsortable" | Race !! class="unsortable" | Gender
! Date !! class="unsortable" | Profession !! class="unsortable" | Race !! class="unsortable" | Gender
{{subst:DailyForecastLogRow|job=|race=Droids|sex=|date}}
{{subst:DailyForecastLogRow|job=|race=Droids|sex=}}
|}
|}
</pre>
</pre>
Line 34: Line 22:
! Date !! class="unsortable" | Profession !! class="unsortable" | Race !! class="unsortable" | Gender
! Date !! class="unsortable" | Profession !! class="unsortable" | Race !! class="unsortable" | Gender
|-
|-
|{{#ifeq:date|date|1 January 2022{{!}}{{!}}|}}|||Droids||
|{{#ifeq:|date|1 January 2022{{!}}{{!}}|}}|||Droids||
|}
|}
[[Category:Templates]]</noinclude>
[[Category:Templates]]</noinclude>

Revision as of 23:20, 1 January 2022

|- |{{subst:#time:j F Y}}||||||

Usage

Meant for simple insertion/replacement in the Daily Forecast log page, which will update the Main Page's Template:DailyForecast transclusion indirectly.
It is possible to omit fields other than date, but it is good practice to instead omit the field values if missing for today's forecast to prevent user-created errors.

This template must be substituted,
with the intention of writing to the page source table directly and, if the optional date field is used, print the at-time-of-submission day-month-year date properly.

Examples

{| class="wikitable sortable" style="text-align: center;"
! Date !! class="unsortable" | Profession !! class="unsortable" | Race !! class="unsortable" | Gender
{{subst:DailyForecastLogRow|job=|race=Droids|sex=}}
|}
Date Profession Race Gender
Droids