Author Topic: Duplicate Top Warnings on Curlys scritp  (Read 1154 times)

0 Members and 1 Guest are viewing this topic.

Offline MesquiteWx

  • Forecaster
  • *****
  • Posts: 610
    • Mesquite Weather
Duplicate Top Warnings on Curlys scritp
« on: May 30, 2015, 02:20:53 PM »
I am not sure if this has been addressed before or not. I imagine it has but, haven't been able to find that post. Issue I am seeing with Curlys top warning script is if there are multiple warnings of the same warning in the same county, it will duplicate the county for each warning. Is there or has there been a fix for this. These are legit warnings as when you click on it and it takes you to the warning page it will list out all the Flood Warnings within the county. I would think it should only display the county once even if their are multiple warnings of that type as when you click on it, it will take you to the page to display all the warnings. Hope that makes sense. Attached is a screen shot of what I am explaining.

-Thanks

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: Duplicate Top Warnings on Curlys scritp
« Reply #1 on: May 30, 2015, 02:35:30 PM »
Here are my settings within nws-alerts-config.php.


Code: [Select]
// ALERT BOX SETTINGS
$useAlertBox   = true;                      // true=use alert box & write data file   false= not using alert box & don't write file
$titleNewline  = true;                      // true=new line for each title   false=string titles with other titles
$aBox_Width    = '99%';                     // width of box  examples - $aBox_Width = '80%';  $aBox_Width = '850px';  or smallest box  $aBox_Width = '';
$centerText    = true;                     // true=center text in alert box    false=left align text
$showNone      = true;                     // true=show 'NONE' if no alerts in alert box   false=don't show alert box if no alerts
$locSort       = 1;                         // location name sort - use number listed below
//                                             0 = sort location as listed in $myZC array
//                                             1 = sort location alphabetically

$sortbyEvent   = 3;                         // sort titles by severity in alert box & then by number listed below
//                                             0 = location - duplicate events will be displayed
//                                             1 = location - duplicate events removed
//                                             2 = event - duplicate events will be displayed
//                                             3 = event - duplicate events removed


// BIG ICONS
$iconLimit     = 0;                         // the number of icons to display  0=show all
$addNone       = true;                     // true=add NONE foreach location with no alerts        false= don't show any NONE
$shoNone       = true;                      // true=show one 'NONE' if no alerts for all location   false=don't show one 'NONE' if no alerts for all location
$useIcons      = 3;                         // select number below
//                                             0 = don't use icons - the cache file will not be written
//                                             1 = sort by alert - duplicate events will be displayed
//                                             2 = sort by alert - duplicate events removed
//                                             3 = single top alert icon for each location
//                                             4 = sort by location - duplicate removed
//                                             5 = sort by location - duplicate events will be displayed




Ryan 

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

Offline MesquiteWx

  • Forecaster
  • *****
  • Posts: 610
    • Mesquite Weather
Re: Duplicate Top Warnings on Curlys scritp
« Reply #2 on: May 30, 2015, 03:08:28 PM »
Looks like the settings should be ok, according to the settings it shouldn't be showing duplicates.

Code: [Select]
// ALERT BOX SETTINGS
$useAlertBox   = true;                      // true=use alert box & write data file   false= not using alert box & don't write file
$titleNewline  = true;                      // true=new line for each title   false=string titles with other titles
$aBox_Width    = '99%';                     // width of box  examples - $aBox_Width = '80%';  $aBox_Width = '850px';  or smallest box  $aBox_Width = '';
$centerText    = false;                     // true=center text in alert box    false=left align text
$showNone      = true;                      // true=show 'NONE' if no alerts in alert box   false=don't show alert box if no alerts
$locSort       = 0;                         // location name sort - use number listed below
//                                             0 = sort location as listed in $myZC array
//                                             1 = sort location alphabetically

$sortbyEvent   = 3;                         // sort titles by severity in alert box & then by number listed below
//                                             0 = location - duplicate events will be displayed
//                                             1 = location - duplicate events removed
//                                             2 = event - duplicate events will be displayed
//                                             3 = event - duplicate events removed

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: Duplicate Top Warnings on Curlys scritp
« Reply #3 on: May 31, 2015, 07:23:53 AM »
It could have been the NWS leaving expired alerts.
This was fixed in version 1.20

The cache file note most likely will not have any duplicate alert sources.  /cache/nws-notes.txt
« Last Edit: May 31, 2015, 07:33:34 AM by Curly »

Offline MesquiteWx

  • Forecaster
  • *****
  • Posts: 610
    • Mesquite Weather
Re: Duplicate Top Warnings on Curlys scritp
« Reply #4 on: May 31, 2015, 12:22:41 PM »
Thanks Curly, they are not expired alerts, they are active and valid alerts. It just shows the county in the top box for each flood warning alert.

http://www.mesquiteweather.net/wxnws-details.php?a=TXZ119#WA4

I have downloaded the recent version. I have highly modified mine so to keep from overwriting a lot of work. Which specific file has the fix for this so I can just update that file with the new one?

Here is what my notes.txt has.

Code: [Select]
Script characteristics on last page load:

Last run: Sun 05-31-2015 11:30 CDT

