WXforum.net
Web Weather => Weather Website PHP/AJAX scripting => Custom Website Templates => Topic started by: vinesweather 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 (https://vinesweather.com)
[ You are not allowed to view attachments ]
-
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 (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 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 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 $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 $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 } else if ($fcstorg == 'DarkSky') {
$forecasticons = $DSforecasticons;
$forecasttemp = $DSforecasttemp;
$forecasttitles = $DSforecasttitles;
$forecasttext = $DSforecasttext;
to } 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.
-
[tup] Brilliant as usual Ken! Many thanks for this. Much appreciated.