Cellphone / Mobile / iPhone Weather Script

Much appreciate the help. I changed this in the script: include_once(cell_ajax-dashboard.php)
to include_once(cell-ajax-dashboard.php) The downloaded file had a dash not underscore like in the script for
cell-ajax-dashboard. The page now shows up.

So now, current conditions images dont show. In the script I have:

$imagesDir  = './ajax-images/';  // directory for ajax-images with trailing slash

But when the images wont show up. If you look at the source for the image, it’s looking for it
in the root directory, but they are in ajax-images.

My new Droid X will be here next week so I’l getting this ready for myself.

THANKS AGAIN! 8)

We’ll work on it a bit at a time here then…

First thing I noticed in cell-ajax-dashboard.php on line 41:

$ourTZ      = "Africa/New_York";  //NOTE: this *MUST* be set correctly to
// translate UTC times to your LOCAL time for the displays.

…should read:

$ourTZ      = "America/New_York";  //NOTE: this *MUST* be set correctly to
// translate UTC times to your LOCAL time for the displays.

Also, if you want to use your wind rose set, change the following at line 45:

$wrIconsSet = './ajax-images/wind/2/';

…to:

$wrIconsSet = './ajax-images/';

And since it appears you’re using PNG graphics for your wind rose, you’ll need to also change line 47 to read:

$wrType     = '.png';

It’s currently set for gif

I was rushing so fixes before work. All those changes are done.

The current condition icons are in the ajax-images directory. http://www.cnyweather.com/ajax-images/0-skc.gif

But the source is calling for them in the root still.

TY 8)

Well I got the icons figured out. There was an error in the code:

changed:

<td class="data1" style="text-align: center; border: none" valign="middle">
            <div><span class="ajax" id="ajaxconditionicon2">
               <img src="<?php echo $iconDir . newIcon($iconnumber) ?>" alt="<?php $t1 = fixupCondition($Currentsolardescription); echo $t1; ?>" title="<?php echo $t1; ?>" height="60" width="75" />
            </span></div>
<td class="data1" style="text-align: center; border: none" valign="middle">
            <div><span class="ajax" id="ajaxconditionicon2">
               <img src="<?php echo $imagesDir . newIcon($iconnumber) ?>" alt="<?php $t1 = fixupCondition($Currentsolardescription); echo $t1; ?>" title="<?php echo $t1; ?>" height="60" width="75" />
            </span></div>

It was looking for the image in the ICON directory.

Now onto the forecast part. THANKS AGAIN!!! 8)

Forecast part is a little different. I haven’t been able to find one to work with this specific mobile script, simply because he’s using the WU as a forecast source, which doesn’t work for the US. If anyone on here has been able to munge up the code to make NWS a viable source for the forecast script, I’m sure all ears on this.

Thanks.

thanks again for your help!

Think there’s a way to squash this into the cell template?

That script has several options which might be used to display the same info in different formats.

http://saratoga-weather.org/scripts-carterlake.php#advforecast

Thank you Kevin

One other thing; in the clientraw.parser.php file, unless you change the following as I have it below, your precision on rain and barometer will not be correct.

Yours shows as:

// temp conversion precision
// determines the number of decimal places
$temp_prec = '1';

// wind conversion precision
// determines the number of decimal places
$wind_prec = '1';

// barometer conversion precision
// determines the number of decimal places
$barom_prec = '1';

// rain conversion precision
// determines the number of decimal places
$rain_prec = '1';

It should be changed to be this:

// temp conversion precision
// determines the number of decimal places
$temp_prec = '1';

// wind conversion precision
// determines the number of decimal places
$wind_prec = '1';

// barometer conversion precision
// determines the number of decimal places
$barom_prec = '2';

// rain conversion precision
// determines the number of decimal places
$rain_prec = '2';

Else your barometer and rain will round up…i.e, 29.84 inches will say 29.90 and 2.16 inches of rain will read as 2.20…

Thanks BigOkie!

Last thing, I’m trying to include Advisories. I have it reading the text file generated
for my zone so far.

Ok last thing to bother everyone on:

Trying to get the alert box which is the same on the main site to open up on the cell pages.

Would like the Alert Box to open up on here Central New York Weather Adsvisories

Here is the page code.

<?php
echo "<!-- AtomFeed Alert Box-->";
include("AtomArray.php");
if($alert_box !== '') {
print '
<div>
<table border="0" cellspacing="0" cellpadding="0" style="width: 99%; margin: 1px auto 0px auto;">
<tr>
<td style="color: #FFFF99; background-color: #3AB; text-align: center">WEATHER ALERTS</td>
</tr>
<tr>
<td>'.$alert_box.'</td>
</tr>
</table>
</div>';
}
echo "\n<!-- end AtomFeed Alert Box-->\n";
?>

As seen on my Dinc (Droid Incredible)

You like your Incredible? I was gonna get one till the Droid X was announced.
Should have it next week.

Posted below to not hijack the thread…

http://discourse.weather-watch.com/p/364378

Afternoon folks,

I have been working on this script for the last 2 days and have it almost completed for the time being. I have an issue with my advisories page: http://sacrey.info/cell-advisories.php?skip=1.

I am unable to shrink the top part of the advisory down enough to be readable. Any ideas, thoughts…? I am using the rss-advisory.php for my warning, etc. and created a revised version for this page. I decreased the table width from 630 to 310, but…

Any and all assistance is much appreciated.

John Sacrey

Hi again folks,

Well after playing around with this for 2 days I seem to have found the answer. I created a second copy of the rss-advisory.php script and modified to fit the page pretty close to correct. I am attaching a copy of both the rss-advisory.php and the cell-advisories.php for those who would like one.

John


cell-advisories.zip (12.7 KB)

Has anyone came out with a finished version for us non programmers, As in change a few settings only?
Thanks.

Hi JtwnPaWeather,

I am attaching a .zip file with hopefully all of the information you will need to setup and run the cellphone script. I have changed all of the pertinent information to your area and hope I have all of the directories and settings correct. I’ll apologize in advance if I do not.

Once installed, try it by going to: http://www.johnstownpaweather.com/cell.php?skip=1 and see what you have.

Sincerely,

John Sacrey


cell script.zip (113 KB)

Thanks for the help on this one. Put the files in place, had to change the dir as it is located in weather.

The only thing that is wrong is the Advisory it shows:
Advisory Information Unavailable, invalid advisory zone selected.
but it is the correct zone i put in there.