Author Topic: Cant get to work GR3-radar-inc.php and advforecast2.php scripts in the same page  (Read 983 times)

0 Members and 1 Guest are viewing this topic.

Offline Gerry0587

  • Senior Member
  • **
  • Posts: 68
I'm trying to have both scripts in the same page but the GR3-radar-inc.php script won't work and gives me the "GRLevel3 radar images are not available at this time" message. However, when I try the GR3-radar-inc.php in a page without the advorecast2 script it works flawlessly.

Any help will be greatly appreciated.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
That shouldn't be a problem.. on a copy of wxnewpage.php, just have the main content be
Code: [Select]
<div id="main-copy">
 
<h1><?php langtrans('GRLevel3+advforecast2'); ?></h1>
<p>&nbsp;</p>

  <?php @include("radar-status.php"); ?>

  <?php include_once("GR3-radar-inc.php"); ?>
<hr/>
<?php
   $doIncludeNWS 
true;
 $doPrintNWS   true;
 include_once("advforecast2.php");
 
?>
   
   
</div><!-- end main-copy -->
and it works fine (see https://saratoga-weather.org/wxtemplates/USA/wxgr3fcst.php for an example)
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 Gerry0587

  • Senior Member
  • **
  • Posts: 68
Hi! I just tried that but it gives me the message: "GRLevel3 radar images are not available at this time."

http://weatherpr.com/wxnewpage.php

However in this page it works perfectly:
http://weatherpr.com/testindex.php

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
In the wxnewpage.php, you're asking for CR type images (which are not uploaded to your site).  In the testindex.php you're asking for BR images (which are found).
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 Gerry0587

  • Senior Member
  • **
  • Posts: 68
I just checked and I have the $GR3type= 'br' in the "GR3-radar-inc.php" file used in both pages...
« Last Edit: June 19, 2018, 11:36:59 PM by Gerry0587 »

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
In the Settings.php, you have
Code: [Select]
$SITE['GR3type']    = 'cr';        // radar image type 'cr','br','cr248','br1' etc.
which overrides the $GR3type setting in the script (when included in a template page).

Change Settings.php to have
Code: [Select]
$SITE['GR3type']    = 'br';        // radar image type 'cr','br','cr248','br1' etc.
and wxnewpage.php should work also.
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 Gerry0587

  • Senior Member
  • **
  • Posts: 68
Perfect! That worked out!! Very grateful!

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
You're welcome!  If you download https://saratoga-weather.org/saratoga-icons2.zip , unzip and upload it all to your site, then the dual-image processing will work on your forecast from the NWS.
The .zip has:
DualImage.php
./forecast/images
./forecast/icon-templates
so be sure to upload them to those positions (DualImage.php in document root, others in the subdirectories listed).

Also.. http://weatherpr.com/check-fetch-times.php?show=versions shows you have some updates to do :)
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 Gerry0587

  • Senior Member
  • **
  • Posts: 68
Thanks for the tips!  :-)

 

anything