Author Topic: Aerisweather & Alternative Dashboard  (Read 311 times)

0 Members and 1 Guest are viewing this topic.

Offline vinesweather

  • Firefighter
  • Senior Contributor
  • ****
  • Posts: 208
  • Be patient...I'm a firefighter not a computer whiz
    • The Vines Weather
Aerisweather & Alternative Dashboard
« on: January 29, 2021, 05:42:19 AM »
Hello
I have recently updated my Saratoga templates to include Aerisweather. I use the alternative dashboard and for some reason, it now puts the whole forecast page at the beginning of my alt dashboard rather than in the forecast box to the right and at the bottom. I have uploaded the following files(Screenshot attached) to update the template, and adjusted settings.php to reflect Aerisweather.
Any help will be very much appreciated.
Thanks
Chris
https://vinesweather.com
 [ You are not allowed to view attachments ]

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 8387
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Aerisweather & Alternative Dashboard
« Reply #1 on: January 30, 2021, 12:19:30 PM »
Hello
I have recently updated my Saratoga templates to include Aerisweather. I use the alternative dashboard and for some reason, it now puts the whole forecast page at the beginning of my alt dashboard rather than in the forecast box to the right and at the bottom. I have uploaded the following files(Screenshot attached) to update the template, and adjusted settings.php to reflect Aerisweather.
Any help will be very much appreciated.
Thanks
Chris
https://vinesweather.com

Hi Chris,
The alternative dashboard 6.95c doesn't include the shim code for aerisweather forecasts, but it's easy enough to add.

Change alt-dashboard6.php from
Code: [Select]
if ($fcstby == 'DarkSky') {

$SITE['fcstscript'] = 'DS-forecast.php';    // DarkSky forecast
$SITE['fcstorg'] = 'DarkSky';    // set to 'DarkSky' for DarkSky forecast
$fcstorg = $fcstby;
$fcstscript = $SITE['fcstscript'];
}
to
Code: [Select]
if ($fcstby == 'DarkSky') {

$SITE['fcstscript'] = 'DS-forecast.php';    // DarkSky forecast
$SITE['fcstorg'] = 'DarkSky';    // set to 'DarkSky' for DarkSky forecast
$fcstorg = $fcstby;
$fcstscript = $SITE['fcstscript'];
}
if ($fcstby == 'AW') {

$SITE['fcstscript'] = 'AW-forecast.php';    // Non-USA, Non-Canada Aerisweather Forecast Script
$SITE['fcstorg'] = 'Aerisweather';    // set to 'Aerisweather' for Aerisweather.com
$fcstorg = $fcstby;
$fcstscript = $SITE['fcstscript'];
}

and
Code: [Select]
  $doPrintNWS = false; // suppress printing of forecast by advforecast2.php
  $doPrint    = false; // suppress printing of ec-forecast.php
  $doPrintWU  = false; // suppress printing of WU-forecast.php
$doPrintDS  = false; // suppress printing of DarkSky DS-forecast.php
$doPrintWC  = false; // suppress printing of WU/TWC WC-forecast.php
  include_once($fcstscript); // for the forecast icon stuff
to
Code: [Select]
  $doPrintNWS = false; // suppress printing of forecast by advforecast2.php
  $doPrint    = false; // suppress printing of ec-forecast.php
  $doPrintWU  = false; // suppress printing of WU-forecast.php
  $doPrintWC  = false; // suppress printing of WC-forecast.php
$doPrintDS  = false; // suppress printing of DarkSky DS-forecast.php
$doPrintAW  = false; // suppress printing of Aerisweather AW-forecast.php
  include_once($fcstscript); // for the forecast icon stuff


and
Code: [Select]
} else if ($fcstorg == 'DarkSky') {
  $forecasticons = $DSforecasticons;
  $forecasttemp = $DSforecasttemp;
  $forecasttitles = $DSforecasttitles;
  $forecasttext = $DSforecasttext;
to
Code: [Select]
} else if ($fcstorg == 'Aerisweather') {
  $forecasticons = $AWforecasticons;
  $forecasttemp = $AWforecasttemp;
  $forecasttitles = $AWforecasttitles;
  $forecasttext = $AWforecasttext;

} else if ($fcstorg == 'DarkSky') {
  $forecasticons = $DSforecasticons;
  $forecasttemp = $DSforecasttemp;
  $forecasttitles = $DSforecasttitles;
  $forecasttext = $DSforecasttext;
and that should fix the problem.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline vinesweather

  • Firefighter
  • Senior Contributor
  • ****
  • Posts: 208
  • Be patient...I'm a firefighter not a computer whiz
    • The Vines Weather
Re: Aerisweather & Alternative Dashboard
« Reply #2 on: January 30, 2021, 02:08:53 PM »
 [tup] Brilliant as usual Ken! Many thanks for this. Much appreciated.