Hi all
So I finally got my web site up and running (www.moodyweather.ca) using the awesome templates from Ken True @ Saratogo Weather. After a couple weeks figuring out how to make the necessary alterations, I got it close to what I'm happy with. However, there's a few questions I have and I was hoping someone could help me with.
1) The main page seems to stop updating after a while. I'm not sure how long it keeps updating, I did make an adjustment in one of the files but it doesn't seem to be affecting it, and I'm wondering if there's a way to make it keep updating, even if the page isn't my focused web page?
Hi Ray,
I'm glad you're enjoying fiddling with the template set
That setting is in ajaxWLCOMwx.js
var maxupdates = 10; // Maxium Number of updates allowed (set to zero for unlimited)
change it to
var maxupdates = 0; // Maxium Number of updates allowed (set to zero for unlimited)
and the updates will not 'pause' after 10 cycles.
2) On the main page, I'd like to add a 3-4 day forecast at the bottom like Ken has on his site (https://saratoga-weather.org/index.php). Could someone help me figure out how to do this?
Yes, but I'll have to dig out the example code to post later.
3) Ken's site has really nice rounded edges. Is it easy to alter to get that affect?
My site cheats a bit.. it's using a image for the top and bottom to achieve the rounded effect. You can change the CSS for your site (weather-screen-blue-narrow.css) by adding this
/************************************************************
* Steve Jenkins' Rounded Corners for Saratoga WX Templates *
* https://github.com/stevejenkins/saratoga-rounded-corners *
* http://weather.lakewebster.com/ *
* Version 1.2 (Feb 9, 2015) *
***********************************************************/
/* Comment out any of the CSS formatting you don't want /*
/* Sitewide Header Corners */
#header {border-radius: 11px;}
/* Sitewide Outer Border Corners */
#page {border-radius: 12px;}
/* Sitewide Footer Corners */
#footer {
border-bottom-left-radius: 11px;
border-bottom-right-radius: 11px;
}
/* Homepage Icon Corners */
.ajaxDashboard img {border-radius:5px;}
to the end of that file.
4) On the 'Radar/Local Radar' page, the map size seems to be off; it's cutting off the bottom of the map, as seen by the missing information at the bottom of the rain metre bar. How do I change the map size?
You seemed to have changed a line in ec-radar.php which now reads
if (! preg_match('|^[WX]|',$siteID) || ($siteID == 'WUJ') ) {
and that is incorrect. The line should read
if (! preg_match('|^[WX]|',$siteID) || ($siteID == 'WRN') ) {
and that will fix the 'short' map display on wxradar.php
Note.. you should do customization in Settings.php and Settings-weather.php, not in the individual support scripts like ec-radar.php or ec-forecast.php -- that way, when a new version of the support script is released, you can just replace it as the customization is already saved in Settings.php/Settings-weather.php
5) Is it possible to add to the Radar fly-out menu to offer Regional and National maps (and the related pages of course)? The current one is local only.
Sure. Copy wxradar.php to a new name (wxradarregional.php). Edit the page and where it says
<?php
$doInclude = true;
$doPrint = true;
include_once("ec-radar.php");
?>
just change that to
<?php
// fetch fresh national radar image if needed .. you can chang it to
// 'NAT' = National radar view
// 'PAC' = Pacific region
// 'WRN' = Praries region
// 'ONT' = Ontario
// 'QUE' = Quebec
// 'ERN' = Atlantic region
$_REQUEST['site'] = 'NAT'; // one of the sites above, or your radar designator
$doInclude = true;
$doPrint = true;
include_once("ec-radar.php");
?>
and the national radar will be shown on the page.
6) How do I add WXSIM forecasts? On Ken's page it seems to be integrated, and there is a link to it in 'Forecast & Advisories/WXSIM Forecast Details' menu, but it says it's not available. Is it available for Canada?
WXSIM is a purchased product from
www.wxsim.com -- if you elect to buy it, then the WXSIM forecast can display.
If you don't have WXSIM installed, you can turn off the note by changing Settings.php
$SITE['WXSIM'] = true; // Set to false if you have not installed WXSIM
to
$SITE['WXSIM'] = false; // Set to false if you have not installed WXSIM
7) I'm currently trying to get the Yesterday Data cron job to work, but I haven't figured it out yet. I'm hosting with GoDaddy because it was the only one of all my options I had looked at that allowed cron jobs. My current job is "59 23 * * * /home/<name>/saveYesterday.php >/dev/null 2>&1". Does this seem right?
On GoDaddy, you'll have to use a different format to run the PHP interpreter .. the PHP script is not directly executable in linux. Try
59 23 * * * /usr/bin/php -q $HOME/public_html/saveYesterday.php >/dev/null 2>&1
Note.. the shell variable $HOME will expand to be the filesystem path to your account's home directory when the cron is run, so no other change is needed to that code.
Thanks for any help. I'm loving having a weather station now and setting up a web site is such a fun way to share my hobby.
Ray