cloudy

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

0 Members and 1 Guest are viewing this topic.

Offline ALITTLEweird1

  • Mark
  • Posts: 3,982
  • Snoqualmie,WA
    • Snoqualmie Weather
Re: Dynamic updating WAP site with CSS
« Reply #165 on: September 17, 2009, 11:38:44 AM »
Mark I like your page, would it possible to get your template? I would need to start out using testtags.php out of the box and add the ajax code to this (that uses clientraw)


Are you talking about my cell phone page, or iphone page?
"Nature can do without man, but man cannot do without nature."

Davis VP2 + 1-Wire Solar + 1-wire Lightning + 1-Wire UV + Logitech Webcam

Offline jmar

  • Posts: 1,405
  • Halifax, Canada
    • HRM Weather
Re: Dynamic updating WAP site with CSS
« Reply #166 on: September 17, 2009, 05:48:48 PM »
Sorry Mark, I meant the iphone page. Also I apologize if I took the thread off topic (I see it is wap originally)

After reading volumes today on the subject, I would like to take a shot at adapting the page first, then using the webapp kit and making it a full fledged web app (that an iphone user would add to their app page from the plus sign and add to home command,) that could view any WD powered site. I think I have the concept figured out.

Firs thing would be adding ajax to a page like yours though.

Thanks
Jim
iMac, 2 x Mac Mini, Mac OS X 10.6.7, Indigo integration, Web - WDL, Saratoga templates, Lightbox

Offline ALITTLEweird1

  • Mark
  • Posts: 3,982
  • Snoqualmie,WA
    • Snoqualmie Weather
Re: Dynamic updating WAP site with CSS
« Reply #167 on: September 17, 2009, 07:06:20 PM »
i can send you the files when i get home if you would like. let me know.
"Nature can do without man, but man cannot do without nature."

Davis VP2 + 1-Wire Solar + 1-wire Lightning + 1-Wire UV + Logitech Webcam

Offline jmar

  • Posts: 1,405
  • Halifax, Canada
    • HRM Weather
Re: Dynamic updating WAP site with CSS
« Reply #168 on: September 18, 2009, 12:00:30 PM »
Great thanks! Just email them over.
All the best,
Jim
iMac, 2 x Mac Mini, Mac OS X 10.6.7, Indigo integration, Web - WDL, Saratoga templates, Lightbox

Offline ALITTLEweird1

  • Mark
  • Posts: 3,982
  • Snoqualmie,WA
    • Snoqualmie Weather
Re: Dynamic updating WAP site with CSS
« Reply #169 on: September 18, 2009, 01:34:39 PM »
Heres a link to the iphone thread with a download link.

http://www.weather-watch.com/smf/index.php/topic,40827.0.html
"Nature can do without man, but man cannot do without nature."

Davis VP2 + 1-Wire Solar + 1-wire Lightning + 1-Wire UV + Logitech Webcam

Blackjack52

  • Guest
Re: Dynamic updating WAP site with CSS
« Reply #170 on: September 18, 2009, 02:30:23 PM »
Thanks Mark for the help. Have it all setup.

http://www.knology.net/~blackjack52/wapindex.php

Offline ALITTLEweird1

  • Mark
  • Posts: 3,982
  • Snoqualmie,WA
    • Snoqualmie Weather
Re: Dynamic updating WAP site with CSS
« Reply #171 on: September 18, 2009, 03:28:49 PM »
YW... Looks good.
"Nature can do without man, but man cannot do without nature."

Davis VP2 + 1-Wire Solar + 1-wire Lightning + 1-Wire UV + Logitech Webcam

Offline MesquiteWx

  • Nick
  • Posts: 403
  • Mesquite Weather Network
  • Mesquite, Texas
    • Mesquite Weather Network
Re: Dynamic updating WAP site with CSS
« Reply #172 on: September 28, 2009, 03:51:29 AM »
I am trying to add new tags to my wap page that is created by Jim. It will not read the tag itself in the wap index page. Instead of using like $lighteningcountlast5minutes you have to use something like $wdtg[46]. Unfortunately I do not know what numbers are associated to which tag. Is their a place I can find this info? I have added the tag to wxlocal29.htm and it is outputting the data. Just need to know what tag to use in the wap index.

