Author Topic: Alt Dashboard Configuration Issues....  (Read 561 times)

0 Members and 1 Guest are viewing this topic.

Offline scudwatcher

  • Billy T. Forecaster Webmaster csraweather.net
  • Senior Contributor
  • ****
  • Posts: 157
  • Amateur Radio KC4SRA csraweather.net
    • CSRA Weather
Alt Dashboard Configuration Issues....
« on: July 07, 2021, 08:45:59 AM »
Yes Sir,
  I am attempting to install the ALT template and get Error: Notice: Underfined Variables when I log on to https://csraweather.org/ajax-dashboard6.php.  Here is how I provided the input in setting-weather.php

$SITE['WXtags']     = 'testtags.php';  // for weather variables .. we're using the old name instead of WDtags.php
$SITE['ajaxScript']     = 'ajaxWDwx3.js'; // for AJAX enabled display
$SITE['ajaxDashboard'] = './ajax-dashboard6.php';
$SITE['clientrawfile']  = 'clientraw.txt';  // directory and name of Weather-Display realtime.txt file
$SITE['graphImageDir']  = './';  // directory location for graph images with trailing /

Could you please advise what I am doing wrong?  Also, do I need to modify ajax-dashboard6.php with the correct time zone?  Thank You, Sir!

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9277
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Alt Dashboard Configuration Issues....
« Reply #1 on: July 07, 2021, 10:54:14 AM »
The ajax-dashboard6.php is not designed to run 'standalone', but needs to be in a wx...php page to work correctly.

For testing, make a copy of wxnewpage.php to wxaltindex.php, and edit wxaltindex.php to have the following
Code: [Select]
<div id="main-copy">
   
<?php // insert desired warning box at top of page

  
if(isset($SITE['NWSalertsCodes']) and count($SITE['NWSalertsCodes']) > 0) {
// Add nws-alerts alert box cache file
include_once("nws-alerts-config.php");
include($cacheFileDir.$aboxFileName);
// Insert nws-alerts alert box
echo $alertBox;
?>

<script type="text/javascript" src="nws-alertmap.js"></script>
<?php
  
  } else { 
// use atom scripts of choice
if ($useTopWarning) {
  include_once("atom-top-warning.php");
} else {
 print "      <div class=\"advisoryBox\">\n";
 $_REQUEST['inc'] = 'y';
 $_REQUEST['summary'] = 'Y';
 include_once("atom-advisory.php");
 print "      </div>\n";
}
  }
?>

<div class="column-dark">
<div align="center">
  <br/>
<?php if(file_exists('USA-regional-maps-inc.php')) { include_once('USA-regional-maps-inc.php'); } ?>
<img src="<?php echo $SITE['imagesDir']; ?>spacer.gif" alt="spacer"
height="2" width="620" style="padding:0; margin:0; border: none" />
<div align="center">
<?php if(isset($SITE['ajaxDashboard']) and file_exists($SITE['ajaxDashboard']))
 { include_once($SITE['ajaxDashboard']);
   } else {
print "<p>&nbsp;</p>\n";
print "<p>&nbsp;</p>\n";
print "<p>Note: ajax-dashboard not included since weather station not yet specified.</p>\n";
        for (
$i=0;$i<5;$i++) { print "<p>&nbsp;</p>\n"; }
}?>

    </div>
</div><!-- end center -->

</div><!-- end column-dark -->

</div><!-- end main-copy -->

Then try loading https://csraweather.org/wxaltindex.php
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 scudwatcher

  • Billy T. Forecaster Webmaster csraweather.net
  • Senior Contributor
  • ****
  • Posts: 157
  • Amateur Radio KC4SRA csraweather.net
    • CSRA Weather
Re: Alt Dashboard Configuration Issues....
« Reply #2 on: July 07, 2021, 01:57:00 PM »
Thank You, Ken.  Will work on this later today.

Offline scudwatcher

  • Billy T. Forecaster Webmaster csraweather.net
  • Senior Contributor
  • ****
  • Posts: 157
  • Amateur Radio KC4SRA csraweather.net
    • CSRA Weather
Re: Alt Dashboard Configuration Issues....
« Reply #3 on: July 07, 2021, 05:57:18 PM »
Ken,
  As instructed, I created wxnewpage.php and saved it as wxaltindex.php  Inserted the code, ftp to webserver for test.  When I loaded csraweather.org/wxaltindex.php, I viewed my current ajax-dashboard.php  I moved the current ajax-dashboard.php file to a different file within my webserver root.  I loaded wxaltindex.php once again.  I viewed the new dashboard "Note: ajax-dashboard not included since weather station not yet specified."  Could you please assist once again?  Thank You.   

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9277
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Alt Dashboard Configuration Issues....
« Reply #4 on: July 07, 2021, 06:20:54 PM »
Please post the contents of wxaltindex.php (copy it to wxaltindex.php.txt and post it).

You do seem to have both ajax-dashboard.php (the stock template version) and ajax-dashboard6.php (the alt dashboard) on your site.
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 scudwatcher

  • Billy T. Forecaster Webmaster csraweather.net
  • Senior Contributor
  • ****
  • Posts: 157
  • Amateur Radio KC4SRA csraweather.net
    • CSRA Weather
Re: Alt Dashboard Configuration Issues....
« Reply #5 on: July 07, 2021, 06:32:52 PM »
Yes Ken, when I move the stock template version away from my webserver root, I view the "new" ajax-dashboard6.php but with no content?

 

anything