Cellphone / Mobile / iPhone Weather Script

You will need to edit the normals records to pull the location – mine says (KTUS) which is a METAR here…

As far as solar and UV not sure, i KNow i had to edit the js file, cant remember if solar or uv were added…

make sure your testtags has these tags in it.

$lighteningbearing = ‘%nexstormbearing%’;
$lighteningdistance = ‘%nexstormdistance%’;
$lighteningcountlasthournextstorm = ‘%lighteningcountlasthournextstorm%’;
$lighteningcountlastminutenextstorm = ‘%lighteningcountlastminutenextstorm%’;
$lighteningcountlast12hournextstorm = ‘%lighteningcountlast12hournextstorm%’;
$lighteningcountlast30minutesnextstorm = ‘%lighteningcountlast30minutesnextstorm%’;
$timeofdaygreeting = ‘%timeofdaygreeting%’;
$tempchangelasthourfaren = ‘%tempchangelasthourfaren%’; //For snow prediction
$abshum = ‘%abshum%’; //For snow prediction
$avwindlastimediate15 = ‘%avwindlastimediate15%’; // average wind speed
$avwindlastimediate30 = ‘%avwindlastimediate30%’; // average wind speed
$avwindlastimediate60 = ‘%avwindlastimediate60%’; // average wind speed
$avwindlastimediate120 = ‘%avwindlastimediate120%’; // average wind speed
$currentmonthaveragerain = ‘%currentmonthaveragerain%’; // average rain for current month
$dayswithrainyear = ‘%dayswithrainyear%’; // days with rain for year
$todayhihumidex = ‘%todayhihumidex%’; //daily high humidex
$todaylohumidex = ‘%todaylohumidex%’; //Daily low Humidex
$dayornight = ‘%dayornight%’; // Day or night flag
$maxtemp4today = ‘%maxtempfortodayfromyourdata%’; // max from station’s records
$mintemp4today = ‘%mintempfortodayfromyourdata%’; // min from station’s records
$maxtemp4todayyr = ‘%yearmaxtempfortodayfromyourdata%’; // max year from station’s records
$mintemp4todayyr = ‘%yearmintempfortodayfromyourdata%’; // min year from station’s records
$raintodateyearago = ‘%raintodateyearago%’; // Rain to date from last year

$avsnowjan = ‘%avsnowjan%’; //Average snow for jan from your inputted snow data (cm)
$avsnowfeb = ‘%avsnowfeb%’; //Average snow for feb from your inputted snow data (cm)
$avsnowmar = ‘%avsnowmar%’; //Average snow for mar from your inputted snow data (cm)
$avsnowapr = ‘%avsnowapr%’; //Average snow for apr from your inputted snow data (cm)
$avsnowmay = ‘%avsnowmay%’; //Average snow for may from your inputted snow data (cm)
$avsnowjun = ‘%avsnowjun%’; //Average snow for may from your inputted snow data (cm)
$avsnowjul = ‘%avsnowjul%’; //Average snow for jul from your inputted snow data (cm)
$avsnowaug = ‘%avsnowaug%’; //Average snow for aug from your inputted snow data (cm)
$avsnowsep = ‘%avsnowsep%’; //Average snow for sep from your inputted snow data (cm)
$avsnowoct = ‘%avsnowoct%’; //Average snow for oct from your inputted snow data (cm)
$avsnownov = ‘%avsnownov%’; //Average snow for nov from your inputted snow data (cm)
$avsnowdec = ‘%avsnowdec%’; //Average snow for dec from your inputted snow data (cm)

$avsnowjannow = ‘%nowsnowjan%’;
$avsnowfebnow = ‘%nowsnowfeb%’;
$avsnowmarnow = ‘%nowsnowmar%’;
$avsnowaprnow = ‘%nowsnowapr%’;
$avsnowmaynow = ‘%nowsnowmay%’;
$avsnowjunnow = ‘%nowsnowjun%’;
$avsnowjulnow = ‘%nowsnowjul%’;
$avsnowaugnow = ‘%nowsnowaug%’;
$avsnowsepnow = ‘%nowsnowsep%’;
$avsnowoctnow = ‘%nowsnowoct%’;
$avsnownovnow = ‘%nowsnownov%’;
$avsnowdecnow = ‘%nowsnowdec%’;