http://www.mesquitewx.com/wapdata.txt

-Thanks

Offline MesquiteWx

  • Nick
  • Posts: 403
  • Mesquite Weather Network
  • Mesquite, Texas
    • Mesquite Weather Network
Re: Dynamic updating WAP site with CSS
« Reply #173 on: September 28, 2009, 04:36:21 AM »
Never mind I got it figured out. I have updated the wapindex page to use the wapdata.txt instead of the testtags for those use have their wap page in a sub domain like mine is and or use wapdata.txt to update their wap page. It is basically the same thing as Mark's but this doesn't use the testtags because it won't work if you have your wap outside of the root

http://wap.mesquitewx.com

I will package this up for upload for those who have a lightning detector and want to add lightning counts to their wap page.

-Thanks
« Last Edit: September 28, 2009, 04:55:08 AM by MesquiteWx »

Offline MesquiteWx

  • Nick
  • Posts: 403
  • Mesquite Weather Network
  • Mesquite, Texas
    • Mesquite Weather Network
Re: Dynamic updating WAP site with CSS
« Reply #174 on: September 28, 2009, 05:24:43 AM »
Well my FTP is messed up right now but if you want to manually add this to your files follow the directions below. This idea came from Mark so he gets credit for the idea. I just modified it to work with the wapdata.txt for those that have their wap page outside of the root in a sub directory such as like this http://wap.mesquitewx.com or if you are not using the testtags for your wap. First you need to download the attached wxlocal29.htm and save it to your C:\wdisplay\webfiles. Then in your index page for your wap page you need to do the following.... Please make a back up of this file before you make the changes

Find:
Code: [Select]
cho '<tr class="hdr"><td>Rain</td></tr>';lf();
echo '<tr class="dk"><td>Amount: </td><td>' . $wdtg[17] . ' in<br/></td></tr>';lf();
echo '<tr class="lt"><td>Last Tip: </td><td>at ' . strtolower($wdtg[18]) . '</td></tr>';lf();
echo '<tr class="dk"><td>Rate: </td><td>' . $wdtg[19] . ' hr ' .  gen_difference( $wdtg[67], $wdtg[68]) . '</td></tr>';lf();
echo '<tr class="lt"><td>Yesterday: </td><td>' . $wdtg[20] . ' in</td></tr>';lf();
echo '<tr class="dk"><td>Month: </td><td>' . $wdtg[21] . ' in</td></tr>';lf();
echo '<tr class="lt"><td>Year: </td><td>' . $wdtg[22] . ' in</td></tr>';lf();

After add:
Code: [Select]
echo '<tr class="hdr"><td>Lightning Counts</td></tr>';lf();
echo '<tr class="dk"><td>Last Min:</td><td> ' . $wdtg[72] . '</td></tr>';lf();
echo '<tr class="lt"><td>Last 30 Mins:</td><td>' . $wdtg[75] . '</td></tr>';lf();
echo '<tr class="dk"><td>Last 60 Mins:</td><td>' . $wdtg[71] . '</td></tr>';lf();
echo '<tr class="lt"><td>Last 12 Hours:</td><td>' . $wdtg[74] . '</td></tr>';lf();
echo '<tr class="dk"><td>' . $wdtg[82] .':</td><td>' . $wdtg[77] . '</td></tr>';lf();
echo '<tr class="lt"><td>' . $wdtg[81] .' to Date</td><td>' . $wdtg[78] . '</td></tr>';lf();
echo '<tr class="dk"><td>Last Strike:</td><td>' . $wdtg[76] . '</td></tr>';lf();
echo '<tr class="lt"><td>Last Bearing:</td><td> ' . $wdtg[79] . '&deg;</td></tr>';lf();
echo '<tr class="dk"><td>Last Distance:</td><td>' . $wdtg[80] . 'mi<br/></td></tr>';lf();

Save file and upload to your sever.

I have also added the ability to display current advisory/watch/warning. The tag is already in the wxlocal29.htm so to add it to your page.

Find:
Code: [Select]
echo '</div>  <!-- class="top" -->';lf();
echo '<table>';lf();

