AnnualDataSummary: Difference between revisions

8 bytes removed ,  20:21, 13 April 2018
no edit summary
No edit summary
No edit summary
Line 178: Line 178:
<span style="color: red">The ''switch ($whatdata) { ... }'' part of the coding identifies the columns in dayfile.txt for the values to be displayed. Any change you make in the array, needs a corresponding change within this part of the script.  A typical case here reads</span>
<span style="color: red">The ''switch ($whatdata) { ... }'' part of the coding identifies the columns in dayfile.txt for the values to be displayed. Any change you make in the array, needs a corresponding change within this part of the script.  A typical case here reads</span>


<pre>case 'mintemp' : $tablelayout .= $label_items[1][2]; $dayfilecol=4; break;</pre>
"case 'mintemp' : $tablelayout .= $label_items[1][2]; $dayfilecol=4; break;",


<span style="color: red">so to add a new one, copy that line and paste it in again but in this new line replace 'mintemp' with whatever you have added as the first element in your new array row, replace '[1]' with square brackets round the number of your new array row (the first row is number zero) and finally replace '4' with the [[Dayfile.txt#List_of_fields_in_the_file|field number]] where the parameter you have added is found in dayfile.txt.</span>
<span style="color: red">so to add a new one, copy that line and paste it in again but in this new line replace 'mintemp' with whatever you have added as the first element in your new array row, replace '[1]' with square brackets round the number of your new array row (the first row is number zero) and finally replace '4' with the [[Dayfile.txt#List_of_fields_in_the_file|field number]] where the parameter you have added is found in dayfile.txt.</span>
5,838

edits