Author Topic: Curly's Wx Story script  (Read 22604 times)

0 Members and 1 Guest are viewing this topic.

Offline rrrick8

  • Senior Contributor
  • ****
  • Posts: 224
    • Vermilion weather
Re: Curly's Wx Story script
« Reply #100 on: December 30, 2017, 07:56:19 AM »
Don, I ran just your wxStory_inc.php without the template and everything was normal on 15 sites I tested.
Your problem is use withing the template, which I don't use so can't help you with that.
Again, though... it appears your WxStory is running fine.
Severe Weather Manager-Vermilion County EMA
CWOP-CW9931 KILDANVI5

Offline W3DRM

  • Forecaster
  • *****
  • Posts: 3360
    • Emmett Weather
Re: Curly's Wx Story script
« Reply #101 on: December 30, 2017, 07:03:51 PM »
John, rrrick8,

I have attached two screen captures showing what I am seeing for both Reno and Grand Junction, CO. I see many other sites with similar results. For some reason, some of the sites display in a very wide format.
Don - W3DRM - Emmett, Idaho --- Blitzortung ID: 808 --- FlightRadar24 ID: F-KBOI7
Davis Wireless VP2, WD 10.37s150,
StartWatch, VirtualVP, VPLive, Win10 Pro
--- Logitech HD Pro C920 webcam (off-line)
--- RIPE Atlas Probe - 32849

Offline rrrick8

  • Senior Contributor
  • ****
  • Posts: 224
    • Vermilion weather
Re: Curly's Wx Story script
« Reply #102 on: December 30, 2017, 09:04:44 PM »
Like I said above... if you run just the script wxStory_inc.php  it all looks good.
So I believe the script is fine it's just something askew with your placement in the template which I don't use so I can't help you on that one.
Severe Weather Manager-Vermilion County EMA
CWOP-CW9931 KILDANVI5

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Curly's Wx Story script
« Reply #103 on: December 31, 2017, 11:18:41 AM »
Don, as Rick said it seems not to be in Curly's script. I ran my site script and selected Reno and it looks just fine (attached). I was unable to find the problem as well. Sorry.
John
W7JKG

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Curly's Wx Story script
« Reply #104 on: December 31, 2017, 11:33:57 AM »
John, rrrick8,

I have attached two screen captures showing what I am seeing for both Reno and Grand Junction, CO. I see many other sites with similar results. For some reason, some of the sites display in a very wide format.
Your http://www.carsonvalleyweather.com/wxStory_inc.php is fine. All html is clear and correct for all cities, without or with text..
But your wxstory.php has an extra line of code
Code: [Select]
<!-- end of menubar -->

<div id="main-copy">
<pre>
  <table border="0" cellspacing="0" cellpadding="0" style="width: 700px; margin: 20px auto 0px auto;">
 <tr>
  <td style="text-align:center;"><a href="http://www.weather.gov/rev/" onclick="window.open(this.href,'_blank');return false;" title="Click to view this forecast office" style="text-decoration: none; color: inherit;"><span style="font-size:20px; letter-spacing:2px;"><b><span style="color:#0061AC;">WEATHER STORY</span><br />Reno<br /><span style="font-size:60%; vertical-align: text-top;">Weather Forecast Office</span></b></span></a></td>
 </tr>
</table>

You should find that '<pre>' and remove it. That will take care of the very wide page, which only occurs when there is text below the map. That text will be as wide as the longest line, because of that '<pre>'. You can see that all bottom text is displayed in a monospaced courier font and without line-breaks. 
 
We can not check your php script online, so if you can not find that <pre> , post the script here with the .txt extension.

Wim
« Last Edit: December 31, 2017, 11:47:16 AM by wvdkuil »

Offline W3DRM

  • Forecaster
  • *****
  • Posts: 3360
    • Emmett Weather
Re: Curly's Wx Story script
« Reply #105 on: December 31, 2017, 12:52:18 PM »
John, rrrick8,

I have attached two screen captures showing what I am seeing for both Reno and Grand Junction, CO. I see many other sites with similar results. For some reason, some of the sites display in a very wide format.
Your http://www.carsonvalleyweather.com/wxStory_inc.php is fine. All html is clear and correct for all cities, without or with text..
But your wxstory.php has an extra line of code
Code: [Select]
<!-- end of menubar -->

