cloudy cloudy

Author Topic: Cellphone/Mobile Scripts (XHTML Mobile 2.3 Certified)!  (Read 61335 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 Scripts (XHTML Mobile 2.3 Certified)!
« Reply #15 on: January 20, 2012, 12:36:33 AM »
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..


Offline Forever

  • Posts: 437
  • Santa Cruz, CA
  • OS/Browser:
  • Win Vista/Srvr 2008
  • MS IE 8.0
    • WeatherCat
Re: Cellphone/Mobile Scripts (XHTML Mobile 2.3 Certified)!
« Reply #16 on: January 20, 2012, 01:07:10 AM »
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.


Offline tman1991

  • Posts: 703
  • Tucson, AZ (US)
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 9.0.1
    • Countryside Manor
Re: Cellphone/Mobile Scripts (XHTML Mobile 2.3 Certified)!
« Reply #17 on: January 20, 2012, 01:14:14 AM »
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

Offline Forever

  • Posts: 437
  • Santa Cruz, CA
  • OS/Browser:
  • Win Vista/Srvr 2008
  • MS IE 8.0
    • WeatherCat
Re: Cellphone/Mobile Scripts (XHTML Mobile 2.3 Certified)!
« Reply #18 on: January 20, 2012, 01:24:23 AM »
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.

Offline tman1991

  • Posts: 703
  • Tucson, AZ (US)
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 9.0.1
    • Countryside Manor
Re: Cellphone/Mobile Scripts (XHTML Mobile 2.3 Certified)!
« Reply #19 on: January 20, 2012, 01:29:57 AM »
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.

Offline Forever

  • Posts: 437
  • Santa Cruz, CA
  • OS/Browser:
  • Win Vista/Srvr 2008
  • MS IE 8.0
    • WeatherCat
Re: Cellphone/Mobile Scripts (XHTML Mobile 2.3 Certified)!
« Reply #20 on: January 20, 2012, 02:00:20 AM »
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.

Offline tman1991

  • Posts: 703
  • Tucson, AZ (US)
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 9.0.1
    • Countryside Manor
Re: Cellphone/Mobile Scripts (XHTML Mobile 2.3 Certified)!
« Reply #21 on: January 20, 2012, 02:22:06 AM »
hmm.. lemme look in a bit at that..

Offline tstorm

  • Posts: 378
  • Harpers Ferry, WV
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 9.0.1
    • Meadowbrook Farm Weather
Re: Cellphone/Mobile Scripts (XHTML Mobile 2.3 Certified)!
« Reply #22 on: January 20, 2012, 02:31:49 AM »
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
« Last Edit: January 20, 2012, 03:05:33 AM by tstorm »

Offline tman1991

  • Posts: 703
  • Tucson, AZ (US)
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 9.0.1
    • Countryside Manor
Re: Cellphone/Mobile Scripts (XHTML Mobile 2.3 Certified)!
« Reply #23 on: January 20, 2012, 03:07:36 AM »
you can get it here..
http://frogville.us/2.jpg

Offline tstorm

  • Posts: 378
  • Harpers Ferry, WV
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 9.0.1
    • Meadowbrook Farm Weather
Re: Cellphone/Mobile Scripts (XHTML Mobile 2.3 Certified)!
« Reply #24 on: January 20, 2012, 03:51:00 AM »
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

Offline tman1991

  • Posts: 703
  • Tucson, AZ (US)
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 9.0.1
    • Countryside Manor
Re: Cellphone/Mobile Scripts (XHTML Mobile 2.3 Certified)!
« Reply #25 on: January 20, 2012, 04:04:28 AM »
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.
« Last Edit: January 20, 2012, 04:18:47 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 Scripts (XHTML Mobile 2.3 Certified)!
« Reply #26 on: January 20, 2012, 04:09:57 AM »
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 '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
else
echo '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
   "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">';

now its
 <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 2.3//EN"
   "http://www.openmobilealliance.org/Tech/DTD/xhtml-mobile12.dtd">

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..

Offline tman1991

  • Posts: 703
  • Tucson, AZ (US)
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 9.0.1
    • Countryside Manor
Re: Cellphone/Mobile Scripts (XHTML Mobile 2.3 Certified)!
« Reply #27 on: January 20, 2012, 06:20:51 AM »
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..



« Last Edit: January 20, 2012, 05:44:20 PM by tman1991 »

Offline tstorm

  • Posts: 378
  • Harpers Ferry, WV
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 9.0.1
    • Meadowbrook Farm Weather
Re: Cellphone/Mobile Scripts (XHTML Mobile 2.3 Certified)!
« Reply #28 on: January 20, 2012, 10:02:00 AM »
The new cell-ajax-dashboard.php fixed the problem with the UV forecast not showing at night.  Thank you much!

John

Offline tman1991

  • Posts: 703
  • Tucson, AZ (US)
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 9.0.1
    • Countryside Manor
Re: Cellphone/Mobile Scripts (XHTML Mobile 2.3 Certified)!
« Reply #29 on: January 20, 2012, 05:35:21 PM »
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!


« Last Edit: January 20, 2012, 05:49:06 PM by tman1991 »

 

cumulus