What am I missing with POP?

First off, I want to thank those who have the time and ability to write these great scripts to use along side of the countless other programs we use for the weather. Being very new to php, I seem to be stuck getting the POP to show up on the WXSIM forecast. I have the latest version of the script and have only made changes to blend it into my site, but get no pop: http://www.pdfamily.com/weather/forecast/sim.php , yet it shows up on the NWS forecast on my comparison page: http://www.pdfamily.com/weather/forecast/compare.php …what did I miss?

You’re quite welcome!

I’m sorry there’s an issue with your plaintext-parser.php not displaying the PoP on the icons… I see you have the icons in your /weather/forecast/images directory. Did you set

$iconDir ='./forecast/images/';           // directory for carterlake icons

to the directory or are you using relative URL addressing? It should work for your setup with

$iconDir ='/weather/forecast/images/';           // directory for carterlake icons

The code does a test to see if the image file with PoP exists in the directory before using it… if it exists, the PoP stamped icon is used, otherwise it uses the plain (unstamped) icon. Try changing the $iconDir to /weather/forecast/images/ and see if that fixes the issue.

Best regards,
Ken

I did have it as:
$iconDir =‘Index of /weather/forecast/images // directory for carterlake icons
and just tried:
$iconDir =’/weather/forecast/images/'; // directory for carterlake icons
with no luck either. I don’t see anything in plaintext-parser-data.txt that needs to be set…?

It’s not in plaintext-parser-data.txt , the $iconDir is in plaintext-parser.php in a ‘settings area’ which looks like this

// Settings ---------------------------------------------------------------
$iconDir ='./forecast/images/';           // directory for carterlake icons
$WXSIMstation = "Saratoga-Weather.org";   // name of your weather station
$plaintextFile = './plaintext.txt';       // location of the WXSIM plaintext.txt
$lang = 'en';                             // default language is 'en' = English
$tempDegrees = '°';                   // set to '' to omit degree sign
//                                        //   or set to '°', '°F' or '°C'
$maxWidth = '640px';                      // max width of tables (could be '100%')
$minPoP = '40';                           // PoP must be this or above to display
//                                        // rain icon, otherwise sky icon w/PoP displayed.
// ---- end of settings ---------------------------------------------------

It needs to be the relative URL address (without the http://hostname). Since you’re in the /weather/ directory (I think), it should be either ‘…/weather/forecast/images/’ or ‘/weather.forecast/images’ to work on your site, I think.

Best regards,
Ken

Thanks Ken,

Turns out that only ‘images/’ or ‘./images/’ work, nothing else.
#-o

Great! I’m glad it was resolved.

With PHP, some things can be ‘relative file address’ and some a ‘relative URL address’ … the plaintext-parser needs the relative address from it’s location to the images directory, so your ‘images/’ or ‘./images/’ both meet the test in your specific setup.

Best regards,
Ken