<div id="main-copy">
   <pre>
     <table border="0" cellspacing="0" cellpadding="0" style="width: 700px; margin: 20px auto 0px auto;">
 <tr>
  <td style="text-align:center;"><a href="http://www.weather.gov/rev/" onclick="window.open(this.href,'_blank');return false;" title="Click to view this forecast office" style="text-decoration: none; color: inherit;"><span style="font-size:20px; letter-spacing:2px;"><b><span style="color:#0061AC;">WEATHER STORY</span><br />Reno<br /><span style="font-size:60%; vertical-align: text-top;">Weather Forecast Office</span></b></span></a></td>
 </tr>
</table>

You should find that '<pre>' and remove it. That will take care of the very wide page, which only occurs when there is text below the map. That text will be as wide as the longest line, because of that '<pre>'. You can see that all bottom text is displayed in a monospaced courier font and without line-breaks. 
 
We can not check your php script online, so if you can not find that <pre> , post the script here with the .txt extension.

Wim

Wim, you are a genius! =D&gt;  That was the problem. Since I was incorporating this code into my Saratoga template, I had simply taken the code and included the <pre>...</pre> in my wxstory.php and that is what was causing the issue with screen width.

Thank you very much for the assistance. I have included the code section from my wxstory.php that I am now using to include the wxStory_inc.php, for Saratoga template users.

Code: [Select]
<body>
<?php
############################################################################
include("header.php");
############################################################################
include("menubar.php");
############################################################################
?>


<div id="main-copy">
  <?php include("wxStory_inc.php"); ?> 
<><!-- end main-copy -->

<?php
############################################################################
include("footer.php");
############################################################################
# End of Page
############################################################################
?>

Don - W3DRM - Emmett, Idaho --- Blitzortung ID: 808 --- FlightRadar24 ID: F-KBOI7
Davis Wireless VP2, WD 10.37s150,
StartWatch, VirtualVP, VPLive, Win10 Pro
--- Logitech HD Pro C920 webcam (off-line)
--- RIPE Atlas Probe - 32849

Offline tmabell

  • Forecaster
  • *****
  • Posts: 394
    • Mishawaka Weather
Re: Curly's Wx Story script
« Reply #106 on: February 28, 2018, 04:26:51 PM »
I think this script is another casualty of the changes made yesterday by the NWS.  There are no images showing as of today.  Any thoughts on what needs to be changed?

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Curly's Wx Story script
« Reply #107 on: February 28, 2018, 07:32:39 PM »
I just checked it this morning and it was working.  Now it's not displaying the graphics.

