Cellphone/Mobile Scripts (XHTML Mobile 2.3 Certified)!

Updated original “a” file… Included the ability to specify width (modify the css sheet and cell-top). Added Fire weather vs Chandler support. Included new graphic Moon2.png and sun2.png since I had to make them bigger for larger width cell phones…

I’m not sure why but your page dose not open the why it use to on my phone.
I attacked an image from my phone with the way the web page opens from your page and my page with your old script.


I have mine set to 360 pixels. I was doing some experimentation and it appears i can make it 1000 and it will just squeeze to fit… lemme switch it to 540 real quick and let me know what it looks lilke

ok set to 540… let me know if its bigger

It did get wider but it still dose not fit the screen. I think there was something in the old code that made the screen fit the page rather than the page fit the screen, if that makes sense.


Well so the code is working correctly, what can be done is to change the width even larger — or i can tell you what to change in the css to “break” it again … Its all driven by 2 CSS sections…

OLD
body{
background:#000;
color:#000;
font:12px Arial;
margin:0;
padding:0
}

#container{
border:1px solid #ccc;
text-align:left;
background:#FFF;
padding:4px
}

NEW
body{
background:#000;
color:#000;
font:12px Arial;
margin:0;
padding:0;
text-align:center;
}

#container{
text-align:left;
background:url(2.jpg);
padding:4px;
margin:0 auto;
}

I’m not even sure what the old one was doing, it was confused… But in the body section, the text-align:center is needed and in the #container section the key line is text-align:left (to make it not all centered) and margin:0 auto; (the auto is key).

Also the width is controlled by this:

@media screen{
#container {
max-width: 540px;
}
}
(media screen just means what it looks like on the screen), it would have print full width.

So its easy to fix it back to whatever you want… Not sure what I should do with the main release files… I’m thinking specifying a width. On my BB it fills the screen but its narrower than the monster phone you have.

I put the old css file in place and there was no change. I think the silly cell.php?skip=1 was doing something more than just being silly.

hmm… lemme look in a bit at that…

Thanks for sharing the changes you made to the mobile script. Maybe I’m missing something as I can’t seem to find the background image. I have a black background with black text. http://www.harpersferry-weather.com/cell.php

John

you can get it here…
http://frogville.us/2.jpg

Thanks! Another issue I have is since I don’t have a UV sensor I set $haveUV = false; The results is it’s giving me the high UV reading today of 0 when it should show the UV fcst over the next 3 days.

John

hmm something in the logic then, with that ok… lemme look at that and see if i can fig out forever’s issue also

tstorm – you need to edit the forecast-sumary file to pull in your regional nws or forecast to get the synopsis… you are still getting mine. (use LWX) you will get a nice synopsis for your area…

and the link in the footer.php to reflect your webpage.

forever can you view the source on the “wide” version? curios on the doctype. That was also before i did the major switch to WAP XHTML compliant…

I looked at the old code and all the skip=1 did was just a redirect… so it must be with the android interpretation of the DOCTYPE…

Before it was either:

echo ‘’;
else
echo ‘’;

now its

So i wonder if that is causing the android browser to behave differently with the stylesheets…

regardless you can just edit your css sheet and cell-top and change $pagewidth to like 1000…

tstorm ok check this out now and let me know… if you think its ok, ill update the main zip file…

the logic was absolute hell to get the formatting for all 8 cases… I think i got it tho… The issue was there was a 2nd line of text if you had a UV sensor and it was night… And since mobile XHTML does not allow nested tables, the logic for the formatting of the lines around the cells was difficult.

Glad you caught it tho!.. this has been a great project…

The new cell-ajax-dashboard.php fixed the problem with the UV forecast not showing at night. Thank you much!

John

John -

Glad that fixed the problem… You dont need the cell.php?skip=1 anymore… you can change your xml file…

I think you are using the older cell-radar.php and cell-advisories.php files… Take a look and swap out the width=“315” to width=“<?php echo($pagewidth-5) ?>” on all the image links. That dynamically changes the width to just be a bit smaller than the page width…

Updated “a” zip to include the fixed cell-ajax-dashboard.php.

Starting to see a few people use these – glad they are helpful to others!

Updated all pages with the width. Not sure which file you are talking about with the skip=1 as I haven’t found any that contain it anymore.

John

John – Your homepage

http://www.harpersferry-weather.com/cell.php?skip=1 … which is from menubar.xml

Thanks again. It was in my flyout-menu.xml .

John

yes sorry my bad… flyout-menu.xml. I knew it was some xml file lol…

OK fixed some issues that prevented the page from not displaying correctly on iphones… Had to a add a line to cell-top… Also fixed some formatting issues to make other pages look cleaner – thanks tstorm for all the help debugging this on iphones!!

main “a” zip updated with new files…

Sorry for all fast changes, but its getting pretty stable now I hope… :slight_smile: