Web Weather > Weather Web Site Help

New Site - Some questions for small adjustments

(1/2) > >>

Stryder87:
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?

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?

3) Ken's site has really nice rounded edges.  Is it easy to alter to get that affect?

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?

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.

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?

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?

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.   \:D/

Ray

saratogaWX:

--- Quote from: Stryder87 on July 05, 2018, 07:08:10 PM ---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?

--- End quote ---

Hi Ray,
I'm glad you're enjoying fiddling with the template set :)

That setting is in ajaxWLCOMwx.js
--- Code: ---var maxupdates = 10;          // Maxium Number of updates allowed (set to zero for unlimited)

--- End code ---
change it to
--- Code: ---var maxupdates = 0;          // Maxium Number of updates allowed (set to zero for unlimited)

--- End code ---
and the updates will not 'pause' after 10 cycles.


--- Quote ---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?

--- End quote ---

Yes, but I'll have to dig out the example code to post later.


--- Quote ---3) Ken's site has really nice rounded edges.  Is it easy to alter to get that affect?

--- End quote ---

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
--- Code: ---/************************************************************
 * 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;}

--- End code ---
to the end of that file.


--- Quote ---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?

--- End quote ---

You seemed to have changed a line in ec-radar.php which now reads
--- Code: ---if (! preg_match('|^[WX]|',$siteID) || ($siteID == 'WUJ') ) {

--- End code ---
and that is incorrect.  The line should read
--- Code: ---if (! preg_match('|^[WX]|',$siteID) || ($siteID == 'WRN') ) {

--- End code ---
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


--- Quote ---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.

--- End quote ---

Sure.  Copy wxradar.php to a new name (wxradarregional.php).  Edit the page and where it says
--- Code: ---<?php
    $doInclude = true;
$doPrint = true;
    include_once("ec-radar.php");
?>

--- End code ---
just change that to
--- Code: ---<?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");
?>
--- End code ---
and the national radar will be shown on the page.


--- Quote ---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?

--- End quote ---

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
--- Code: ---$SITE['WXSIM'] = true;  // Set to false if you have not installed WXSIM

--- End code ---
to
--- Code: ---$SITE['WXSIM'] = false;  // Set to false if you have not installed WXSIM

--- End code ---


--- Quote ---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?

--- End quote ---

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
--- Code: ---59 23 * * * /usr/bin/php -q $HOME/public_html/saveYesterday.php >/dev/null 2>&1
--- End code ---

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.

--- Quote ---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.   \:D/

Ray

--- End quote ---

 :grin:  \:D/

Stryder87:
Thanks for all the info Ken!

So I managed to go through a number of the items last night.

Item 1) I made the change to the file for the updating change, but the page still seems to be pausing.  I'm not sure why, but I know I had made that change in a different file a couple days ago thinking it was the place to do it.  Now I'm wondering if that may be what's causing it to not perform as expected.  Unfortunately I can't remember which file it was.  The list of files I've altered is rather long.   :oops:

Item 3) I'll work on this on the weekend.

Item 4) In my original attempt to change that radar map to WUJ, I had gone through and replaced WRN with WUJ everywhere I could find it ec-radar.php, hoping to get the radar map correct.  While I did manage to get the map I wanted (I think it was simply by having changed it in Settings.php), I didn't realize it altered the map size.  As you suggested, I changed all the edits in ec-radar.php back to WRN.  Seems fixed now and looks much better.  Thanks!   :-)

Item 5) I created the files for Regional and National radars.  It took me quite some time to figure out what file to edit to be able to insert those options in the Radar fly-out.  I eventually figured it out using Inspect Elements in Firefox.  It's working great now!  Big win for me (since I know nothing about web coding)!  :grin:

Item 6) Turned it off (for now).

Item 7) I changed my cron job command line to the one you supplied.  Looks like it worked!  Thanks a ton for that!   :-P  I had visions of that being a real headache.

I really appreciate your help.  I can only imagine that you spend a crazy amount of time helping people with their sites, so I appreciate you taking time to help me.

I'm still wondering why the site pauses though.  For some reason that's a big one to me.

One item that I forgot to ask before: what file has the text on the main page layout?  I want to change 'EC Weather Forecast' to be Environment Canada Weather Forecast (I'd actually like to change all instances of EC on the front page to Environment Canada).  I thought it would be in ajax-dashboard.php, but I can't find it.

Thanks again for your help!

Ray

saratogaWX:
For 1) (updating) .. D'Oh.. I gave you the wrong file name to edit.. it is ajaxAWNwx.js since you're using the ambientweather.com plugin, not the WeatherLink.com plugin.  Same advice applies just in a different script filename:

That setting is in ajaxAWNwx.js

--- Code: ---var maxupdates = 10;          // Maxium Number of updates allowed (set to zero for unlimited)

--- End code ---
change it to

--- Code: ---var maxupdates = 0;          // Maxium Number of updates allowed (set to zero for unlimited)

--- End code ---
and the updates will not 'pause' after 10 cycles.

Glad that the other suggestions worked.  Happy coding!


Stryder87:
Thanks Ken.

I made the change to ajaxAWNwx.js and it seems to be working now.  Awesome!  Thanks.

I'm still hoping you can tell me which file to edit to change the headings and forecast names on the main page (I'd like to change the instances of EC to be Environment Canada).

If possible, I'd still like to include the 3-4 day forecast like you have on your site.

Just a couple things left....  \:D/

Navigation

[0] Message Index

[#] Next page

Go to full version