Yecchhh! :-(
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Curly's Wx Story script
« Reply #108 on: February 28, 2018, 07:36:01 PM »
I'd try changing
Code: [Select]
(in_array($wswfo, $hpwxs)) ? $wxsurl =  'http://www.weather.gov/'.$wswfo.'/' : $wxsurl = 'http://www.weather.gov/'.$wswfo.'/weatherstory';
to
Code: [Select]
(in_array($wswfo, $hpwxs)) ? $wxsurl =  'https://www.weather.gov/'.$wswfo.'/' : $wxsurl = 'https://www.weather.gov/'.$wswfo.'/weatherstory';
and make sure you have
Code: [Select]
$useCURL        = true;               // true=get data by cURL method  false=stream data
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: Curly's Wx Story script
« Reply #109 on: February 28, 2018, 07:41:19 PM »
Thanks, but no joy, Ken.  Still no images.  I tried  to place 'oax' in the https array, but that didn't work either.

Curly's code is more than a bit difficult for me to unwind.  I've given it a shot but now I'm not even seeing new images show up in my '/wscache' directory.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Curly's Wx Story script
« Reply #110 on: February 28, 2018, 08:07:58 PM »
Not every city displays graphics on a regular or daily basis. PSR is a good example. Yesterday there was info about a coming rainstorm and a large graphic to go along with it. Today it says, "Phoenix does not have the Weather Story." Well they do, but when they want. I pushed a lot of green buttons on the map today. Pretty much the same wording along with a lot of other text items below the map.
« Last Edit: February 28, 2018, 08:11:17 PM by jgillett »
John
W7JKG

Offline mkutche

  • Forecaster
  • *****
  • Posts: 1041
    • GosportWx.com
Re: Curly's Wx Story script
« Reply #111 on: February 28, 2018, 08:39:26 PM »
Thanks, but no joy, Ken.  Still no images.  I tried  to place 'oax' in the https array, but that didn't work either.

Curly's code is more than a bit difficult for me to unwind.  I've given it a shot but now I'm not even seeing new images show up in my '/wscache' directory.


none of mine are working either.. i applied the fix that ken suggested but nothing. http://www.gosportwx.com/wxstory.php?i=ind
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline W3DRM

  • Forecaster
  • *****
  • Posts: 3360
    • Emmett Weather
Re: Curly's Wx Story script
« Reply #112 on: March 01, 2018, 11:01:49 AM »
Worked fine for me two days ago (2/27) but now all I get is the text with a broken image symbol displayed. Just when I need it most as we have the season's largest storm coming-in right now...  ](*,)
Don - W3DRM - Emmett, Idaho --- Blitzortung ID: 808 --- FlightRadar24 ID: F-KBOI7
Davis Wireless VP2, WD 10.37s150,
StartWatch, VirtualVP, VPLive, Win10 Pro
--- Logitech HD Pro C920 webcam (off-line)
--- RIPE Atlas Probe - 32849

Offline jmcmurry

  • Jim McMurry
  • Forecaster
  • *****
  • Posts: 528
  • Davis Vantage Pro 2 Plus Wireless.
    • Juneau County Weather
Re: Curly's Wx Story script
« Reply #113 on: March 01, 2018, 11:09:30 AM »
It seems that the NWS used to accept query strings without a "?" such as http://www.weather.gov/images/arx/wxstory/Tab2FileL.png e73c9f3d342158b6aa283cb30e80054 but no longer does.  Perhaps Ken and his regex wizardry will be able to come up with a better fix, but this seems to be doing it for me:
replace
Code: [Select]
function GetDataByCurl($url)    {
  global $noted;                                                          // set global

with
function GetDataByCurl($url)    {
  $url = str_replace("png ", "png?", $url);    // added 3/1/18
  global $noted;                                                          // set global
and
Code: [Select]

function getWSBystream($url) {
  global $noted;

with
function getWSBystream($url) {
  $url = str_replace("png ", "png?", $url);        // added 3/1/18
  global $noted;

- Jim

Forum Search and Google Can be Your Best Friends

Online 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1308
  • BismarckWeather.net
    • BismarckWeather.net
Re: Curly's Wx Story script
« Reply #114 on: March 01, 2018, 11:19:29 AM »
That update worked for me as well.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Curly's Wx Story script
« Reply #115 on: March 01, 2018, 12:45:02 PM »
Thanks, Jim! \:D/ =D&gt; \:D/ Works great!
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline W3DRM

  • Forecaster
  • *****
  • Posts: 3360
    • Emmett Weather
Re: Curly's Wx Story script
« Reply #116 on: March 02, 2018, 10:21:46 AM »
Thanks, Jim! \:D/ =D&gt; \:D/ Works great!

Jerry  - I notice the map does not change when you select the various green dots. Once I select another location, it always shows the Pocatello, ID section of the map. The wx story and header do change with each different selection. Not sure if it's me or not. I've tried it on Chrome and Firefox and get similar results.
Don - W3DRM - Emmett, Idaho --- Blitzortung ID: 808 --- FlightRadar24 ID: F-KBOI7
Davis Wireless VP2, WD 10.37s150,
StartWatch, VirtualVP, VPLive, Win10 Pro
--- Logitech HD Pro C920 webcam (off-line)
--- RIPE Atlas Probe - 32849

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Curly's Wx Story script
« Reply #117 on: March 02, 2018, 10:28:51 AM »
Thanks, Jim! \:D/ =D&gt; \:D/ Works great!

Jerry  - I notice the map does not change when you select the various green dots. Once I select another location, it always shows the Pocatello, ID section of the map. The wx story and header do change with each different selection. Not sure if it's me or not. I've tried it on Chrome and Firefox and get similar results.
I think it has to do with file permissions, but I haven't solved the problem yet.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline W3DRM

  • Forecaster
  • *****
  • Posts: 3360
    • Emmett Weather
Re: Curly's Wx Story script
« Reply #118 on: March 02, 2018, 11:21:11 AM »
Jim's update worked for me, except for the Reno sector. Others appear to be working just fine but not Reno, that still gives me the broken image icon... And, the map shows the correct selection so not sure what the issue is with Jerry's. It could be file permissions as he indicated.
Don - W3DRM - Emmett, Idaho --- Blitzortung ID: 808 --- FlightRadar24 ID: F-KBOI7
Davis Wireless VP2, WD 10.37s150,
StartWatch, VirtualVP, VPLive, Win10 Pro
--- Logitech HD Pro C920 webcam (off-line)
--- RIPE Atlas Probe - 32849

Offline jmcmurry

  • Jim McMurry
  • Forecaster
  • *****
  • Posts: 528
  • Davis Vantage Pro 2 Plus Wireless.
    • Juneau County Weather
Re: Curly's Wx Story script
« Reply #119 on: March 02, 2018, 02:41:42 PM »
I just tried Reno and it worked fine for me.

As for the overlays on the US map working, are you using wscache as your cache?  I had to go to that to fix something, but I don't remember what the problem was when I did that.  I used to be able to remember things.

- Jim

Forum Search and Google Can be Your Best Friends

Offline W3DRM

  • Forecaster
  • *****
  • Posts: 3360
    • Emmett Weather
Re: Curly's Wx Story script
« Reply #120 on: March 02, 2018, 03:14:50 PM »
I just tried Reno and it worked fine for me.

As for the overlays on the US map working, are you using wscache as your cache?  I had to go to that to fix something, but I don't remember what the problem was when I did that.  I used to be able to remember things.

- Jim
The Reno image is working now. I don't know what "wscache" is...
Don - W3DRM - Emmett, Idaho --- Blitzortung ID: 808 --- FlightRadar24 ID: F-KBOI7
Davis Wireless VP2, WD 10.37s150,
StartWatch, VirtualVP, VPLive, Win10 Pro
--- Logitech HD Pro C920 webcam (off-line)
--- RIPE Atlas Probe - 32849

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Curly's Wx Story script
« Reply #121 on: March 02, 2018, 03:51:34 PM »
The Reno image is working now. I don't know what "wscache" is...
Created by wxStory_inc.php - $ws_cachefolder = './wscache/'; Also $wfomaps = './wsimages/';

It's loaded with stuff!
« Last Edit: March 02, 2018, 03:53:50 PM by jgillett »
John
W7JKG

Offline W3DRM

  • Forecaster
  • *****
  • Posts: 3360
    • Emmett Weather
Re: Curly's Wx Story script
« Reply #122 on: March 02, 2018, 04:14:55 PM »
The Reno image is working now. I don't know what "wscache" is...
Created by wxStory_inc.php - $ws_cachefolder = './wscache/'; Also $wfomaps = './wsimages/';

It's loaded with stuff!

Yes, I see them now. Both of them are loaded with files. I also have another folder named "wsmainimages". It has one file in it named WS_map.png. That same file is also located in the wsimages folder. They appear to be identical.
Don - W3DRM - Emmett, Idaho --- Blitzortung ID: 808 --- FlightRadar24 ID: F-KBOI7
Davis Wireless VP2, WD 10.37s150,
StartWatch, VirtualVP, VPLive, Win10 Pro
--- Logitech HD Pro C920 webcam (off-line)
--- RIPE Atlas Probe - 32849

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Curly's Wx Story script
« Reply #123 on: March 02, 2018, 04:33:43 PM »
Yes, I see them now. Both of them are loaded with files. I also have another folder named "wsmainimages". It has one file in it named WS_map.png. That same file is also located in the wsimages folder. They appear to be identical.
Interesting - I don't have the "wsmainimages".
John
W7JKG

Offline W3DRM

  • Forecaster
  • *****
  • Posts: 3360
    • Emmett Weather
Re: Curly's Wx Story script
« Reply #124 on: March 02, 2018, 10:47:14 PM »
Yes, I see them now. Both of them are loaded with files. I also have another folder named "wsmainimages". It has one file in it named WS_map.png. That same file is also located in the wsimages folder. They appear to be identical.
Interesting - I don't have the "wsmainimages".

It's a mystery to me too. I suspect it might be a remnant of an earlier installation although all of the image files have a date of 1/6/2018 which is about the time I installed the Weather story routines. I don't have the original files I downloaded so can't go back to them to see if there was a sub-folder in them.

However, this brings up a question regarding the map of the US which shows the wfo's who participate in the weather story program. Who maintains this image file and how does it get updated when wfo's come on-line or drop-off the program?
Don - W3DRM - Emmett, Idaho --- Blitzortung ID: 808 --- FlightRadar24 ID: F-KBOI7
Davis Wireless VP2, WD 10.37s150,
StartWatch, VirtualVP, VPLive, Win10 Pro
--- Logitech HD Pro C920 webcam (off-line)
--- RIPE Atlas Probe - 32849

 

anything