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

0 Members and 1 Guest are viewing this topic.

Offline Daali

  • weather n00b
  • Senior Contributor
  • ****
  • Posts: 223
    • The weather in Jefferson, GA
Re: Meteotemplate - new free website template
« Reply #3225 on: June 29, 2016, 09:06:16 PM »
Thanks Jáchym

I got my key (although I must be grandfather'd in by Google) at the ready when you update!

Anyone can get a key here https://developers.google.com/maps/documentation/javascript/get-api-key

Offline robv60

  • Member
  • *
  • Posts: 3
Re: Meteotemplate - new free website template
« Reply #3226 on: June 29, 2016, 09:18:33 PM »
Daali is correct, this is what I did to get mine working; created a browser API key for google maps and applied to pages that called for it. Tedious but it got me going. Works like a champ.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #3227 on: June 30, 2016, 05:44:20 AM »
Hi guys,

yes the change is not difficult to make, but obviously I do have to go and change those things in the past and implement this into the setup.php.

One thing that is problematic is that the actual setup.php uses that as well, which means a problem - ideally this should be set up in the setup, but the setup.php already needs it :D I will try to find a way... I could try to use different Map service for getting your coordinates, but the great thing about Google in this case is that it also geocodes your location and automatically pre-fills your country code, city etc. And Im not sure any other service can do this.

Anyway it is now priority No.1. Google really should have said something. Yes I know, existing users still have 3 months to make a change, but it is problematic for developers because it does not work for new users immediately and obviously it does take some time to make changes in all the scripts. The message in the console about the requirement for Api key should have appeared before that change was made.

Offline nitrx

  • Senior Contributor
  • ****
  • Posts: 277
    • Apeldoorn-Oost The Netherlands
Re: Meteotemplate - new free website template
« Reply #3228 on: June 30, 2016, 08:22:05 AM »
Hi Jachym,
nice look and feel of the meteotemplate.com site well done  :!:
Ron
Ron
Cumulus software
Apeldoorn NL
http://www.apeldoornmeteo.nl

several languages

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Meteotemplate - Bug Fixes Package
« Reply #3229 on: June 30, 2016, 08:34:33 AM »
As I posted yesterday (see above), Google Maps now requires an API key, however, existing users still have 90 days to implement the changes.

1. Current Template Users
Since you still have 90 days when you can use the maps without an API key, you do not need to immediately apply the fixes in the just released bug fixes package. Of course you can if you want, but within those 90 days there will be a new version of the template which will have these changes implemented.

2. New Template Users
You do not need to apply this bug fix package, it has already been changed in the main download file and so just follow the update instructions in the Wiki.

3. Users who downloaded and installed Meteotemplate between Jun 22 and Jun 30
You downloaded version that does not have API key implemented, but already required. Download the bug fixes package and follow the instructions in setup.php or in the wiki.

http://www.meteotemplate.com/web/download.php - section Bug Fixes

Offline weatherc

  • Senior Contributor
  • ****
  • Posts: 278
Re: Meteotemplate - new free website template
« Reply #3230 on: June 30, 2016, 01:13:06 PM »
Quote
Anyone using Google Maps on their site (I am not talking about Meteotemplate, this applies to anyone) will now have to get an API key and will also have a daily quota.

The quotas have been there for long time, they just puts the API-key in force now...
One should also be aware of the prices when free quota of 25K maploads/24h are exceeded. Its not cheap.
Example...
Having 100K maploads a day costs 32.50$ per day.
« Last Edit: June 30, 2016, 01:14:37 PM by weatherc »

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #3231 on: June 30, 2016, 01:23:27 PM »
It looks like the problem is not fixed, there is one major obstacle....

Since I used these before Jun 22, my site will work until October, just like all other previous users. However, there is no way for me to test if I fixed the problem for new users, because I see it working, but I don´t know if it works because Im still in that 3 month period or because I fixed it. And it checks your domain, so I cannot change that. And even if some other user gave me access to their FTP it wont help because I would need FTP of someone who has just installed the template and never used Google Maps API on their domain.

Offline Daali

  • weather n00b
  • Senior Contributor
  • ****
  • Posts: 223
    • The weather in Jefferson, GA
Re: Meteotemplate - new free website template
« Reply #3232 on: June 30, 2016, 01:27:17 PM »
If based by domain name only, I could give you access to a parked domain and account to play with.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #3233 on: June 30, 2016, 01:35:01 PM »
I would basically need access to someone´s FTP account, where MT is installed and where it was not installed prior Jun 22, 2016. It could even be some limited account for access just to the MT folder, but I need to play around with it, try plugins etc.

Offline Daali

  • weather n00b
  • Senior Contributor
  • ****
  • Posts: 223
    • The weather in Jefferson, GA
Re: Meteotemplate - new free website template
« Reply #3234 on: June 30, 2016, 01:40:51 PM »
You have PM

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #3235 on: June 30, 2016, 01:40:59 PM »
Ok thanks John, I will have a look tonight and hopefully find a fix.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #3236 on: June 30, 2016, 03:00:06 PM »
OK, I found the problem, it will be fixed hopefully tomorrow. I will need to change many pages and all plugins that use Google Maps

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #3237 on: June 30, 2016, 03:20:14 PM »
It might take longer... tens of pages will have to be changed... isnt it nice when they tell you the day they deactivate it...

Offline robv60

  • Member
  • *
  • Posts: 3
Re: Meteotemplate - new free website template
« Reply #3238 on: June 30, 2016, 03:58:59 PM »
Excellent!  =D>

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #3239 on: June 30, 2016, 05:39:53 PM »
OK, so just to keep you guys updated about what is happening.

Basically, Google Maps API now requires an API key. Old users still have 3 months to make the corresponding changes in their scripts, however new users have to have the key already.

My original idea was:
- include the script with the key in the header and therefore only that script would need to be changed. On pages where this is used, the script would then be loaded twice - once as part of the header and with the API key and once in the actual body of the page, without it. Of course this is not a very elegant solution, but I would of course over time delete that duplicate during updates of those plugins and pages concerned, or during new version release.

Unfortunately, as it turned out, this will not work. Since the header is loaded first, it loads the script with the API key. So far so good. However, it then continues to the body section and here it is loaded again, this time without it. And at that moment, it ignores the original and thinks you did not include the API key.

There are therefore only two possibilities:
1. include it in the header like now, but delete it in all those pages where it is included currently, without the API key
2. dont include it in the header and change the code in those pages

Since it is not required to be loaded on each site in the header and since I would have to change all those pages concerned anyway, there really is no point in having it in the header, so I will go with option number two.

However, just doing some very quick analysis, when counting all the core pages of the template + blocks + plugins, it will be over 61 changes, so it might take me a few days before I update it all. Current users who installed the template prior to Jun 22 can still use the old scripts, but I recommend you also update it, since there really is no point in postponing it, because sooner or later you will have to do it. It will stop working in September.
« Last Edit: June 30, 2016, 05:41:33 PM by Jáchym »

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Meteotemplate - Plugin Updates + Bug Fixes Package
« Reply #3240 on: July 01, 2016, 07:12:17 AM »
Ok guys,
spent the last night going through all the files and making the necessary changes. As I mentioned earlier, you will sooner or later have to update these, however, existing users still have 90 days to do so, so no need to rush.

First go to meteotemplate.com Downloads section and download the latest bug fixes package 7.1 (if you have downloaded the one I released yesterday please ignore it, it was not solving the problem). Then follow the instructions in the readme file. Once you have all your files updated and set up, you can update the following plugins, mostly it is just the change with Google Maps, in a few cases however, I also did some minor tweaks:


Updated plugins:


usExtremes 1.1
earthquakes 2.2
disasters 2.2
cityConditions 2.2
userMap 1.2
countryDetail 1.1
climateUS 1.1
climateCanada 1.1
issTracker 1.2
windDirection 1.1
marine 2.1

Best regards
Jachym

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Meteotemplate - new block: Current Conditions U.S.
« Reply #3241 on: July 01, 2016, 08:14:22 AM »
Hi guys,

to make it a bit more interesting, in addition to the updates and bug fixes (see today´s previous post), I also have a new block for you which is similar to the recently released Current Conditions Australia.

New block: Current Conditions U.S.

This one is for the United States. Simply choose any number of any U.S. cities (using METAR code) and see the current conditions all in one sortable table. Data is of course cached and you can also set the maximum age of the observation, and if older, it would be skipped. Units automatically adjust based on your template units set up.

DEMO: http://www.meteotemplate.com/template/indexBlockDemoWide.php?block=currentUS
« Last Edit: July 01, 2016, 08:19:16 AM by Jáchym »

Offline robv60

  • Member
  • *
  • Posts: 3
Re: Meteotemplate - new free website template
« Reply #3242 on: July 01, 2016, 01:10:30 PM »
I like the new block.

Offline tstorm

  • Contributor
  • ***
  • Posts: 141
    • Harpers Ferry Weather
Re: Meteotemplate - new free website template
« Reply #3243 on: July 01, 2016, 01:26:18 PM »
Jachym,

  Thank you for the new Current Conditions block.  I love it!  I have 7 locations added to it and it loaded very quickly the first time (non cache).

Update

  If an xml file has a heat index in it the block doesn't show it in the feels like column.  Example xml files are http://w1.weather.gov/xml/current_obs/KDCA.xml and http://w1.weather.gov/xml/current_obs/KMRB.xml

John
« Last Edit: July 01, 2016, 03:21:50 PM by tstorm »

Offline N0BGS

  • Senior Member
  • **
  • Posts: 98
Re: Meteotemplate - new free website template
« Reply #3244 on: July 01, 2016, 03:51:27 PM »
Strangely, I'm not able to get the new CurrentUS block working.  #-o

Tries to load forever and never retrieves the cached data.

httpd error log shows:
Code: [Select]
PHP Parse error:  syntax error, unexpected end of file in /var/www/html/meteo/homepage/blocks/currentUS/currentUSBlock.php on line 341
Which would lead me to believe there is a missing } somewhere but I can't find it. Besides, Jachym doesn't make those kinds of mistakes!

