Author Topic: New quake-json.php script replaces quake-USA/quake-WORLD scripts  (Read 17196 times)

0 Members and 1 Guest are viewing this topic.

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: New quake-json.php script replaces quake-USA/quake-WORLD scripts
« Reply #75 on: May 24, 2013, 01:12:02 PM »
Sorry but I'm not understanding where the images are located to be downloaded. I have the newest version of the script but can't find the images.




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Amcrest HD IP Camera

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: New quake-json.php script replaces quake-USA/quake-WORLD scripts
« Reply #76 on: May 24, 2013, 02:25:36 PM »
Unpack the attached into your ./ajax-images/ directory and upload to your site.

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: New quake-json.php script replaces quake-USA/quake-WORLD scripts
« Reply #77 on: May 24, 2013, 02:31:37 PM »
Worked like a charm Ken. Thanks! :grin:

http://www.hayskansasweather.com/wxquake.php




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Amcrest HD IP Camera

Offline tshattuck

  • Forecaster
  • *****
  • Posts: 337
    • Your Local Weather - Clay, NY
Re: New quake-json.php script replaces quake-USA/quake-WORLD scripts
« Reply #78 on: May 24, 2013, 07:22:43 PM »
Ken:
Glad to hear you are feeling better.

I just applied the new wxquake.php files to my website. I am getting three CSS errors not sure how to correct.

URI : http://yourlocalweather-clay-ny.com/wxquake.php
486  Value Error : white-space wrap is not a white-space value : wrap  
494  Value Error : white-space wrap is not a white-space value : wrap  
649  Property align doesn't exist : center  

I have attached copies of the files for you review. Hopefully you can tell me what I need to change.
Thanks

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: New quake-json.php script replaces quake-USA/quake-WORLD scripts
« Reply #79 on: May 24, 2013, 08:48:30 PM »
Successful posting.

Thank you, Ken.
John
W7JKG

Offline dasman

  • Forecaster
  • *****
  • Posts: 491
    • Wx Peotone
Re: New quake-json.php script replaces quake-USA/quake-WORLD scripts
« Reply #80 on: May 24, 2013, 09:33:51 PM »
Thanks for the update Ken!  Works great here.http://www.peotoneweather.com/quakepage.php

Im glad you are feeling better!
Dave Sommerfed
Peotone Illinois USA
CW7762, KILPEOT1
NWS COOP, CoCoRaHS, Spotter Network

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: New quake-json.php script replaces quake-USA/quake-WORLD scripts
« Reply #81 on: May 24, 2013, 09:59:59 PM »
Ken:
Glad to hear you are feeling better.

I just applied the new wxquake.php files to my website. I am getting three CSS errors not sure how to correct.

URI : http://yourlocalweather-clay-ny.com/wxquake.php
486  Value Error : white-space wrap is not a white-space value : wrap 
494  Value Error : white-space wrap is not a white-space value : wrap 
649  Property align doesn't exist : center 

I have attached copies of the files for you review. Hopefully you can tell me what I need to change.
Thanks
D'Oh... my bad.. I was trying to prevent a expansion of the table beyond the bounds when a long description on the location came in.
It's in quake-json.php

   Line 578:   <td><a href=\"$mapURL\" style=\"white-space:wrap\"$tgt>$location</a></td>
should read

   Line 578:   <td><a href=\"$mapURL\" style=\"white-space:normal\"$tgt>$location</a></td>

The other issue is in wxquake.php

   Line 135:   <p style="align: center"><?php langtrans('Map and data courtesy of');?>
should read
   Line 135:   <p style="text-align: center"><?php langtrans('Map and data courtesy of');?>

I'll do an update with those corrections.  Thanks for spotting the issues.

Best regards,
Ken





Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: New quake-json.php script replaces quake-USA/quake-WORLD scripts
« Reply #82 on: May 24, 2013, 10:34:43 PM »
All done...

Standalone users: see http://saratoga-weather.org/scripts-quake.php for download of the package

Template users: use http://saratoga-weather.org/wxtemplates/updates.php for (Base-*, Plugin-*) for 24-May-2013

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: New quake-json.php script replaces quake-USA/quake-WORLD scripts
« Reply #83 on: May 25, 2013, 12:21:13 AM »
Works flawlessly, Ken.  Thanks very much!
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline W Thomas

  • Welcome to my area!
  • Forecaster
  • *****
  • Posts: 1648
  • In Loving Memory Of Hooker The Weather Dog !
    • Smyth-Grayson Weather
Re: New quake-json.php script replaces quake-USA/quake-WORLD scripts
« Reply #84 on: May 25, 2013, 02:26:13 AM »
That is really neat output that script renders !  After I finally got it straight where I was miossing things it went easy,
One oddity I noticed last night... my version don't render a map in IE8 on XP  but on my WIN 8 laptop With IE 10 it displays the map just fine.
Several visitors have looked at it on my site but so far no complaints so I'm not too worried at the moment!

I normally use Firefox but I'm not too fond on FF 21 so far. I have been playing around with IE10 and I actually like it.
Same with WIN8 it grows on you :)


     Best Regards
     Wayne

