Author Topic: Meteotemplate - new free website template  (Read 641271 times)

0 Members and 1 Guest are viewing this topic.

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5537
    • KomokaWeather
Re: Meteotemplate - new free website template
« Reply #200 on: September 14, 2015, 05:52:26 PM »
Hi Jachym,
I have disabled GoDaddy Cron jobs and started with Cron-Job.org.
I have it now uploading regularly with password, using the url in Cron_Job http://www.komokaweather.com/j-template/cumulus.php?pass=xxxxx
 
Again thanks for your patience and suggestions.
Paul

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #201 on: September 14, 2015, 05:56:43 PM »
Hi Scott,
1. the problem is the banner, it uses yahoo weather to get the current conditions for the banner, and it uses the location specified in config (parameter stationLocation). The problem is that it probably did not find it or else it should be defined as probably honokaa,us without spaces and with "us" instead.

An easy fix is this:
Open the header.php and you will see there a variable "url". Select the value for it and replace it so that it looks like this:

Code: [Select]
$url = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20in%20(select%20woeid%20from%20geo.places(1)%20where%20text%3D%22honokaa,hi%22)&format=json";;
Then, save the changes and make sure you delete the headerCache.txt in the root folder. Then open your page and your banner should work and also that line at the top disappear.

2. Graphs - they dont work simply because that error with the header disrupts the structure of the Ajax call and so the response is invalid, the above thing should fix this as well.
« Last Edit: September 14, 2015, 05:59:11 PM by Jachym »

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #202 on: September 14, 2015, 05:57:50 PM »
Hi Jachym,
I have disabled GoDaddy Cron jobs and started with Cron-Job.org.
I have it now uploading regularly with password, using the url in Cron_Job http://www.komokaweather.com/j-template/cumulus.php?pass=xxxxx
 
Again thanks for your patience and suggestions.
Paul

Great!

You are not the first one struggeling with Cumulus CRONs, I guess I will just include in the wiki that Cumulus users should use the external CRON, it only causes problems when trying to use the built in function.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
New plugins - radar images for US and Canada
« Reply #203 on: September 14, 2015, 06:44:55 PM »
A set of two new plugins is now available:

US radar images
Canada radar images

Install:
Unzip -> Upload -> Add to menu

* only in case of the Canadian radar, you can optionally set the default location for default regional image by opening the radar.php and specifying the three-letter code of your desired location right at the top.

 
Demo (US): http://www.meteotemplate.com/template/plugins/usRadar/radar.php
Demo (Canada): http://www.meteotemplate.com/template/plugins/canadaRadar/radar.php
Download: http://www.meteotemplate.com/web/plugins.php
Info/comments: http://meteotemplate.com/blog/?p=205

Note: the plugin should still be fully compatible with versions 1.x though I do recommend upgrading to v2.0 Watermelon

Offline swyman18

  • Senior Member
  • **
  • Posts: 61
Re: Meteotemplate - new free website template
« Reply #204 on: September 14, 2015, 06:57:05 PM »
Hi Scott,
1. the problem is the banner, it uses yahoo weather to get the current conditions for the banner, and it uses the location specified in config (parameter stationLocation). The problem is that it probably did not find it or else it should be defined as probably honokaa,us without spaces and with "us" instead.

An easy fix is this:
Open the header.php and you will see there a variable "url". Select the value for it and replace it so that it looks like this:

Code: [Select]
$url = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20in%20(select%20woeid%20from%20geo.places(1)%20where%20text%3D%22honokaa,hi%22)&format=json";;
Then, save the changes and make sure you delete the headerCache.txt in the root folder. Then open your page and your banner should work and also that line at the top disappear.

2. Graphs - they dont work simply because that error with the header disrupts the structure of the Ajax call and so the response is invalid, the above thing should fix this as well.

Ah yes, I vaguely remember reading another post somewhere regarding the yahoo reference in the banner.  I actually just changed my location variable to "Honokaa,Hawaii" (no spaces) and you're right, working like a champ now!

Thanks again!