Ideas?

--Kurt

Offline tstorm

  • Contributor
  • ***
  • Posts: 141
    • Harpers Ferry Weather
Re: Meteotemplate - new free website template
« Reply #3245 on: July 01, 2016, 04:09:45 PM »
Strangely, I'm not able to get the new CurrentUS block working.  #-o

Tries to load forever and never retrieves the cached data.

httpd error log shows:
Code: [Select]
PHP Parse error:  syntax error, unexpected end of file in /var/www/html/meteo/homepage/blocks/currentUS/currentUSBlock.php on line 341
Which would lead me to believe there is a missing } somewhere but I can't find it. Besides, Jachym doesn't make those kinds of mistakes!

Ideas?

--Kurt

What's your web address?

Offline N0BGS

  • Senior Member
  • **
  • Posts: 98
Re: Meteotemplate - new free website template
« Reply #3246 on: July 01, 2016, 04:20:25 PM »

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #3247 on: July 01, 2016, 05:38:01 PM »
Strangely, I'm not able to get the new CurrentUS block working.  #-o

Tries to load forever and never retrieves the cached data.

httpd error log shows:
Code: [Select]
PHP Parse error:  syntax error, unexpected end of file in /var/www/html/meteo/homepage/blocks/currentUS/currentUSBlock.php on line 341
Which would lead me to believe there is a missing } somewhere but I can't find it. Besides, Jachym doesn't make those kinds of mistakes!

