cloudy cloudy

Author Topic: Cellphone / Mobile / iPhone Weather Script  (Read 52543 times)

0 Members and 1 Guest are viewing this topic.

Offline tman1991

  • Posts: 703
  • Tucson, AZ (US)
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 9.0.1
    • Countryside Manor
Re: Cellphone / Mobile / iPhone Weather Script
« Reply #225 on: January 15, 2012, 04:56:54 AM »
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..

Offline tman1991

  • Posts: 703
  • Tucson, AZ (US)
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 9.0.1
    • Countryside Manor
Re: Cellphone / Mobile / iPhone Weather Script
« Reply #226 on: January 15, 2012, 05:02:11 AM »
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"
« Last Edit: January 15, 2012, 06:23:16 AM by tman1991 »

Offline tman1991

  • Posts: 703
  • Tucson, AZ (US)
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 9.0.1
    • Countryside Manor
Re: Cellphone / Mobile / iPhone Weather Script
« Reply #227 on: January 15, 2012, 06:20:56 AM »
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 :(

Offline Forever

  • Posts: 437
  • Santa Cruz, CA
  • OS/Browser:
  • Win Vista/Srvr 2008
  • MS IE 8.0
    • WeatherCat
Re: Cellphone / Mobile / iPhone Weather Script
« Reply #228 on: January 15, 2012, 06:31:08 PM »
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

Offline tman1991

  • Posts: 703
  • Tucson, AZ (US)
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 9.0.1
    • Countryside Manor
Re: Cellphone / Mobile / iPhone Weather Script
« Reply #229 on: January 15, 2012, 07:08:42 PM »
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..

Offline tman1991

  • Posts: 703
  • Tucson, AZ (US)
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 9.0.1
    • Countryside Manor
Re: Cellphone / Mobile / iPhone Weather Script
« Reply #230 on: January 17, 2012, 04:02:36 AM »
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..

Offline Forever

  • Posts: 437
  • Santa Cruz, CA
  • OS/Browser:
  • Win Vista/Srvr 2008
  • MS IE 8.0
    • WeatherCat
Re: Cellphone / Mobile / iPhone Weather Script
« Reply #231 on: January 17, 2012, 04:11:22 AM »
Thanks for doing all the hard work to make this script better.

Offline tman1991

  • Posts: 703
  • Tucson, AZ (US)
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 9.0.1
    • Countryside Manor
Re: Cellphone / Mobile / iPhone Weather Script
« Reply #232 on: January 17, 2012, 08:00:40 AM »
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..
« Last Edit: January 17, 2012, 09:30:33 AM by tman1991 »

Offline tonyva

  • Posts: 1,124
  • Mangawhai Heads, Northland, New Zealand
  • OS/Browser:
  • Win XP
  • Firefox 9.0.1
    • Mangawhai Heads Weather
Re: Cellphone / Mobile / iPhone Weather Script
« Reply #233 on: January 19, 2012, 07:15:46 AM »
Hi and thanks for the updated scripts.

I cannot find how to change from Chandler to FWI.

Thanks
Thank You
Tony

Weather Dedicated 24/7 HP Dual Core 1.8 Ghz CPU, 2GB Ram

Offline tman1991

  • Posts: 703
  • Tucson, AZ (US)
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 9.0.1
    • Countryside Manor
Re: Cellphone / Mobile / iPhone Weather Script
« Reply #234 on: January 19, 2012, 07:21:07 AM »
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..

Offline tman1991

  • Posts: 703
  • Tucson, AZ (US)
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 9.0.1
    • Countryside Manor
Re: Cellphone / Mobile / iPhone Weather Script
« Reply #235 on: January 19, 2012, 07:31:41 AM »
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..

Offline K3JAE

  • Posts: 1,015
  • CoCoRaHS: TN-CR-7; WxUngrd: KTNBRUCE2; CWOP: AT066
  • Carroll County, TN, USA
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 9.0.1
    • K3JAE's Weather Station
Re: Cellphone / Mobile / iPhone Weather Script
« Reply #236 on: January 27, 2012, 12:50:50 AM »
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.


73's de K3JAE
John
K3JAE Weather Station

Offline lstrip

  • Posts: 117
  • OS/Browser:
  • Win NT 10.0
  • Chrome 45.0.2454.85
    • VanCam Weather
Re: Cellphone / Mobile / iPhone Weather Script
« Reply #237 on: September 16, 2015, 06:01:15 PM »
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

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Posts: 5,155
  • North Bend, WA
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Mozilla compatible
    • North Bend Weather
Re: Cellphone / Mobile / iPhone Weather Script
« Reply #238 on: September 16, 2015, 07:31:12 PM »
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
« Last Edit: September 16, 2015, 07:37:53 PM by ALITTLEweird1 »
"Nature can do without man, but man cannot do without nature."

Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Logitech Webcam

Offline lstrip

  • Posts: 117
  • OS/Browser:
  • Win NT 10.0
  • Chrome 45.0.2454.85
    • VanCam Weather
Re: Cellphone / Mobile / iPhone Weather Script
« Reply #239 on: September 16, 2015, 08:10:13 PM »
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