5,838
edits
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
'Annual Data Summary' is a small tool to read the [[dayfile.txt]] produced by Cumulus and summarise this in a table showing a full years worth of data. | 'Annual Data Summary' is a small tool to read the [[dayfile.txt]] produced by Cumulus and summarise this in a table showing a full years worth of data. | ||
*The tool uses HTML and jQuery (a | *The tool uses HTML and jQuery (a language that produces Javascript) and includes a CSS file. | ||
*The JavaScript version does not require a webserver with PHP services enabled. (Many of the free hosting services do not offer PHP so this was a solution to that problem). | *The JavaScript version does not require a webserver with PHP services enabled. (Many of the free hosting services do not offer PHP so this was a solution to that problem). | ||
*The alternative is a PHP version (included so you have the option to use either). | *The alternative is a PHP version (included so you have the option to use either). | ||
Line 109: | Line 109: | ||
== Understanding the Basics == | == Understanding the Basics == | ||
The 'tool' relies on | The 'tool' relies on two files for successful operation.... datasummary.css (the style sheet) and either readDayfile.js (the JavaScript) or readDayfile.php (the PHP version). The third file, datasummary.html/php, is simply a carrier page to show the data. | ||
If you wish to use your own page to show the data on, do the following: | |||
*for the JS version | |||
* for | : In the <HEAD> section..... | ||
: In the < | |||
<pre><link rel="stylesheet" type="text/css" media="screen" href="datasummary.css" /> | <pre><link rel="stylesheet" type="text/css" media="screen" href="datasummary.css" /> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/ | <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.js" type="text/javascript"></script> | ||
: This loads the stylesheet; loads a jQuery library from Google servers rather than having the file on your server, | <script src="readDayfile.js" type="text/javascript"></script></pre> | ||
: This loads the stylesheet; loads a jQuery library from Google servers (rather than having the file on your server, note later versions of jQuery are available, but not supported by old versions of Internet Explorer, amend the '1.5' used by DAJ if you want to); and loads the Javascript to build the table | |||
: Once the page is loaded it runs readDayfile.js and will look for a DIV called 'tableData'; inserting the data table within it. You can change the DIV it inserts into (see above). | |||
*for the PHP version | |||
:you still need the jQuery library as above | |||
:use the code <pre><?php include('readDayfile.php');?></pre> | |||
Please note that the table needs a good amount of space to show a full year of data (at least 900 pixels unless you start reducing the font size!) | Please note that the table needs a good amount of space to show a full year of data (at least 900 pixels unless you start reducing the font size!) | ||
== Localization / Language == | == Localization / Language == |
edits