CWOP CW8217
KVAWHITE22 Wunderground   Davis VUE &  Davis Vantage Pro 2  /   Dedicated Server
GR Level 3 ,Level 2 AE Radars  Weather Display 10.37P  Mid Atlantic Weather Network Member
SkyWarn & Spotter Network 6092

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: New quake-json.php script replaces quake-USA/quake-WORLD scripts
« Reply #85 on: May 25, 2013, 11:06:00 AM »
Hi Wayne,

It looks like there are two things amiss with http://www.smythweather.net/wxquake.php
First, you are running the prior version of the quake-json.php script (without the 'home' pin) and
secondly, you seem to be doing an include() of the script without telling it to avoid emitting the extra HTML that makes it a complete page, so extra <html><head></head><body></body></html> tags are in the page.  That can cause issues with some browsers as the page is not error-free HTML.

For the 'guts' of the page, try using something like
Code: [Select]
  <?php 
  $doIncludeQuake 
true;
# uncomment ONE of the $setDistanceDisplay lines to use as template for distance displays  
#  $setDistanceDisplay = 'mi (km)';
  
$setDistanceDisplay 'mi';
#  $setDistanceDisplay = 'km (mi)';
#  $setDistanceDisplay = 'km';

  
$setDistanceRadius  200;  // same units as first unit in $setDistanceDisplay
# NOTE: quakes of magnitude 1.0+ are available for USA locations only.
#    non-USA location earthquakes of magnitude 4.0+ are the only ones available from the USGS
  
$setMinMagnitude '2.0';  // minimum Richter Magnitude to display
  
$setHighMagnitude '4.0';  // highlight this Magnitude and greater
  
  
$setMapZoomDefault 7;    // default zoom for Google Map 1=world to 13=street

  
$setLatitude  37.27153397;    //North=positive, South=negative decimal degrees
  
$setLongitude = -122.02274323;   //East=positive, West=negative decimal degrees
# The above settings are for saratoga-weather.org location
  
$setLocationName 'Saratoga, CA'// city/town name for lat/long above 
#
  
$setTimeZone "America/Los_Angeles";  //NOTE: this *MUST* be set correctly to
# translate UTC times to your LOCAL time for the displays.
# Use http://www.php.net/manual/en/timezones.php to find the timezone suitable for
#  your location.

#  pick a format for the time to display ..uncomment one (or make your own)
# $setTimeFormat = 'D, Y-m-d H:i:s T';  // Fri, 2006-03-31 14:03:22 TZone
  
$setTimeFormat 'D, d-M-Y H:i:s T';  // Fri, 31-Mar-2006 14:03:22 TZone

  
$setDoLinkTarget 1;   // =1 to have links open in new page, =0 for XHTML 1.0-Strict

  
include_once("quake-json.php");
  
?>

  <p style="text-align: center">Map and data courtesy of
  <a href="http://earthquake.usgs.gov/earthquakes/map/">United States Geological Survey</a>.</p>
  <p style="text-align: center;"><small>Script courtesy of <a href="http://saratoga-weather.org/">Saratoga-weather.org</a></small></p>
and that will cause quake-json.php to behave itself and only put what you need on the page.

Also, the needed styling of
Code: [Select]
<style type="text/css">
.quake {
  width: 620px;
}
#map-container {
  padding: 5px;
  border-width: 1px;
  border-style: solid;
  border-color: #ccc #ccc #999 #ccc;
  -webkit-box-shadow: rgba(64, 64, 64, 0.5) 0 2px 5px;
  -moz-box-shadow: rgba(64, 64, 64, 0.5) 0 2px 5px;
  box-shadow: rgba(64, 64, 64, 0.1) 0 2px 5px;
  width: 620px;
  display: none;

}

#map {
  width: 620px;
  height: 480px;
}

#actions {
  list-style: none;
  padding: 0;
}

#inline-actions {
  padding-top: 10px;
}

.item {
  margin-left: 20px;
}

</style>
should appear in the <head>...</head> section of your page to be active.

I found that FF21 renders the sample pages (quakes.php , and the template wxquake.php) just fine :)

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline tshattuck

  • Forecaster
  • *****
  • Posts: 337
    • Your Local Weather - Clay, NY
Re: New quake-json.php script replaces quake-USA/quake-WORLD scripts
« Reply #86 on: May 25, 2013, 12:31:56 PM »
All done...

Standalone users: see http://saratoga-weather.org/scripts-quake.php for download of the package

Template users: use http://saratoga-weather.org/wxtemplates/updates.php for (Base-*, Plugin-*) for 24-May-2013

Best regards,
Ken

Ken:
I applied the updates and everything is now validating and working fine.
Thanks for your efforts. Take it easy and don't work to hard.

Offline dasman

  • Forecaster
  • *****
  • Posts: 491
    • Wx Peotone
Re: New quake-json.php script replaces quake-USA/quake-WORLD scripts
« Reply #87 on: May 25, 2013, 12:35:01 PM »
Ken I am updated as well!

Thanks
Dave Sommerfed
Peotone Illinois USA
CW7762, KILPEOT1
NWS COOP, CoCoRaHS, Spotter Network