wiki:aw:configure
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| wiki:aw:configure [2025/10/03 15:52] – Neil | wiki:aw:configure [2025/10/20 08:32] (current) – [Dynamic Configuring] Neil | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Configuring the site ====== | ====== Configuring the site ====== | ||
| <WRAP nicebox teal> | <WRAP nicebox teal> | ||
| - | **Like all previous versions of the alternative website, all settings are now held in one place - the cmxConfig object held in the <color # | + | **Like all previous versions of the alternative website, all settings are now held in one place - the cmxConfig object held in the <color # |
| - | This object holds the location of the menu to use, the location of your data, the path and name of your menu, the location of your NOAA Reports and other features that the website uses. This object is stored locally on your machine as ' | + | This object holds the location of the menu to use, the location of your data, the path and name of your menu, the location of your NOAA Reports and other features that the website uses. This object is stored locally on your machine as ' |
| </ | </ | ||
| - | ===== Information | + | ===== Initial Configuration |
| - | Before any page is fully loaded your browsers current Session Storage is checked to see if a copy of the cmxConfig object already exists, if it does, it is used to configure the page. If it does not not then it is created. | + | Before any page is fully loaded your browsers current Session Storage is checked to see if a copy of the cmxConfig object already exists, if it does, it is used to configure the page. If it does not not then it is created. This is then used throughout the site to access data, theme colours and other configurable options. |
| - | Below is an explanation of all entries. | + | Below is an explanation of the <color # |
| <WRAP group> | <WRAP group> | ||
| <WRAP twothirds column> | <WRAP twothirds column> | ||
| - | <WRAP nicebox | + | <WRAP nicebox |
| - | === Charts | + | ==== Data ==== |
| - | This is used dynamically by the site to record | + | This points to the location of your ***.json** data files((and the **realtimegauges.txt** file)) uploaded by CumulusMX. |
| - | === Records === | + | ++++ See more | |
| - | Again this is dynamically changed by the website based on the last set of records | + | If the entry is blank, it is assumed to be the root directory |
| + | If your site is **not** in the root directory, | ||
| - | === Custom === | + | * Entries that start with **/** will be an absolute path to your data. |
| - | <wrap info> | + | * Other initial characters will interpret |
| - | This area is used to configure user settings. | + | * See [[:wiki:aw:Config-Detail|detailed information]] with images. |
| + | ++++ | ||
| - | ==== Data ==== | + | ==== NOAA Reports |
| - | This points to the location of your .json data files((and the **realtimegauges.txt** file)) uploaded by CumulusMX. The default location is the same as the pages. | + | Unlike general |
| - | === Menu === | + | |
| - | Theis should be used to point to the javascript manu file used to drive all the menus on the site. Its default value is **js/ | + | |
| - | === NOAA Reports === | + | |
| - | If you publish | + | |
| - | === The Gull === | + | |
| - | As in the AI, the seagull can be animated. | + | |
| - | <wrap info> | + | ==== Menu ==== |
| + | This should be used to point to the javascript menu file used to drive all the menus on the site. Unless you use your own modified menu, there should be little need to edit this. Its default value is **js/ | ||
| + | |||
| + | === Custom === | ||
| + | This area is used to configure other user settings. | ||
| </ | </ | ||
| Line 38: | Line 38: | ||
| <WRAP third column> | <WRAP third column> | ||
| === The cmxConfig object === | === The cmxConfig object === | ||
| - | <code javascript> | ||
| - | CMXConfig = { | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | }, | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | }, | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | } | ||
| - | } | ||
| - | </ | ||
| - | <WRAP hide> | ||
| <code javascript> | <code javascript> | ||
| cmxConfig = { | cmxConfig = { | ||
| Line 99: | Line 72: | ||
| </ | </ | ||
| </ | </ | ||
| - | </ | + | ==== Non-critical entries ==== |
| - | < | + | < |
| - | ==== The remaining entries ==== | + | === The Gull === |
| + | As in the AI, the seagull is animated. | ||
| - | At the end of the CMXConfig object there are two more groups of settings. | + | ++++ More | |
| + | **Animation**:< | ||
| + | * **gull-FadeIn**< | ||
| + | * **gull-GrowUp**< | ||
| + | * **gull-SlideIn-from-Left**< | ||
| + | * **gull-SlideIn-from-Right**< | ||
| - | They store the last chart or the last record set viewed in both cases. | + | **Speed**:< |
| + | **OnTop**:<wrap indent> | ||
| + | </ | ||
| + | ++++ | ||
| - | === Bonus Feature | + | ==== Charts & Records |
| + | Both these entries are dynamic in that they are used by the site to record the last **Trends** or **Historic** chart or **Monthly** or **All Records** recordset viewed so that when a visitor returns to them, the same chart / recordset is displayed. | ||
| + | === Charts === | ||
| + | The charts section can be used to dictate which chart is displayed when a visitor first views the respective page. | ||
| + | ++++ See more | | ||
| + | If **you** set them in cmxConfig then the chart you set will be the one visitors see first. | ||
| - | One bonus of the above is that you can set the default chart or record set viewed when a visitor initially views your site by entering the chart or record set **ID** on lines <color brown>**44, 45** and **48 or 49**</color>. Valid IDs are as shown below: | + | **Trends**: <wrap indent>' |
| - | **Trends**: ' | + | **Historic**: |
| - | + | ||
| - | **Historic**: | + | |
| Of course, if your system does not generate a chart it is pointless to force it to display by default. | Of course, if your system does not generate a chart it is pointless to force it to display by default. | ||
| + | ++++ | ||
| + | </ | ||
| + | ==== Dynamic Configuring ==== | ||
| + | <WRAP nicebox red> | ||
| + | Previously I included a command in **page-manager.js** to clear the sessionStorage on every page load. I have not included this in this version although it is still a valid command.\\ | ||
| + | ++ See more | | ||
| + | You can still add this command to **page-control.js** if you want. Add the following before line 29 and the session storage area will be cleared on every page load making any changes current. | ||
| - | As the Records pages already select the most appropriate record set, I have not included the options for these but there is no reason why they cannot be used. | + | **%%sessionStorage.clear()%%** |
| + | <wrap alert 50% center>< | ||
| + | |||
| + | ++ | ||
| + | |||
| + | My preferred method is to use the **Developer Tools** available in most browsers and to edit the sessionStorage variable directly. | ||
| + | |||
| + | If this is not possible, for whatever reason, simply close the browser and reload the page. The session variable will have been deleted and whatever you have stored in the **page-control.js** cmxConfig variable will be used. | ||
| </ | </ | ||
| - | <WRAP nicebox | + | ===== Dashboard Information Panel ===== |
| - | **In order to make the changes you make active for you without having to start a new browser session, you can uncomment line 14** - | + | <WRAP nicebox |
| - | // | + | The contents of this panel can now be changed without editing |
| - | This will force the browser to store a new CMXConfig object when you refresh a page or view a new one. | + | < |
| - | < | + | === You should edit this file to include |
| - | </ | + | </ |
| + | A new **// | ||
| + | </ | ||
wiki/aw/configure.1759506741.txt.gz · Last modified: by Neil