-Scott

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #205 on: September 14, 2015, 06:59:41 PM »
 :grin:

Great :-)

Btw... I also vaguely remember wanting to change this so that spaces are removed automatically :D

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #206 on: September 14, 2015, 07:06:55 PM »
Decided to turn on Rapid Fire. That seems to have solved it. So you can do 5 minute updates.

<observation_time>Last Updated on September 14, 12:54 PM CDT</observation_time>
<observation_time>Last Updated on September 14, 12:59 PM CDT</observation_time>
<observation_time>Last Updated on September 14, 1:04 PM CDT</observation_time>
<observation_time>Last Updated on September 14, 1:09 PM CDT</observation_time>
<observation_time>Last Updated on September 14, 1:14 PM CDT</observation_time>
<observation_time>Last Updated on September 14, 1:19 PM CDT</observation_time>

We'll let this run for a while. She wants her own website domain and she wants a VP2 Pro Plus for Christmas.  :lol:

:D Well I guess domain is not such a big problem with 1and1 I think you can get it for as low as 1 dollar a month for the first yr including the domain and then you just decide whether or not you want to continue.

With regards to Davis Pro 2 Plus... well that is my dream too, along with a slightly more powerful laptop than 1GB RAM, but I guess that is a bigger issue than the domain :-) Give her regards and any time you need help with something, feel free to contact me.

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5537
    • KomokaWeather
Re: Meteotemplate - new free website template
« Reply #207 on: September 14, 2015, 08:18:03 PM »
Hi Jachym,
I got the Canada and US Radar added, very easy and quick http://www.komokaweather.com/j-template/index.php thank you very much.  However I am not that good at the new menu code.  I have added the North America Map and "Canada" and "USA" under the Radar item but there must be a nicer way of doing it.  I tried it without the maps just "Canada" and "USA" but that doesn't look good either.
Quote
      <a href='<?php echo $pageURL.$path?>plugins/canadaRadar/radar.php'>Canada
       <img src="<?php echo $pageURL.$path?>imgs/continentOutlines/namerica.png" class="hoverIcon" alt="">
      </a>
      <a href='<?php echo $pageURL.$path?>plugins/usRadar/radar.php'>USA
       <img src="<?php echo $pageURL.$path?>imgs/continentOutlines/namerica.png" class="hoverIcon" alt="">
      </a>

 
Paul

Offline KapitainOne

  • Senior Contributor
  • ****
  • Posts: 256
    • Sanford Weather
Re: New plugins - radar images for US and Canada
« Reply #208 on: September 14, 2015, 08:19:48 PM »
A set of two new plugins is now available:

US radar images
Canada radar images

Install:
Unzip -> Upload -> Add to menu

* only in case of the Canadian radar, you can optionally set the default location for default regional image by opening the radar.php and specifying the three-letter code of your desired location right at the top.

 
Demo (US): http://www.meteotemplate.com/template/plugins/usRadar/radar.php
Demo (Canada): http://www.meteotemplate.com/template/plugins/canadaRadar/radar.php
Download: http://www.meteotemplate.com/web/plugins.php
Info/comments: http://meteotemplate.com/blog/?p=205

Note: the plugin should still be fully compatible with versions 1.x though I do recommend upgrading to v2.0 Watermelon

Have not had a chance to install yet but looking at the demo for Canada is there not a missing icon to animate the regional radar images like in the overall country one on top?

Looking forward to installing ASAP!
« Last Edit: September 14, 2015, 08:41:29 PM by KapitainOne »

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #209 on: September 14, 2015, 08:43:42 PM »
Paul:

I will add a different icon in the menu at meteotemplate.com tomorrow, so you can then copy the code. I havent done it yet because my computer here at home is too slow for the graphics SW I use for creating the icons, so I will do it tomorrow after work in my office.

KapitainOne:

Well you are right, I didnt think about that, it would be slightly more complicated because of the Ajax there, but it is something for the next version of the plugin :-) In fact I have more ideas about how this plugin could be further enhanced so it is likely to be updated relatively soon :-)

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5537
    • KomokaWeather
