User Tools

Site Tools


wiki:aw:configure

This is an old revision of the document!


Configuring the site

Like all previous versions of the alternative website, all settings are now held in one place - the cmxConfig object held in the page-manager.js file.

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 'SessionStorage' so is only stored for the current browsing session and will not be retained once the browser is closed.

Information

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.

Below is an explanation of all entries.

Charts

This is used dynamically by the site to record the last chart viewed. When you return to a charts page it displays same chart.

Records

Again this is dynamically changed by the website based on the last set of records you viewed.

Custom

Only applies to the latest version.
This area is used to configure user settings. This is covered in detail in the wiki:aw:cmxConfig

Data

This points to the location of your .json data files1) uploaded by CumulusMX. The default location is the same as the pages. If you want to upload you data to a different location then use this entry to point to it.

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/ows-menu.js. More details can be found on the page Creating your own menu.

NOAA Reports

If you publish NOAA reports from CumulusMX, this entry should point to the folder containing them. The default is 'Reports/' which is a sub-folder of the main upload folder.

The Gull

As in the AI, the seagull can be animated. The default animation is for it to fade in slowly over 5/10 seconds but by changing the 'Speed' value you can slow this down or speed it up. Setting the speed to zero effectively stops the animation and the seagull will appear instantly. Other keyframe animations are provided with a prefix gull.

Other entries are covered in the page devoted to wiki:aw:cmxConfig

The cmxConfig object

cmxConfig = {
    Charts: {
        Trends: '',
        Historic: '',
    },
    Custom: {
        StandardMenu: false,
        Dropdown: true,
        Theme: '',
       	Logo: '',
	BannerImage: '',
	StaticHead: true,
	StaticFoot: true,
	PaddingTop: '2',
	PaddingBottom: '1',
	PaddingUnits: 'em',
    },
    Data: '',
    Menu: 'js/ows-menu.js',
    NOAAReportPath: 'Reports/',
    Gull: {
        Animation: '',
        Speed: 10,
        OnTop: false,
    },
    Records: {
        All: '',
        Monthly: '',
    }
};

The remaining entries

At the end of the CMXConfig object there are two more groups of settings. These are used by, and change while a visitor is browsing your website. They relate to the charts - Trends and Historic, and Records - Monthly and All Records.

They store the last chart or the last record set viewed in both cases. This enables visitors to jump from page to page but still return to the last chart or record set that they were viewing. Note this only occurs in the current browsing session - these settings are lost when they close their browser window on your site.

Bonus Feature

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 44, 45 and 48 or 49. Valid IDs are as shown below:

Trends: 'temp', 'dailytemp', 'press', 'wind', 'windDir', 'rain', 'dailyrain', 'humidity', 'solar', 'sunhours', 'airquality', 'extratemp', 'extrahum', 'extradew', 'soiltemp', 'soilmoist', 'leafwet', 'usertemp' or 'co2'.

Historic: 'Temp', 'Press', 'Wind', 'Humidity', 'Rain', 'Solar', 'DegDays', 'TempSum', 'ChillHrs' or 'Snow'.

Of course, if your system does not generate a chart it is pointless to force it to display by default. However, the site will gracefully inform the user that no data has been found.

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.

Dynamic Configuring

In order to make the changes you make active for you without having to start a new browser session, you can uncomment line 14 -

//sessionStorage.clear()

This will force the browser to store a new CMXConfig object when you refresh a page or view a new one. Do remember to comment it again afterwards otherwise the Charts & Records feature won't work for visitors.

This no longer applies to the latest version

1)
and the realtimegauges.txt file
wiki/aw/configure.1760201271.txt.gz · Last modified: by Neil