WXforum.net
May 24, 2013, 02:13:51 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
Members: 6620  •  Posts: 178784  •  Topics: 18139
Please welcome moranbahweather, our newest member.
Welcome to the the new hosting for WXforum.net.
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: GRLevel 3 Issue  (Read 855 times)
0 Members and 1 Guest are viewing this topic.
jdenlinger
Member
*
Offline Offline

Posts: 7



« on: April 23, 2012, 09:54:59 AM »

I am having difficulty integrating the GRLevel 3 script into my weather website. I have configured and uploaded the GR3-radar-inc.php script. The script is working properly here:

http://lancasterweatheronline.com/GR3-radar-inc.php

But, when I add the following code to my radar page I get the following message "GRLevel3 radar images are not available at this time."

Code:
<div align="center">
       <?php include("GR3-radar-inc.php"); ?>
    </div>

http://lancasterweatheronline.com/wxradar.php

The directory for the radar images is '/images' Any guidance here would be helpful. Likely this is an easy fix and I just need a fresh eye!
Logged
k8jsl
Member
*
Offline Offline

Posts: 9


WWW
« Reply #1 on: April 23, 2012, 11:18:45 AM »

try putting the full path to the images directory
not just /images
Logged

jdenlinger
Member
*
Offline Offline

Posts: 7



« Reply #2 on: April 23, 2012, 11:34:27 AM »

Thanks for the suggestion. I added the full path 'http://www.lancasterweatheronline.com/images/' and now both the GR3-radar-inc.php and the radar page are showing that radar images are unavailable at this time?
Logged
k8jsl
Member
*
Offline Offline

Posts: 9


WWW
« Reply #3 on: April 23, 2012, 11:46:22 AM »

file path not URL ..
or try ./images  make sure the period is there
Logged

jdenlinger
Member
*
Offline Offline

Posts: 7



« Reply #4 on: April 23, 2012, 12:11:29 PM »

Changed the file path to './images' images are still not loading.
Logged
DaculaWeather
It's a Jeep thing... you wouldn't understand.
Forecaster
*****
Offline Offline

Posts: 2746


SCCA EM #156


WWW
« Reply #5 on: April 23, 2012, 04:04:48 PM »

I'm seeing this:

// configuration section
// webroot = '/home4/jeremyd1/public_html/weather'
// path = '/'

That path ain't gonna get you there!

Are both pages on the same root level?
Logged

Steve
Davis Vue, VWS, WDisplay, VVP, StartWatch CWOP 

jdenlinger
Member
*
Offline Offline

Posts: 7



« Reply #6 on: April 23, 2012, 04:42:16 PM »

Yes, the images folder, GR3-radar-inc.php script and wxradar.php are all in the same directory 'weather' on my web-server. It appears that the script is not applying the correct directory to search for images? Here are the settings I have in the GR3-radar-inc.php file:

We have tried the full URL to the images directory & ./images for $GR3DIR

# GRLevel3 Radar image settings
$GR3radar   = 'kccx';   // set to lower-case full name of NEXRAD radar site (ICAO)
$GR3DIR      = '/images';    // set to directory for GRLevel3 images (or '/' for root directory
$GR3type   = 'br1';      // default radar image type 'cr','br','cr248','br1' etc.
$GR3img      = 'jpg';   // GR3 image type 'jpg' or 'png'
$GR3cnt      = 10;      // number of images in series 10=(_0 ... _9 in name of file)
$GR3width   = 512;      // width of GR3 images
$GR3height  = 512;      // height of GR3 images
$GR3maxAge =  1200;  // image_0 has to be less than 20 minutes old for consideration
$GR3notAvailMsg = 'GRLevel3 radar images are not available at this time.';
$GR3notCurrentMsg = 'GRLevel3 radar image is not current - more than %s seconds old.'; 
Logged
DaculaWeather
It's a Jeep thing... you wouldn't understand.
Forecaster
*****
Offline Offline

Posts: 2746


SCCA EM #156


WWW
« Reply #7 on: April 23, 2012, 07:49:39 PM »

Just for grins, have you tried a backslash after images... /images/
Logged

Steve
Davis Vue, VWS, WDisplay, VVP, StartWatch CWOP 

jdenlinger
Member
*
Offline Offline

Posts: 7



« Reply #8 on: April 23, 2012, 09:47:06 PM »

Yes, I have tried adding a back-slash, no change. Images load http://lancasterweatheronline.com/GR3-radar-inc.php but do not on the radar page.
Logged
saratogaWX
Administrator
Forecaster
*****
Online Online

Posts: 3747


Saratoga, CA, USA Weather - free PHP scripts


WWW
« Reply #9 on: April 24, 2012, 02:36:46 AM »

In your Settings.php, you need to have
Code:
$SITE['GR3DIR'] = '/images';


The GR3-radar-inc.php script uses the $SITE['GR3...'] entries for configuration when included in the template set.

Best regards,
Ken
Logged

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
jdenlinger
Member
*
Offline Offline

Posts: 7



« Reply #10 on: April 24, 2012, 01:05:50 PM »

I added

Code:
$SITE['GR3DIR'] = '/images';

To the settings.php file and it is still not working?
Logged
saratogaWX
Administrator
Forecaster
*****
Online Online

Posts: 3747


Saratoga, CA, USA Weather - free PHP scripts


WWW
« Reply #11 on: April 24, 2012, 02:19:35 PM »

Ahhh... there are multiple settings in Settings.php that need to match what you've put in your (working) GR3-radar-inc.php script.

GR3-radar-inc.php has
Code:
$GR3radar = 'kccx'; // set to lower-case full name of NEXRAD radar site (ICAO)
$GR3DIR = '/images/'; // set to directory for GRLevel3 images (or '/' for root directory
$GR3type = 'br1'; // default radar image type 'cr','br','cr248','br1' etc.
$GR3img = 'jpg'; // GR3 image type 'jpg' or 'png'
$GR3cnt = 10; // number of images in series 10=(_0 ... _9 in name of file)
$GR3width = 512; // width of GR3 images
$GR3height  = 512; // height of GR3 images
while your current Settings.php has
Code:
$SITE['GR3DIR'] = '/images';
$SITE['GR3radar'] = 'CCX';
$SITE['GR3type'] = 'cr';
$SITE['GR3img'] = 'jpg';
$SITE['GR3cnt'] = '10';
$SITE['GR3width'] = '512';
$SITE['GR3height'] = '512';

Change Settings.php to have
Code:
$SITE['GR3DIR'] = '/images';
$SITE['GR3radar'] = 'kccx';
$SITE['GR3type'] = 'br1';
$SITE['GR3img'] = 'jpg';
$SITE['GR3cnt'] = '10';
$SITE['GR3width'] = '512';
$SITE['GR3height'] = '512';
and it should work in the template.

Remember that $SITE[] values will override local settings in scripts to make it easy to configure using just Settings.php instead of customizing each script individually.

Best regards,
Ken
Logged

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
jdenlinger
Member
*
Offline Offline

Posts: 7



« Reply #12 on: April 24, 2012, 02:29:05 PM »

Thanks so much Ken! You rock!

I didn't realize that some of the scripts were being duplicated in the settings.php file. I will keep that in mind in the future when adding additional functionality!
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.106 seconds with 19 queries.