Discovery Gaming Community
Timeline of Gallic history - Printable Version

+- Discovery Gaming Community (https://discoverygc.com/forums)
+-- Forum: Rules & Requests (https://discoverygc.com/forums/forumdisplay.php?fid=6)
+--- Forum: Site & Forum Feedback (https://discoverygc.com/forums/forumdisplay.php?fid=14)
+---- Forum: Discovery Wiki (https://discoverygc.com/forums/forumdisplay.php?fid=40)
+---- Thread: Timeline of Gallic history (/showthread.php?tid=37200)

Pages: 1 2 3


Timeline of Gallic history - tazuras - 04-15-2010

' Wrote:How does this template work? I mean, the automatic recount thing?
Well uh, the use of it is explained on the template page (Template:AGStimeline).

As for how it works:
Code:
|-
| style="text-align: center;" | {{#if: {{{1|}}} | ''{{{1}}}'' | ''{{#expr:{{{2}}} -84 }}''}} || style="text-align: center;" | {{#if: {{{1|}}} | ''{{#expr:{{{1}}} +84 }}'' | ''{{{2}}}''}} || {{{3}}}
|-
This translates as such. If someone enters a number (hopefully an AGS date) into the first template field, the template displays that date in the first table field and that date plus 84 in the table second field. If someone doesnt enter anything into the first template field (and hopefully enters an AS date into the second template field), the template displays the second template field minus 84 in the first table field and the second template field in the second table field.

Now i suppose i could add error checking if you really wanted, but when I was making it I felt it was simple enough that that wouldn't be necessary, also... I dont think any of the wiki templates have error checking...