Creating a Weather WML Page

From WeatherWiki
Revision as of 22:51, 13 December 2005 by WikiSysop (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Purpose: Create a wml web page(s) for use at a public WEB site. Also to transmit that page(s) to the wml server. Enabling WAP files

   * Click "Setup" in the menu bar, then control panel.
   * Click "Setup FTP / Internet / ...".
   * Click the tab labeled "WAP".

Enter location name and your home page URL. Specify Nokia and or USA formats. Be sure "Use my own custom WAP file ..." is unticked. Click on the button labeled "Create WAP directory for first time". Click the "Test" button to see that a new wap file is created.

A file named "index.wml" should appear in the webfiles directory. If all is well, enter schedule for uploads. Click on the red "Off" button so that it becomes green and the label changes to "On". Click "OK" to save settings and return to WD. Custom WML file

Be sure the default .wml file is being created. Return to the WAP screen as described above. Click on the box labeled "Use my own Custom WAP file ...".

Use the index.wml file as a starter (in the folder web files) and rename it as "waplocal.txt". (make sure you dont have it as waplocal.txt.txt.... i.e in windows, under view, file types, untick hide known file extension). At the scheduled times, this file will be read and a new "index.wml" file created using that format as a guide.

Replace actual weather conditions numbers with a custom tag. If you wish to add other information, simply add an appropriate label and its custom tag. (i.e. "indoor temperature: %indoorhum%).

More information about using custom tags can be found on the "Using Custom Tags" page.

A simple WAP page might look like this:

<?xml version='1.0'?> <!DOCTYPE wml PUBLIC '-//WAPFORUM//DTD WML 1.1//EN' 'http://www.weather-display.de/DTD/wml_1.1.xml'> <wml> <head> </head> <card id="Weather-Display" title="Weather-Display">

CURRENT WEATHER REPORT FROM: LaddRd
6:23:57 PM 12/25/2002
Temperature: %temp%
Windspeed: %avgspd%
Gustspeed: %gstspd%
Direction: %dirlabel% %dirdeg%
Barometer: %baro%
Humidity: %hum% percent
Dew point: %dew%
Todays rain: %dayrn%
Maximum temperature: %maxtemp% at %maxtempt%
Minimum temperature: %mintemp% at %mintempt%
Maximum gust today: %maxgst% at %maxgstt%
%time% %date%
<a href="http://personalpages.tdstelme.net/~flaplant/weather/wx.html">Home</a>
<a href="http://www.weather-display.com/wap/index.wml">Created by Weather-Display</a>

</card> </wml>


The "
" is optional and intended to force each entry onto a new line.