nws-alerts.php - 1.29 - 14-Jan-2015 - NWS Public Alerts
Cron job enabled
nws-alerts-config.php has not been updated
Source: http://alerts.weather.gov/cap/wwaatmget.php?x=TXZ104
Source: http://alerts.weather.gov/cap/wwaatmget.php?x=TXC085
Source: http://alerts.weather.gov/cap/wwaatmget.php?x=TXZ120
Source: http://alerts.weather.gov/cap/wwaatmget.php?x=TXC397
Source: http://alerts.weather.gov/cap/wwaatmget.php?x=TXZ119
Source: http://alerts.weather.gov/cap/wwaatmget.php?x=TXC113
Source: http://alerts.weather.gov/cap/wwaatmget.php?x=TXZ121
Source: http://alerts.weather.gov/cap/wwaatmget.php?x=TXC257
Source: http://alerts.weather.gov/cap/wwaatmget.php?x=TXZ105
Source: http://alerts.weather.gov/cap/wwaatmget.php?x=TXC231
Source: http://alerts.weather.gov/cap/wwaatmget.php?x=TXZ103
Source: http://alerts.weather.gov/cap/wwaatmget.php?x=TXC121
Source: http://alerts.weather.gov/cap/wwaatmget.php?x=TXZ118
Source: http://alerts.weather.gov/cap/wwaatmget.php?x=TXC439
Source: http://alerts.weather.gov/cap/wwacapget.php?x=TX1253A9402FE0.FloodWarning.1253AD6B192CTX.FWDFLSFWD.450c007277ddbac247a7f766d39426c9
Source: http://alerts.weather.gov/cap/wwacapget.php?x=TX1253A93E3988.FloodWarning.1253AD6AC080TX.FWDFLSFWD.bb3ab06662b26087bd08663c4d681eb9
Source: http://alerts.weather.gov/cap/wwacapget.php?x=TX1253A9402FE0.FloodWarning.1253AD6A783CTX.FWDFLSFWD.4aa09f19e9005b258b40304ec6ac4edb
Source: http://alerts.weather.gov/cap/wwacapget.php?x=TX1253A9402FE0.FloodWarning.1253AD6A78A0TX.FWDFLSFWD.f22ef3d62b99386f9abb51a5ee7db91f
Source: http://alerts.weather.gov/cap/wwacapget.php?x=TX1253A9402FE0.FloodWarning.1253AD7B8960TX.FWDFLSFWD.cb710dd55fac764d0511d561a903b9cf
Source: http://alerts.weather.gov/cap/wwacapget.php?x=TX1253A93E64E4.FloodWarning.1253AD6A78A0TX.FWDFLWFWD.37da2be5190d4a4dc02798508a856052
Source: http://alerts.weather.gov/cap/wwacapget.php?x=TX1253A9402FE0.FloodWarning.1253AD6A783CTX.FWDFLSFWD.54e86be54b6c9d885a5224e83304d4b7
Source: http://alerts.weather.gov/cap/wwacapget.php?x=TX1253A9402FE0.FloodWarning.1253AD6A78A0TX.FWDFLSFWD.0ea2187e542f45eac1768071338ef33c
Source: http://alerts.weather.gov/cap/wwacapget.php?x=TX1253A93E64E4.FloodWarning.1253AD6B9564TX.FWDFLWFWD.0e03ac4059af378a66d905f79cec2cd1
Source: http://alerts.weather.gov/cap/wwacapget.php?x=TX1253A9402FE0.FloodWarning.1253AD891DF0TX.FWDFLSFWD.8ac3f71adc033ef721af55e6f61ecdd9
Cache file updated: Sun 05-31-2015 11:30 am
Alert box data file updated
Icon data file updated
RSS feed file updated
Alert logging enabled
ERROR writing log file data Sun 05-31-2015 11:30 am
Check file and folder permission levels
Total script process time: 4.8830 seconds

-Thanks
« Last Edit: May 31, 2015, 12:31:14 PM by MesquiteWx »

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: Duplicate Top Warnings on Curlys scritp
« Reply #5 on: June 01, 2015, 04:57:27 AM »
Thanks for posting helpful information.
The key file is nws-alerts.php and there are some added switches to the file nws-alerts-config.php.

Offline MesquiteWx

  • Forecaster
  • *****
  • Posts: 610
    • Mesquite Weather
Re: Duplicate Top Warnings on Curlys scritp
« Reply #6 on: June 01, 2015, 10:29:54 PM »
Thanks Curly, I have updated all the main files and uploaded the new ones as well and it is still duplicated the county name in the top advisory bar if their are multiple alerts in the same county. I.E. Flood Warning, River Flood Warning.

I thought it might have had something to do with my scrolling script you helped me with a couple years ago until I noticed it is even happening on the buttons too. The alerts are not duplicates, just multiple alerts of the same kind in the county which is causing the county to duplicate for the amount of the same alerts that exists. I am just noticing this since the flooding we have been having is rare. Any other ideas of suggestions? I did clear the cache after making the changes.

 

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: Duplicate Top Warnings on Curlys scritp
« Reply #7 on: June 02, 2015, 05:11:26 AM »
What cache file is being used for the top alerts?

Offline MesquiteWx

  • Forecaster
  • *****
  • Posts: 610
    • Mesquite Weather
Re: Duplicate Top Warnings on Curlys scritp
« Reply #8 on: June 02, 2015, 01:22:13 PM »
The top advisory bar is using the cache from cache/nws-alertsMainData.php

The one for the screenshot I attached above is using cache/nws-alertsIconData.php

 

anything