Apparently, there is an error in my copy of the php (most likely introduced by me!), since I haven't seen any reports of this from anyone else.
...Hmm. Interesting.
Remember that wise maxim about software:
If debugging is the process by which bugs are removed from code, then programming is undeniably the way to insert bugs into code! . . .
(...
Sorry to become completely off-topic now, but in case you did not know:
"Computer bugs" is named after the problems when real bugs crawled into the very first supercomputers. Insects crawled in by the vacuum tubes (warm and nice), and caused short circuits. Hence "debugging" back then was to actually go picking the dead bugs out of the computer racks. Things were more obvious.
https://www.msu.edu/course/lbs/126/lectures/history.html )
Sorry to become completely off-topic now, but in case you did not know:
"Computer bugs" is named after the problems when real bugs crawled into the very first supercomputers. Insects crawled in by the vacuum tubes (warm and nice), and caused short circuits. Hence "debugging" back then was to actually go picking the dead bugs out of the computer racks.
Ok, back to the thread now. Sorry for the interruption.
Ok, back to the thread now.Not so fast! I started this thread! :o
Some templates give you a choice of NWS/NOAA icons for graphic display of forecast weather. I like the "KDE" versions since they are round with transparent corners. They are larger files being .png rather than .gif, but that also gives them a much larger range of colors.@xairbusdriver
The intermittent problem I'm seeing is that there seem to be some icons missing from the set I have. It appears to be an icon for windy conditions. The result is not terrible, there is simply an empty area where the icon belongs. There is not even the 'missing graphic' question mark. [cheer] Still, I'd like to find the latest and greatest icon set which hopefully has the required icon. My set has their Creation date of 18 Jun 2013. Are there newer versions? Haven't been able to find any on the interweb. [banghead]
Thanks!
There is also no wind icon in the original set, so I added another icon for that.I think the missing icon occurred when there were higher winds forecast. Perhaps that's the one I'm missing and there is actually a new set available. Since it is a rare occurrence, it's somewhat difficult to 'nail down'.
if (!isset ($wsmyfolder) ) {
$wsmyfolder = '../'; // originally './'
}
# icons
$myImgDir = $wsmyfolder.'img/';
$myIconsDir = $wsmyfolder.'img/';
#
$myDefaultIconsDir = $myIconsDir.'default_icons/';
$myDefaultIconsSml = $myIconsDir.'default_icons_small/';
$myDefaultIconsExt = 'png';
When the NOAA forecast file is parsed, and there is no matching icon, the src then contains an image label of '/.png' which would be a 'hidden' file/directory and it is not even recognized at an image. Fortunately, that prevents the annoying and mostly useless "?" (missing image) display. ;DWhat I need to check the scripts is the location of the scripts, such as startNoaaFull.php and noaaPlainGenerateHtml.phpHere are some of the files at the root level of the site, as far as the forecast scripts and files are concerned. Note that I do not have a "startNoaaFull.php" file, perhaps you are referring to the "printFull.php" which is used to created the "myforecast.php"? The "img", "noaa_forcast", and "forecast.html" directories/files are all at the same level:
img/
default_icons/
default_icons_small/
NOAA_Icons/
NOAA_Icons_small/
wind_icons/
wind_icons_small/
sunrise.png
sunset.png
noaa_forecast/
cache/
lang/
myforecast.php
noaa3.css
noaaDigitalGenerateHtml.php
noaaPlainGenerateHtml.php
noaaSettings-original.php
noaaSettings.php
printIcons.php
printPlain.php
printSmall.php
startLeuven.php
wxStartNoaaFct.php
forecast.html
<body id="top">
<div id="content">
<div id="content_main">
<div class="header">
<h1>7-Day Forecast</h1>
<h4 class="warning_text" style="margin-top:0;">Never base important
decisions on this or any weather information obtained from a non-
NWS site!</h4>
<?php include './WX-date-time-String.php'; ?>
</div>
<div class="centered_menu bottom_pad">
<ul class="dropdown">
<li><a href="./index.html">Current Conditions</a></li>
<li><a href="./gauges.html">Current Gauges</a></li>
<li id="current_page">Forecast</a></li>
<li>?remaining menu items?</li>
</ul>
</div>
<p style="clear:both;line-height:0;margin-top:-1em;"> </p>
<?php include './noaa-warn/noaaWarning-start.php'; ?>
<h3 class="center top_pad bottom_pad">A Detailed Forecast</h3>
<?php include './noaa_forecast/myforecast.php'; ?>
<p class="center top"><a class="normal rounded" href="#top">Top of page</a></p>
</div>
<?php include './WX-pageFooter.php'; ?>
</div>
</body>
Mission complete! Also, fortunately, there was a missing icon because of a fairly gusty forecast this week. Sure enough, that's the kind of icon I needed several weeks ago.
Wim, your instructions were simple enough, even for me. But even after deleting the NOAA forecast text file and (supposedly) emptying the (two different) browser's cache, I was still getting the "?" indication. I think it was simply that your scripts don't check/read the NOAA text file if the 'time delay' ($cacheTime) has not run out. In any case, ~300 seconds after uploading the edited Warning.php file, up came the 'wind sock' icon! [cheer]
Now I'm going to RE-download the stand alone Forecast and Warning templates to see what values you had suggested. I have three different times; noaaPlainGenerateHtml.php: 3600 seconds (1 hour), noaaDigitalGenerateHtml.php: 7200 seconds, noaaWarning.php: 300 seconds comment="advised by noaa nws.eu"
I can understand that Warnings can change quite quickly and 5 minutes should help prevent everyone contacting NOAA too often.
Not sure why the Forecasts (Plain & Digital) use two different times. ??? Seems like 1 hour should be suitable. BTW, I'm assuming that these times are started based on the first time the script ever runs. Then ever 1 or 2 hours after that. :)
That is why the first visitors ( as all files are to old) response time in the morning is longer then subsequent visits.Good to know! I thought it was just my computer being slow to 'wake up'! [lol]