After add:
Code: [Select]
echo  $wdtg[83] . '  </td></tr>';lf();
Then you need to make sure you have this added in your testtags file in C:\wdisplay\webfiles This file may already exist but pay attention to capitalization. You may have one that is  %noaaevent% notice one is all lower case one isn't. If you don't have the one below, just add it below the one you have now.

Code: [Select]
$NOAAEvent = '%NOAAEvent%'; // NOAA Watch/Warning/Advisory
You can see both in action from mine...

http://wap.mesquitewx.com

Offline MesquiteWx

  • Nick
  • Posts: 403
  • Mesquite Weather Network
  • Mesquite, Texas
    • Mesquite Weather Network
Re: Dynamic updating WAP site with CSS
« Reply #175 on: September 29, 2009, 04:59:25 AM »
Ok I have got all the new additions packaged up and the install docs updated. I will also send this to Jim so it can be downloaded. The additions in this package is as followed...

Version 1.3 additions
-Added lightning support for those who have lightning detector and use nexstorm software
-Added top warning to index page to display advisories/watch/warnings
-Added advisory page to display advisories/watch/warnings which is linked from top warning text as well as navigation
-Upgraded Wxlocal29.htm with tags to support lightning, top warning, and advisory page

This is for those that want a plug and play solution and use the wapdata.txt instead of testtags for those who have their wap site in a sub-domain and can not use testtags or you do not want to use testtags.txt. The Wxlocal.29.html has all the tags needed but you do need to add a couple of new tags to your testtags file which are noted in the install docs. You can see an example of the additions from my wap site below...

http://wap.mesquitewx.com

You can download the package below...

http://www.mesquitewx.com/wxscripts/Dynamic%20WAP.zipx

Credit goes to Jim at http://jcweather.us for the initial release of this script.
Mark for the idea to add lightning and top warning.


Offline jmcmurry

  • Jim McMurry
  • Posts: 2,336
  • Mauston, WI, USA
    • Juneau County Weather
Re: Dynamic updating WAP site with CSS
« Reply #176 on: October 10, 2009, 03:22:03 PM »
I updated the package (link in the very first post) with lightning, advisories/warnings and made it a little more configurable and easier to work with.  Hard to believe it's been two years since I started this thread.  I started to try to make the use of testtags.txt an option, but that got to be more work than I wanted to do, plus Zalmor has offered his version at http://www.weather-watch.com/smf/index.php/topic,27046.msg288160.html#msg288160.

Thanks to all who have offered their code and ideas in this thread.

- Jim

 Home of NSLog NexStorm Lightning Data Manager

Offline K3JAE

  • Posts: 696
  • Fayette County, PA., USA
    • K3JAE's Weather Station
Re: Dynamic updating WAP site with CSS
« Reply #177 on: October 10, 2009, 09:15:14 PM »
I would like to use the TESTTAGS.PHP version of this script. 

However my problem is that my WAP is in a separate directory (/wap/). Because of this I cannot pull the data from the testtags.php file.

My testpage is located at http://www.k3jae.com/wap/wapindex-test.php.

Thus far I only have converted the first few lines of data (Current Outside, Temperature, Humidity) to see if working so any field you see data in is because it is using wd tags.

I need to know how to path out the testtags.php info or how to tell the wapindex.php to drop back a directory level and include the testtags.php info.


73's de K3JAE

John
K3JAE Weather Station

Offline dimpap

  • Posts: 45
  • Karditsa
    • Weather station from Karditsa
Re: Dynamic updating WAP site with CSS
« Reply #178 on: November 27, 2009, 05:31:50 PM »
Hi my friends!!

I got it working on my browser here:
http://www.meteokar.gr/wapindex.php

I do not want to show the temperature (°F) I want to show in my (°C),
the rain in (in) to show in (mm)
How do I change it;

Offline jmcmurry

  • Jim McMurry
  • Posts: 2,336
  • Mauston, WI, USA
    • Juneau County Weather
Re: Dynamic updating WAP site with CSS
« Reply #179 on: November 27, 2009, 06:16:21 PM »
I just answered this in an EMail, but I'll answer it here too in case someone else has this question.  The appropriate WD tags must be changed in wxlocal29.htm, then in wapindex.php the "F"s need to be changed to "C"s etc.

- Jim

 Home of NSLog NexStorm Lightning Data Manager

 

cumulus