HW3 Cookies Documentation
Contents:
HAMweather 3 can handle cookies much better than HW2. With HW3 you can control what exactly is stored and used upon each request to HAMweather. This ability allows you to do much more than just store the users zipcode etc, but it allows you to store a users options or favorites locations etc thus they can be used with in the templates to provide the data the use wants.
Normally you should not need to make any changes to begin using cookies with-in HW3.But there are 3 settings that can be set to either stop cookie usage or to provide better control over the server paths used when setting the cookies. The three ini file settings in the hw3.ini are under the [SystemSettings] section. The default settings are shown below:
[SystemSettings]
allow_cookies=1
server_name=
script_name=
cookie_expire=
In HW3 there is one HAMweather cookie. It is stored with the name "HW3". With in this one cookie there can be many individual parm/value combinations of which for this documentation we will call chips. So in summary there is on cookie used with the name "HW3" and this one cookie can have many chips with in it.
Now control over the cookie and which chips to set, delete and use is done via four parameters that you pass to HW3. The parameters are:
| uc (use chip) | |
| Syntax: | uc=parm1[,parm2] |
| Description: | If not set or set to
HWALL then all chips in the HW3 cookie will be used except for ones indicated
by nc not to be used. parm1 is the chip name to use. If more than one chip needs to be used then you can set uc equal to a comma separated list of chips to use |
| Example: | Single chip to be used:
All chips to be used:
Zipcode and ICAO chips to be used only:
|
| nc (not use chip) | |
| Syntax: | nc=parm1[,parm2] |
| Description: | If not set then all chips will be
used as indicated by uc. If set to HWALL then no chips will be used. parm1 is the chip name to use. If more than one chip needs to be used then you can set nc equal to a comma separated list of chips to use NOTE: That nc is given priority over uc, thus if uc=hwall and nc=hwall or both parameters specify the same chip, then the nc setting will be used. |
| Example: | Single chip not to be used:
All chips not to be used:
Zipcode and ICAO chips not to be used only:
|
| oc (override chip) | |
| Syntax: | oc=chip[|param] |
| Description: | Allows HW to
override the 'parameter' with the value of the specified 'chip' if
the chip exists. This feature is useful for allowing a users preset
override default settings. 'Chip' is the chip name to use and param is
the Form/Query string value to override if the 'chip' exists. If 'param'
is not specified then HW will use the chip name as the 'param' name. |
| Example: | Pass parameter will
be overrided by the 'radarview_option' chip if it exists:
|
| rc (remove chip) | |
| Syntax: | rc=parm1[,parm2] |
| Description: | Remove the designated chips from
the HW3 cookie. To remove all chips in the HW3 cookie, set rc=hwall. NOTE: That rc is given priority over sc, thus if both the rc and sc parameters specify the same chip, then the rc setting will be used. |
| Example: | Remove single chip to be used:
Remove all chips to be used:
Remove zipcode and ICAO chips to be used only:
|
| sc (set chip) | |
| Syntax: | sc=parm1[,parm2] |
| Description: | Set the designated chips from the
HW3 cookie. To set all chips in the HW3 cookie, set rc=hwall. NOTE: That rc is given priority over sc, thus if both the rc and sc parameters specify the same chip, then the rc setting will be used. |
| Example: | Set single chip to be used:
Set all chips to be used:
Set zipcode and ICAO chips to be used only:
|