Re: Meteotemplate - new free website template
« Reply #210 on: September 14, 2015, 08:54:52 PM »
Thanks Jachym.
 
When I unzipped the canadaRadar and ready to upload and saw the canadaRadarAjax.php I was a bit confused .... http://m.ajax.ca/  #-o ;)
 
Paul
 
 

Offline KapitainOne

  • Senior Contributor
  • ****
  • Posts: 256
    • Sanford Weather
Re: Meteotemplate - new free website template
« Reply #211 on: September 14, 2015, 09:02:05 PM »
Paul:

I will add a different icon in the menu at meteotemplate.com tomorrow, so you can then copy the code. I havent done it yet because my computer here at home is too slow for the graphics SW I use for creating the icons, so I will do it tomorrow after work in my office.

KapitainOne:

Well you are right, I didnt think about that, it would be slightly more complicated because of the Ajax there, but it is something for the next version of the plugin :-) In fact I have more ideas about how this plugin could be further enhanced so it is likely to be updated relatively soon :-)

No problem, in the mean time I'll continue using my hacked version of Ken's Base Canada EC-radar script which I was able to put into a custom page in your template, results can be seen here http://www.sanfordweather.com/meteo/custom/CanadaRadar.php
Bill

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #212 on: September 14, 2015, 09:15:53 PM »
Thanks Jachym.
 
When I unzipped the canadaRadar and ready to upload and saw the canadaRadarAjax.php I was a bit confused .... http://m.ajax.ca/  #-o ;)
 
Paul

LOL, no, dont worry :-) https://en.wikipedia.org/wiki/Ajax_(programming)

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5537
    • KomokaWeather
Re: Meteotemplate - new free website template
« Reply #213 on: September 14, 2015, 10:04:42 PM »
Hi Jachym,
The new Year Normals plugin is very nice.  I had some difficulty understanding some of the data presentation but think I now understand.  However the temp table was throwing me off with the heading of Maximum Average Temperature and Minimum Average Temperature.  Unless I am mistaken, from the temperatures shown I assume the word "Average" with the Maximum and Minimum is a copy and paste issue and should not be included in the temperature tables' heading.

Paul

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #214 on: September 15, 2015, 06:31:41 AM »
Hi Paul,
no it is correct. It is the maximum average temperature, it is due to the way the updates work, let me just explain again how the updates work:

So lets assume your db interval is 5 minutes.
Your current conditions file is being updated every minute, so you set your CRON to one minute. The data is cached every minute and every 5 minutes, the data is saved to db and cache cleared.

Now, during that db update, what the script does is it uses various methods for particular parameters. For example, in case of wind gust, it saves to db the maximum out of those 5 cached values. For wind speed, it takes the average (since it already is average speed). Pressure and humidity also average etc.

However, temperature is slightly problematic, if it took the average, it could be that your max annual, monthly, all time etc. temperature would not be correct then.
Imagine the five values in cache were lets say 10, 15, 20, 15, 10. Then it would save 14 to db. But your max temperature would then be taken from these averages, even though it was 20 as well.... to overcome this problem, the db actually has 3 columns - T, Tmax and Tmin - I guess it is quite obvious what these correspond to. So upon each update, it saves the avg, max and min.

Then, for the statistics etc. for maximum temperatures it uses the values from the Tmax column, for temperature in general, it uses the T column and for minimums it uses Tmin. This way, it then correctly shows the absolute maximum/minimum values etc.

Now, for this plug in, the values are all taken from the T column, which is the "average temperature". So it really is the "maximum average temperature" etc. However, since the interval is quite short - for example in your case I think you use 1 minute updates and 5 minute db updates - the values between Tmax, Tmin and T are usually very similar and so in long-term, there is no difference when you take like monthly average or so. This is only important when you are calculating the absolute extremes, where the temperature can be different by approximately 0.5°C I would say within those 5 minutes.


Also, as promised, I have added icons for the radar images, you can copy the code of the menu from meteotemplate.com.

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5537
    • KomokaWeather
