weather programs

advertisement
Menu definition and use!
version 2.30 2013-09-30
Definition of the menus
The menus are defined in an xml file in the root of the template:
/ weather2/ wsMenuData.xml
The xml structure is a further development of the one used in the Saratoga template set which also stored the menus in
an xml file.
<menu>
!
<item
caption=value
param=value . . . /> ! a menu of the uppermost level
!
<item
caption = value > !
start of a drop down menu
!
!
<item
caption=value param=value . . ./>!a menu item on the second level
!
!
<item
caption=value param=value . . ./>!a menu item on the second level
!
</item>!
end of the drop down menu
</menu>
Example:
<item caption="Live Data" >
!
<item !
nr="21" ! !
!
show="wdlPage"!
!
!
!
link="wdl/incWdlive.php"
!
!
!
caption="wd Live" !
!
!
!
title="WD Live Data"
!
!
!
/>
!
<item !
nr="25" ! !
!
show="yes"! !
!
!
!
link="gauges/gauge.php"
!
!
!
caption="steelseries"
!
!
!
title="Steel series"
!
!
!
head="gauges/topcss.php"
!
!
!
/>
</item>
parameter
omschrijving
nr
Unique number/string which identifies the page
Only this number is displayed in the browser address area
The name (or the link) of the script do not appear in the address area
show
Describes if the page is ("yes") shown or not.
The allowed values ​are "yes" "no" true or false
Or a reference to the $SITE table is used:
example show="wdlPage" links to $SITE["wdlPage"];
caption
The short description in the menu (program to be executed)
title
More extensive description used when the user hoovers above the menu
This field is also copied to the <title> description of the page
link
The name of the (PHP) script which generates the page or
the name of a html-page
gizmo
Indicates whether ('1') or not ('0') the ajaxgizmo is displayed.
css
Sometimes pages need a very specific CSS file. One can specify the location of such
a file here. Be aware that one has to specify all subfolders below the weather folder.
A CSS file WU-HistoryTan.css in the folder wu is specified as
css="wu/WU-HistoryTan.css"
head
For very specific programs (GOOGLE map V2 for instance) one has to include
specific files in the head section. This can be specified here.
The specification head="progr_name.php" results in the execution of this program just
before the end of the head section of the generated html.
Such a program will normally generate CSS or includes nofollow metatags.
Be aware that one has to specify all subfolders below the weather folder.
default
yes
0
Menu definition and use!
version 2.30 2013-09-30
Generation of the menu
During generation of the html page the /weather/wsMenuData.xml file is read and an <ul><li> structure is generated to
correctly display the menu. Also the menu is stored in a temporary PHP table to check the validity of the menu choices of
the user.
Our example from the previous page would result in:
<li class="withImg"><a href="#" title=""> live data </a>
<ul>
<li><a href="index.php?p=21" title="wd live data">wd live</a></li>
<li><a href="index.php?p=25" title="steel series test">steelseries</a></li>
</ul>
</li>
As you can see the generated html contains NO exact program name and NO folder name.
The menu choice of the user is send to the web server using a simple GET (which is visible in the browser address area).
In our example, if the user chooses WD Live ,his/ her choice is loaded to the web server as:
http://www.your_web_site.com/weather/index.php?p=21
The only information a hacker could see is a number for that menu choice.
Validity check of the users menu choice
Every menu choice is validated against the menu table in the first program index.php
Numbers which are not in the table can not exist or are typed by a hacker manually.
If that is the case the program reroutes the user to the start page.
More about the template menu system
Horizontal versus vertical
There is no difference in treatment or difference in html code between Horizontal or Vertical menus.
Use / xml changes
As said by Ken True from Saratoga in his documentation of the menu structure, xml is quite strict and the least
carelessness results in a total stop of the template.
Not everything is suitable for a production website.
A number of pages (shown in blue in the table below) are really only useful during the construction of the website. In order
to avoid large / long menus those menu entries can be removed with the aid of show = 'no'.
Not everything is immediately displayed after installation.
A number of pages are dependent on correct values ​in settingsSite.php.
Therefore after the initial installation they can be shown once the correct values ​in the settings are inserted.
Menu definition and use!
version 2.30 2013-09-30
Template menu (- to the left of the number means: in sub menu)
nr
program
10
wsAjaxdashboard.php
12
wsWxsim/wsWxsimPrintFull.php
Setting
$SITE['wxsimPage']= 'no';
14
inc/rain3Sources.php
description
Basic ajax/
javascript main
screen
forecast based on stations own WXSIM forecast data
Prerequisite: wxsim program on a PC
One has to upload plaintext.txt and either lastret.txt or latest.csv
Settings for the wxsim scripts themsdelves are in a separate settings
file wsWxsim/ wsWxsimSettings.php
Different rain satellite images See menu item 44
Flyout menu Live Data
-21
wdl/incWdlive.php
wsSettingsWeather.php:
weather display live when using
your own clientraw files.
Multi language support
$SITE['wdlPage'] = 'no';
This setting is set for every weatherprogram as not every weatherprogram is able to upload the
clientraw files
-22
mwlive/wsMWlive.php
Meteoware flash page for those user who do not want to use
WD-Live or the Steelseries
wsSettingsWeather.php:
$SITE['mwPage'] = 'no';
This flash program is not actively supported by the original
programmer
This setting is set for every weatherprogram
-23
inc/meteoplugWDlive.php
wsSettingsWeather.php:
$SITE['MeteoplugPage'] = 'no';
This setting is set for every weatherprogram
meteoplug version of weather
display live (no need for clientraw)
Menu definition and use!
nr
program
-24
inc/meteoplugLiveDashboard.php
version 2.30 2013-09-30
description
meteoplug dashboard
default set to 'no'
-25
gauges/gauge.php
Steelseries gauges
default set to 'yes'
Flyout menu Mesonet
-31-1
mesomaps/incBNLWN.php
-31-2
mesomaps/incAKWN.php
default set to yes for both
Two examples of
the regional
mesonet scripts. A
map, list of all
stations and
weather values are
updated
continuously
If you are a member, you have to download your own
???WN-mesomap folder, place it in the root of your website and
adapt one of the scripts in the weather2/mesomaps/ folder to point to
your downloaded mesomap folder
-32
ewn/ewnPage.php
For members only, otherwise an
empty page is displayed
Setting:
$SITE['ewnID']= false;
European
Weather Network
pages
Menu definition and use!
nr
program
-33
glo/incGlobalMap.php
default set to 'yes'
-34
buoy/incBuoyCss.php
default set to 'yes'
version 2.30 2013-09-30
description
Map of the world (google map)
with weather stations and their
weather values
Map of active weather buoys for the
coast of western europe
Flyout menu Maps
-41
inc/hwakaartjes.php
for HWA members, displayed by
HWA setting:
HetWeerActueel maps of
current weather
conditions for the
Benelux
$SITE['hwaPage']= 'no';
-42
inc/cloudRadar.php
default set to 'yes'
-44
inc/rain3Sources.php
same as menu entry 14 but default
set to 'no'
If you want a smaller menu: Set 14
to 'no' and 44 to 'yes'
Cloud radar,
different radar
image based on the
area setting
Rainfall expected for 3 next
hours either for 3 forecasters
(for members of HWA) or for 2
(buienradar)
Different radars based on area
setting
Menu definition and use!
nr
program
-45
inc/onweerRadar.php
version 2.30 2013-09-30
description
Thunder storm / impacts on
western europe. There are
several maps (throughout
Europe / Western Europe /
UK etc). Currently only be
set through adjustments in
the program itself.
default set to 'yes'
Different radar for Europe
and USA based on area
setting
-46
ewn/ewnMapsPage.php
Weathermaps for EWN members.
For members only,
Setting:
$SITE['ewnID']= false;
-47
inc/meteoxWorldMap.html
default set to 'yes'
Display of global temperatures, uses
entire screen automatically, so no more
menus
Flyout menu Forecasts
50-1
noaa/noaaDigitalPrint.php
Setting
$SITE['noaaPage'] = 'no';
is set to 'yes' based on the region
setting
50-2
noaa/noaaPlainPrint.php
Setting
$SITE['noaaPage'] = 'no';
is set to 'yes' based on the region
setting
Detailed noaa forecast, based on latitude
and longitude settings
The page can be set to contain icons,
meteogram and two pages tabular data. All
parts are optional and displayed according
to the settings in the page.
Standard 1 page noaa forecast, based on
area code
Menu definition and use!
nr
-50-3
-51-2
-52
-53
version 2.30 2013-09-30
program
description
forecasts/incWuForecast2.php
forecasts/incYrnoForecast2.php
forecasts/ incWorldForecast2.php
forecasts/incYahooForecast2.php
You need the correct key and or
area codes to display your local
area forecast. All set in the settings.
$SITE['wuPage']
$SITE['yrnoPage']
$SITE['worldPage']
$SITE['yahooPage']
-51
=
=
=
=
'no';
'yes';
'no';
'yes';
wsMetNo/metnoFullPage.php
This is the default script for the main
page.
Set by
The various forecasts differ only for the number of display
parameters (= columns in the table). The icons are standardized
Extensive Met.NO / YR.NO forecast
with icons, meteogram and two
pages tabular data. All parts are
optional and displayed according to
the settings in the page.
$SITE['fctOrg']
= 'metno';
$SITE['fctContent']= 'icons';
$SITE['metnoPage'] = 'yes';
-54
wsHwa/hwaFullPage.php
for HWA members, displayed by
HWA setting:
$SITE['hwaPage']= 'no';
-55
wsWxsim/wsWxsimPrintFull.php
same as menu 12, this one set to no
-56
metar/metarDisplay.php
default set to 'yes'
The HWA forecast
contains the HWA/
MOS graphic, a set of
icons, a meteogram
and a table. all parts
are optional and
displayed according
to the settings in the
page
forecast based on stations own WXSIM forecast data
METAR of nearby
airports
Menu definition and use!
nr
-57-1
program
version 2.30 2013-09-30
description
meteoalarm/
meteoalarmPrintWarnings.php
When there is a severe
weather warning more
info can be found on
this page
will be shown only for europe
-57-2
-58
noaa/noaaDetailPage.php
will be shown for region not equal to
europe
uv/incUvForecast.php
Same information as above but suppl,ied by noaa
UV forecast
default set to 'yes'
-59_1
59_2
inc/airQualityBE.php
inc/airQualityNL.php
Forecast for air pollution either for
Belgium or the Netherlands
default set to 'yes'
Flyout menu Almanac
-61
inc/trends.php
Shown based on the weatherprogram in use
-62-1
wu/wsWUstart.php
Can only de displayed if you are a
WU member and have a valid wu
name
The default trends page with
gizmo / ajax for continuous
display of your weather values
not all weather-programs can
support this page
The standard Weather
Underground page with values ​for
different periods in the past (day /
week / month / year)
$SITE['wuHistPage']= 'yes';
$SITE['wuId']! ='yourID';
-62-2
wsWuGraphs/wsWuGraphs.php
Can only de displayed if you are a
WU member and have a valid wu
name
$SITE['wuHistPage']= 'yes';
$SITE['wuId']! ='yourID';
WU-graphs from pocasi.hovnet.cz/
The standard folder is used
(wxwugraphs) so a new release can be
simply copied to the corresponding
folder.
Only a start-up script is used in the
template folder wsWuGraphs
Menu definition and use!
nr
program
-64
inc/graphs.php
Shown based on the weatherprogram in use
-65
inc/allInOne.php
Based on the setting
MeteoplugPage
in the weather program part
-66
space/incSpace.php
default set to 'yes'
-67
inc/astronomy.php
version 2.30 2013-09-30
description
Weather charts for the last couple
of days as supplied by the weather
program
Weather Graph "all in 1" is
supplied by MeteoPlug
Activity of the Sun (English
only)
Sun and moon
default set to 'yes'
-68
quake/incQuake.php
default set to 'yes'
-69
soil/soilTotals.php
Shown based on setting:
$SITE['soilpage']!= false;
Earthquakes page.
Standard page of Saratoga.org
information about the soil sensors if used by your station
Menu definition and use!
nr
program
version 2.30 2013-09-30
description
Flyout menu Other stuff
-110
mobi/redirect.php
default set to 'yes'
-80
about/wsAbout.php
redirection to website for
mobile phones and some
tablets. the users of a
mobile device are
automatically redirected.
This page is for use by
phone or tablet users who
want to look at the mobi
pages
standard page about “this weather station”
default set to 'yes'
-81
inc/links.php
standard page with links to other weather related sites
default set to 'yes'
-82
partners/partners.php
default set to 'yes'
-83
inc/status.php
weather organizations this
weather station cooperates with
standard page with status about program and hardware
default set to 'yes'
-86
contact/incContact.php
Visitors can send an email to the webmaster.
default set to 'yes'
-88
inc/sitemap.php
standard page with all menu entries in text.
default set to 'yes'
-89
inc/whoIsOnline.php
default set to 'yes'
a who is online
page
Menu definition and use!
nr
version 2.30 2013-09-30
program
description
the following entry is the last one on the normal menu
16
wsCustomize.php
The website visitor
can change the
website
appearance here.
Also the cookie
question is
processed the first
time a visitor
wants to change
the appearance of
the website
thew following entries are only displayed in debug mode
-93-1
-93-2
-93-9
-93-3
-93-4
-93-8
inc/tagsMH.php
inc/tagsWD.php
inc/tagsCW.php
inc/tagsCU.php
inc/tagsWL.php
inc/tagsMB.php
info page for webmaster /
developer contains all
uploaded weather fields and
corresponding values for the
weather-program in use
-93-10
inc/meteohubDocs.php
info page for webmaster / developer contains meteohub info
-93-5
cltraw/cltrawXref.html
info page for webmaster / developer contains a cross reference of all
clientraw xxxx.txt fields
-93-6
cltraw/incClientraw4.php
info page for webmaster / developer contains all uploaded weather
fields and corresponding values for the clientraw xxx.txt files.
Can be of interest for website visitors who can check their own
clientraw xxx.txt files.
-94
wsIcons/wsIcons.php
All icon sets used by the different forecast suppliers and the
translation to the standard font
-95
wsWxsim/wsWXSIMfields.php
field names as used in the wxsim data files
-96
wsWxsim/wsWXSIMconditions.php
descriptive text of the conditions used by the wxsim program
-900
inc/wsNewPage.php
Example of a new
page
Comments please directly to wvdkuil@hotmail.com
Download