5,838
edits
No edit summary |
No edit summary |
||
Line 28: | Line 28: | ||
*Follow the instructions below for the PHP version. | *Follow the instructions below for the PHP version. | ||
== Alternative JavaScript == | == Alternative JavaScript == | ||
[[User:Sfws| | [[User:Sfws|Sfws]] 12:15, 31 December 2012 (UTC) | ||
*An [http://sandaysoft.com/forum/viewtopic.php?f=18&t=8690 alternative Javascript/jQuery solution] is in the 3rd party tools | *An [http://sandaysoft.com/forum/viewtopic.php?f=18&t=8690 alternative Javascript/jQuery solution] is in the 3rd party tools forum. | ||
* | *Like the revised PHP version above, the alternative JavaScript version works correctly at the start of a new year (for the forum version the ''default year reflects the latest year on the dayfile.txt'', not (as the original version uses) the current calendar year in the viewer's time zone). | ||
*Also like the revised PHP version, the alternative JavaScript version will pass validation, as all the coding is to the latest standards (ECMA-292, CSS3, HTML5). The original PHP and JS versions below, use non-standard attributes to handle for example the highlighting facility. | *Also like the revised PHP version, the alternative JavaScript version will pass validation, as all the coding is to the latest standards (ECMA-292, CSS3, HTML5). The original PHP and JS versions below, use non-standard attributes to handle for example the highlighting facility. | ||
*Unlike the original version below, the alternative JavaScript version only reads the ''' | *Unlike the original version below, the alternative JavaScript version only reads the '''dayfile.txt''' ''once'', however many times you choose a different data set (called category in the forum) or a different year. It also ''avoids redrawing the table if the year is changed''. So the alternative is thus considerably faster, especially with large dayfile.txt files (and changes of data set or year). | ||
*For ease of customisation, the forum version uses a different sequence in ''''label_items'''', and includes the ability to apply your own formatting according to value for any selected dataset. The forum example includes colour rainfall rate according to intensity groups used by UK Meteorological Office. | *For ease of customisation, the forum version uses a different sequence in ''''label_items'''', and includes the ability to apply your own formatting according to value for any selected dataset. The forum example includes colour rainfall rate according to intensity groups used by UK Meteorological Office. | ||
*If you select the new version, it includes a CSS, but you may want to combine that with your existing CSS to make the new page match your existing pages. It includes HTML, but again that will need tailoring to match your other pages, but the HTML in the forum does offer the ability to display the raw dayfile.txt if JavaScript is not enabled in the viewer's browser. | *If you select the new version, it includes a CSS, but you may want to combine that with your existing CSS to make the new page match your existing pages. It includes HTML, but again that will need tailoring to match your other pages, but the HTML in the forum does offer the ability to display the raw dayfile.txt if JavaScript is not enabled in the viewer's browser. | ||
== Original Fileset == | == Original Fileset == |
edits