cloudy

Author Topic: Dynamic updating WAP site with CSS  (Read 30624 times)

0 Members and 1 Guest are viewing this topic.

Online jmcmurry

  • Jim McMurry
  • Posts: 2,212
  • Mauston, WI, USA
    • Juneau County Weather
Dynamic updating WAP site with CSS
« on: October 07, 2007, 12:05:50 AM »
A post by Krelvinaz in a discussion about WAP got me thinking.  Various pieces of code that I've picked up from him, ktrue, carterlake and anole made it possible to take a shot at it.  What I have are PHP scripts that create XHTML MP files to be viewed on mobile phones.  In addition to supporting css, you can view these file on your web browser without a plugin while debugging your code.  Mine can be seen at wap.jcweather.us and the code and support files can be downloaded at wap.jcweather.us/dynamicwap.zip.

I'd be interested in hearing how this works on various phones because I've really only seen it on mine.  Questions, comments and suggestions are more than welcome.

Enjoy.  - Jim

Package updated to ver 1.3 10/10/09
« Last Edit: October 10, 2009, 03:13:42 PM by jmcmurry »

 Home of NSLog NexStorm Lightning Data Manager

Offline lulu836

  • Linda
  • Posts: 2,232
  • Louisiana
    • Luv Retirement
Re: Dynamic updating WAP site with CSS
« Reply #1 on: October 07, 2007, 01:10:16 AM »
Awesome!!!!!!!   KRAZR K1m with Alltel.  I don't think I personally would be able to venture into your code 'cause I'm just not that good with the ins and outs of PHP and wx's and stuff like that so I use the default from WD but nevertheless.......great job.
« Last Edit: October 07, 2007, 01:18:08 AM by lulu836 »


Offline gateway2capecod

  • Posts: 1,764
  • West Wareham, Ma. USA
    • West Wareham, Ma. Weather
Re: Dynamic updating WAP site with CSS
« Reply #2 on: October 07, 2007, 04:14:25 AM »
Hello Jim,

I got it working on my browser here:

http://www.gateway2capecod.com/wapindex.php

and will be replacing my exsiting mobile weather page that I was using which was/is here:

http://www.gateway2capecod.com/wx12.html

I just checked it out on my New LG VX8350 Cell phone (Verizon as my carrier) and it looks real sharp!  Everything is working Great!


 Nice touch at the bottom where is displays the consoles Battery and Reception, which I also have tucked away on my website page on the bottom of my "about us" page, along with the winxp uptime and Memory free amount here:

http://www.gateway2capecod.com/wx9.html


Thanks and Nice work...chris
« Last Edit: October 07, 2007, 05:11:27 AM by gateway2capecod »

Offline jwwd

  • Posts: 3,544
  • Silkeborg, Denmark (56:10:58 N-09:30:26 E) - Elevation 75,35 meters
    • Weather at Silkeborg, Denmark
Re: Dynamic updating WAP site with CSS
« Reply #3 on: October 07, 2007, 05:00:42 AM »
Hi Jim

Very impressing - your wap page is working perfect on my cell phone (Nokia 6110 Navigator)

I will redesg my wap page using your dynamip wap script.

Thank you very much.

Best regards,

Henrik

Offline gateway2capecod

  • Posts: 1,764
  • West Wareham, Ma. USA
    • West Wareham, Ma. Weather
Re: Dynamic updating WAP site with CSS
« Reply #4 on: October 07, 2007, 01:57:00 PM »
hello Jim,

after  looking again this morning I noticed a problem, both on the web browser page and on my cell phone WAP page.The problem is this...everything that shows a "°F" symbol after it..for example "Temp"...for some strange reason has 2 "F" 'S and looks like this  57.3 °F F

Have a look again at my web browser based page and you will see what I mean..A lot of double °F F ..are being displayed.

any idea what needs to be edited to fix this from occcuring and in what file?

here is my web browser based page link:
http://www.gateway2capecod.com/wapindex.php

is this happening with anyone else, using this script?

Included also is a picture taken of my phone screen showing same ..see pic below

Thanks, Chris
« Last Edit: October 07, 2007, 02:02:01 PM by gateway2capecod »

Offline lulu836

  • Linda
  • Posts: 2,232
  • Louisiana
    • Luv Retirement
Re: Dynamic updating WAP site with CSS
« Reply #5 on: October 07, 2007, 02:47:14 PM »
I don't get any degree symbols at all..........web page OR phone.


Offline gateway2capecod

  • Posts: 1,764
  • West Wareham, Ma. USA
    • West Wareham, Ma. Weather
Re: Dynamic updating WAP site with CSS
« Reply #6 on: October 07, 2007, 04:46:51 PM »
well after some editing in the wapindex.php  I managed to get rid of the double "F" from happening. while inside the wapindex.php I noticed the echo lines for some reason that were displaying a double F for my reading's or in other places a double "in" for some of the other reading's, I just needed to delete those inside the wapindex file, and now all is working 100% Great
 
I also edited/removed some of the lines within the wapindex.php to my liking and have now came up with this for my page:

http://www.gateway2capecod.com/wapindex.php

Offline daveq

  • Posts: 3,098
  • Hollywood, MD
    • Hollywood - St. Mary's County, Maryland
Re: Dynamic updating WAP site with CSS
« Reply #7 on: October 07, 2007, 05:13:16 PM »
I've got this sorta set up.  Still getting Jim's graphics and weather station name but working never the less.  Just need to do some editing now. 

BTW..I tried for about an hour doing different things to get my wxlocal29 working.  I've got other wxlocal pages creating and uploading but for the life of me I couldn't get it working until....I changed wxlocal29.htm to wxlocal29.html in the webfiles folder.

