AnnualDataSummary: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
2,138 bytes added ,  20:44, 13 April 2018
no edit summary
No edit summary
No edit summary
Line 29: Line 29:
== Alternative JavaScript ==
== Alternative JavaScript ==
This section only is by [[User:Sfws|Sfws]] ([[User talk:Sfws|talk]]) 00:53, 18 May 2013 (PDT)
This section only is by [[User:Sfws|Sfws]] ([[User talk:Sfws|talk]]) 00:53, 18 May 2013 (PDT)
 
*An [http://sandaysoft.com/forum/viewtopic.php?f=18&t=8690 alternative Javascript/jQuery solution] is in the 3rd party tools sub forum within the Cumulus forum and it offers the following advantages:
An [http://sandaysoft.com/forum/viewtopic.php?f=18&t=8690 alternative Javascript/jQuery solution] is in the 3rd party tools sub forum within the Cumulus forum and its advantages are fully described in a file within the packageThey include standards compliance, better integration with standard Cumulus pages, statistical additions to the bottom of each month's column,  and easier tailoring to your preferences on wording, language, and text colouring.
*The ''default year reflects the latest year on the dayfile.txt''. (The original DAJ version uses the current calendar year in the viewer's time zone).
 
*Also like the revised 1.2 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, my alternative provides highlighting with standard-compliant coding.
One site using in January 2013 a variant based on this alternative code, with its own look to the page, is [http://sassafras.id.au/projects/weather/dailyrecords.shtml found here].
*The alternative JavaScript versions is considerably faster, especially with large dayfile.txt files (and changes of data set or year) as ''it will only read the [[dayfile.txt]] once'', however many times you choose a different data set (called category in the forum versions) or a different year as it ''avoids redrawing the table if the year is changed''.
*From May 2013 it ''adds minimum and maximum for each month to the bottom of the table'' as an alternative to looking at each individual day.
*By placing a redesigned 'label_items' in the HTML (there it is much easier to edit), my newer version makes it easier to add new criterions and adapt to any future changes in [[dayfile.txt]]. For greater ease of customisation, the forum version uses a different column sequence in ''''label_items''''.
*The script ''simplifies the ability to apply your own formatting according to value for any selected category'', selecting category by its column in the dayfile.txt (the DAJ version below selects by an abbreviated dataset name). This code appears in the un-minimised part of the script. The forum example includes colouring the rainfall rate according to intensity groups used by UK Meteorological Office.
*A number of headings and messages are defined in the HTML, but used by the script. This arrangement makes the revised version more informative, but ''improves the ability to tailor to your preferences on wording and language''.
*The latest version includes a CSS based on tailoring the standard Cumulus one, but you may want to make the new page match your existing pages.  It includes HTML compatible with standard Cumulus pages (it does not need any Cumulus processing), but again that may 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''.
*One site using in January 2013 a variant based on this alternative code, with its own look to the page, is [http://sassafras.id.au/projects/weather/dailyrecords.shtml found here].


== Original Fileset ==
== Original Fileset ==
5,838

edits

Navigation menu