—edit— i think the important one in that wall of tags is “dayornight”

Its also odd your forecast discussion does not contain a synopsis. That was the whole point of that parse to just put the synopsis… In your case you have a giant wall of text :frowning:

It’s seems I was missing the “$dayornight = ‘%dayornight%’; // Day or night flag” tag. Thanks for pointing that out.

I’m not sure what is wrong with the forecast discussion, it seems to make a nice synopsis for other areas but dose not work so well for my area(MTR).

http://www.weathercat.net/cell.php?skip=1

Yeah i liked the synopsis, its a nice overview – perfect for cell, but your MTR doesnt have one and its just a giant wall of text since I strip out all the formatting, carriage returns etc, then parse it 45 columns… So you might want to comment that out.

Glad you got the rest working… looks good…

I am in the process of making all of the templates mobile XHTML 2.3 compliant. I got all the extra pages done, working on cell-ajax-dashboard.php now. Major pain to get them complaint, but its working…

Ill repost the templates when done…

Thanks for doing all the hard work to make this script better.

down to 10 2 errors on the cell-ajax-dashboard.php are all related i think… need to leave it for a bit maybe ill find it tom…

also mobile XHTML is more strict than XHTML, the code that verifies in XHTML I am having to modify a lot of css language to get to validate for MObile XHTML… go figure.

trying to take out 2 embedded tables… Not easy for alignment…

Hi and thanks for the updated scripts.

I cannot find how to change from Chandler to FWI.

Thanks

Hmm thats hardcoded in the cell-ajax-dashboard.php using the variable $chandler… How does one convert to FWI? I’m sure it can be added…

I see some code that might work… I can add it in if needed… My first goal was to get these out… Still hoping someone else will take over and version control them lol… I know wishful thinking…

The most recent scripts are on the other thread… I wanted to make a sep thread so its not confusing…

Since this seems to have been a large headache for everyone I am going to release my code to all where the bulk of this discussion is based off.

Allow me to zip up all required code and post it in about an hour from now. Keep in mind this code will be set for my station, but a few simple edits then will resolve those and will detail them in a text file.

Please allow about an hour for me to create the install instructions.

Can someone tell me why the forecast discussion will not load on my cell page?
http://www.fortgeorgeweather.com/cell-forecast.php
I have seen several other sites with the same issue.
Thanks
Larry

Looks like your trying to run the Dual icons. In the advforecast2.php script, Try disabling that feature.

This page has issues too. http://www.fortgeorgeweather.com/wxforecast.php

can you tell me how that is done?
also notice now that local flood watch shows up on main page but is not on cell page.
any ideas on how to resolve that?
thanks

Got the DualImage issue resolved. Removed dualimage.php from site.

Still have no advisories on cell page when main page shows flood watch.
Any ideas appreciated.
Larry

Your ‘Point Forecast’ doesn’t appear to be set up correctly, Larry. Your string is

http://forecast.weather.gov/MapClick.php?lon=-81.41987221755991&lat=30.394648749664356#.VfhgSvm6daQ

whereas mine is

http://forecast.weather.gov/MapClick.php?CityName=Lincoln&state=NE&site=OAX&textField1=40.8164&textField2=-96.6882&e=0&TextType=2

Notice the difference in the results when the links above are clicked?

Try using mine as a template to modify yours and then see what happens.

Aside: (I see you have opted to continue using the old ‘jpg’ 55x55 icons rather than the new ‘png’ 80x80 icons. If you do move to the new ‘dual-image’ icons, you’ll probably need to modify the dimensions of your ‘wxforecast.php’ to accommodate the larger icons. Here’s my source code where I had to set the width (via ‘$narrowWidth’) to 800px to display correctly in the narrow Saratoga template.)

Jerry
Thanks for the reply.
I did change my forecast url which gave a slightly different result but I don’t see any changes on website.
For now I think I will keep the old forecast icons until I figure out my current issues.
Still not getting advisories on cell page but they are there on main page.
Also, not getting the forecast discussion on cell page.
Larry

Larry – sorry I was out of town last cpl days… I got your email but just now getting back to things…

Do you have the latest versions of all my cell files including all the advisories files? There has been lots of changes to the way the advisories are being called out?

also replies to my script mods shoudl goto this thread - - http://discourse.weather-watch.com/t/54070