Thanks, Jim!

--Dave

Offline gateway2capecod

  • Posts: 1,764
  • West Wareham, Ma. USA
    • West Wareham, Ma. Weather
Re: Dynamic updating WAP site with CSS
« Reply #8 on: October 07, 2007, 05:43:42 PM »
hello dave,

Yes... I also needed to change the wxlocal29.htm to a wxlocal29.html, as that is the way in the WD setting's I first started thing's out with...by checking the box inside WD that says use html instead of htm, when I first started using WD and the box I checked is in the WD/CONTROL PANELS/WEB FILES/WEB TABLE/HTML Section of WD, so if anyone else has similiar problem..double check what your setting is set to first in the screen I mentioned above within WD. see picture here:
http://img509.imageshack.us/img509/7838/setupnr5.jpg


...to get your correct images displaying on the graphics page, you need to edit the url links within the wapgraphics.php to your url/links and not Jim's. they are located near the bottom lines of the file. for example : to display your radar it would need to edited to this:

echo '<img alt="Radar" src="http://icons.wunderground.com/data/640x480/radarb5.gif" /><br/>';lf();

hope this helps...chris
« Last Edit: October 07, 2007, 05:55:21 PM by gateway2capecod »

Offline daveq

  • Posts: 3,098
  • Hollywood, MD
    • Hollywood - St. Mary's County, Maryland
Re: Dynamic updating WAP site with CSS
« Reply #9 on: October 07, 2007, 06:08:58 PM »
Quote
hope this helps...chris

Absolutely helps.  :D

I've commented out the graphics link in the index file until I get the rest figured out which shouldn't be that difficult even for me.

--Dave

Offline gateway2capecod

  • Posts: 1,764
  • West Wareham, Ma. USA
    • West Wareham, Ma. Weather
Re: Dynamic updating WAP site with CSS
« Reply #10 on: October 07, 2007, 06:19:13 PM »
one thing to take into consideration when creating the graphics links is to make sure they are linking to a graphic, wheather it be a radar image, lightning image, webcam image etc etc..is for the size of the image not to be bigger than 320 by 240 in size, or somewhere near these..as If it is too large in size, it may not display on cell phone correctly or at all

on a side note ..I just went to your main weather website and noticed it is about 88 degrees there in MD....I find that really Odd considering we up here in the Northeast..massachusetts are chilly, cloudy and only in the 60's. it was beautiful here yesterday, but today and the rest of the week are going to be chilly, cloudy cool...maybe the cold front hasnt reached you there yet.

I also took a look at your cell phone page, as it is so far, and everything looks correctly displaying, although I did notice that your barometer at/near top is displaying in inches, and in the high/low section the barometer reading is in Millibars. not sure if you spotted this or intended this, but thought I would point it out.

Offline daveq

  • Posts: 3,098
  • Hollywood, MD
    • Hollywood - St. Mary's County, Maryland
Re: Dynamic updating WAP site with CSS
« Reply #11 on: October 07, 2007, 06:52:07 PM »
Was just about to ask about the image sizes as I don't have a wap capable phone.  My son has an iPhone and am waiting for him to see what it looks like.  Looks like I'll have to get the size down.  ??

I'll check on the barometer readings.  Not sure as I only used the wxlocal29 provided.  I do like millibars myself but a lot of people don't understand or know what 'normal' is for that reading.

Yep, hot here today.  We had a high of 84 yesterday and 91 today.  NWS just announced that we are in a severe drought.  Had .6" of rain in September and that was all in one day and has been 21 days without rain since.  But as others have mentioned better than cold.

--Dave

Offline gateway2capecod

  • Posts: 1,764
  • West Wareham, Ma. USA
    • West Wareham, Ma. Weather
Re: Dynamic updating WAP site with CSS
« Reply #12 on: October 07, 2007, 07:19:11 PM »
Hi Dave,

 I went to your site on my Cell Phone (LG VX8350) and everything looks good. I was surprized also that your lightning image even displayed as it is large in size, but it did display. one thing that didnt display was the Moon icon/moon phase icon ..on the 1st page, this happened to me  also, so I deleted the line of code for it in my .php file completely

have a look at the pictures below for your website on my cell phone:
« Last Edit: October 07, 2007, 07:23:28 PM by gateway2capecod »

Offline daveq

  • Posts: 3,098
  • Hollywood, MD
    • Hollywood - St. Mary's County, Maryland
Re: Dynamic updating WAP site with CSS
« Reply #13 on: October 07, 2007, 07:56:38 PM »
It does look pretty good.  But of course ALL the credit goes to Jim as he did all the work.

The moon icon does show up via FF.

Thanks for checking.

--Dave

Offline gateway2capecod

  • Posts: 1,764
  • West Wareham, Ma. USA
    • West Wareham, Ma. Weather
Re: Dynamic updating WAP site with CSS
« Reply #14 on: October 07, 2007, 08:10:59 PM »
yes..my moon icon also showed up on my PC web browser( IE or FF), but just wouldnt show up on my Cell Phone Wap Browser.

one last thing I found odd was at the bottom of your page in the CONSOLE section  ..look at your battery voltage..it is at 4.3 volts, where mine is at 4.8 volts...not sure what this means and if 4.3 volts is lower than it should be or lower than normal, but perhaps someone within the forums knows the answer to this.

I bought my davis vantage pro 2 wireless about 3 months ago and it has always been at 4.8 volts

...Chris
« Last Edit: October 07, 2007, 08:16:27 PM by gateway2capecod »

 

cumulus