Re: Meteotemplate - new free website template
« Reply #215 on: September 15, 2015, 08:49:15 AM »
Thanks Jachym for the average explanation.  My confusion was that for say February Temp Min (Minimum Average Temperature) it shows -29.8C in 2015, -26.2C in 2014, etc. but I have reached these temps only once each and for a very short period (minutes at the most) so my understanding of average didn't jive with this.  The average of min or max over several specific times is more of an average in my understanding.  Now these Max and Min temps come from my historical records which is Cumulus monthly log (specific data unloaded by Meteotemplate) and is the actual low for the time in that monthly log file, not an average of a period of time.
 
Thanks, and I will look at adding the radar images this evening.
 
Regards,
Paul

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5537
    • KomokaWeather
Re: Meteotemplate - new free website template
« Reply #216 on: September 15, 2015, 06:14:31 PM »
Quote
Also, as promised, I have added icons for the radar images, you can copy the code of the menu from meteotemplate.com.
I have copied the Canada and USA map png images from your site and uploaded to /img.  Then added these in new <a href .... /a> for each of them in the radar <div> ... </div> section ion menu.php.  All looks and works good.
Regards,
 
Paul
 

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5537
    • KomokaWeather
Re: Meteotemplate - new free website template
« Reply #217 on: September 15, 2015, 06:48:34 PM »
KapitainOne, your site looks great and well done on the meteotemplate.  I have borrowed a couple of your ideas.
 
Paul

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #218 on: September 15, 2015, 06:58:04 PM »
Both of your sites look very nice, and there is lots more coming :-) I think you will like it :) With version 2 I finally can finish many unfinished ideas that were not possible with v1.x and I had to leave them :)

Offline KapitainOne

  • Senior Contributor
  • ****
  • Posts: 256
    • Sanford Weather
Re: Meteotemplate - new free website template
« Reply #219 on: September 15, 2015, 07:34:01 PM »
KapitainOne, your site looks great and well done on the meteotemplate.  I have borrowed a couple of your ideas.
 
Paul

Glad you liked some of my efforts, they were in all likelihood borrowed from somewhere else!

Jachym, can't wait for your next plugins!!

Bill

Offline Skyview

  • Forecaster
  • *****
  • Posts: 404
  • Former Aviation Weather Observer
    • Fuquay Varina Weather
Re: Meteotemplate - new free website template
« Reply #220 on: September 16, 2015, 04:34:46 AM »
I just noticed this is what 2.0 looks like in IE 11.






Offline nitrx

  • Senior Contributor
  • ****
  • Posts: 277
    • Apeldoorn-Oost The Netherlands
Re: Meteotemplate - new free website template
« Reply #221 on: September 16, 2015, 04:44:36 AM »
Hmm indeed looks bad  ](*,) unfortunally
Ron
Cumulus software
Apeldoorn NL
http://www.apeldoornmeteo.nl

several languages

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #222 on: September 16, 2015, 05:03:57 AM »
Grrr... I just hate Microsoft :D I said it here like million times, why cant they make a browser that just works as all the others  :grin: :grin: :grin:

The paradox is that I just looked into it and it does this once I change it to HTML5.... ok, well I changed the script slightly, it does not look as good as Chrome or FF, but at least something...

Offline nitrx

  • Senior Contributor
  • ****
  • Posts: 277
    • Apeldoorn-Oost The Netherlands
Re: Meteotemplate - new free website template
« Reply #223 on: September 16, 2015, 05:08:13 AM »
Well Edge (Msoft) does render the template very well
Ron
Cumulus software
Apeldoorn NL
http://www.apeldoornmeteo.nl

several languages

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #224 on: September 16, 2015, 05:14:56 AM »
OK,

so I have uploaded an updated version of the template, which you can now download in the meteotemplate download section (no need to download the entire file, just the update_2.0.

Changes from 2.0 release:
- fixed a few bugs in the wu.php in update folder (if you are using WU for your updates)
- fixed IE 11 for index.php

So all you need to do is just replace the index.php in the root folder with this one, the rest of the files is the same.