Ideas?

--Kurt

Hi,
I think I know what it could be, it has to do with how PHP is set up on your server. I made a slight modification in the script, try re-downloading it and let me know if it helped.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #3248 on: July 01, 2016, 05:58:30 PM »
Jachym,

  Thank you for the new Current Conditions block.  I love it!  I have 7 locations added to it and it loaded very quickly the first time (non cache).

Update

  If an xml file has a heat index in it the block doesn't show it in the feels like column.  Example xml files are http://w1.weather.gov/xml/current_obs/KDCA.xml and http://w1.weather.gov/xml/current_obs/KMRB.xml

John

Hi John,
when I was developing it, none of the locations had that so I wasnt even aware this is possible. That brings me to a conclusion not many locations have this, maybe a few, a bit more have the wind chill (which is what it currently shows in the last column) and most have none.
I dont really want to add another column, there isnt that much space on the homepage and if only so few locations have this... and putting wind chill together with heat index is also problematic, both are calculated differently, wind chill takes into account wind and temp, heat index temp and humidity. And what then if some locations had both... they shouldnt be mixed in one column.

Offline N0BGS

  • Senior Member
  • **
  • Posts: 98
Re: Meteotemplate - new free website template
« Reply #3249 on: July 01, 2016, 09:21:53 PM »
That's solved the problem, Jachym.  Thanks!

New template and website look great, too.

--Kurt