Hi guys,
as I recently promised, a new version of Meteotemplate, Meteotemplate 7.0 Pomegranate, is now available for download! The update procedure should be very easy, smooth and fast.
As I also mentioned in my last newsletter, this update brings some useful new features and the next version will fully concentrate on code optimization, refactoring and overall improvement of user experience, also trying to make it even more simple for you as a webmaster.
But let´s not jump ahead. Here is a summary of what is new/changed:
New features
Menu blocks
Over time I noticed some of you find it hard to decide, which blocks they want to put on their homepage and hard to resist not including some. Although you can theoretically put as many blocks on your homepage as you like, it is obviously not ideal due to the length of the page and also size. I knew I have to come up with a solution to this. And so I now introduce to you the concept of “menu blocks”, which further enhances the possibilities of how you can arrange your homepage.
Just like the multiple blocks introduced in version 6, it is extremely easy to create a menu block. And so what is a menu block? A menu block is a dynamic block. Probably best explained using an example. Let´s say you want to create a block for “radar images”. There are several radar blocks available – one for Australia, one for Europe, Canada, U.S.,…. Now you can group all those blocks into one single block. First you specify which blocks you want to be included, then you select the default one. Then, when the user opens your page, they will see the default block, however in the top-left corner will be a menu symbol. When you click that menu symbol, a drop-down will appear and you will get a list of all the blocks you included in that particular menu block. You select the one you want. At that moment, the current block loaded will unload and your selected one load. This way you can basically put as many blocks you want into one block slot and also not overload your pc because always just one is visible.
What is even better, you can freely combine these with normal and multiple blocks, you can put a menu block into any slot you want on your homepage and you can create as many menu blocks on one homepage as you like. Instructions how to create a menu block are given in detail in the updated Wiki.
Several menu blocks are now included in the demo at meteotemplate.com for you to look at.
Station warnings
Another new feature allows you to display warnings on your page based on your station data. How it works? Once you update your site to version 7, a new set of parameters will appear in your setup.php. First you select if you want to enable this feature at all. If so, you will specify thresholds for various parameters – high temperature, low temperature, high wind etc. Then, if this threshold is exceeded, a warning icon will appear below the header with the particular icon depending on which threshold has been exceeded (more than one can be at the same time, eg. low temp + wind). On hover it will show you the actual value. More about how this works is described in the setup.php.
Menu.php
Something so many of you have been asking for and I think I finally have a solution. The menu.php will now be available for download separately in the downloads section and I will update it every time a new plugin is available, so downloading the latest menu.php will always guarantee you you have all the links needed. But that is not all. I also changed the script completely and you no longer have to uncomment anything. The script now automatically scans your plugins directory and shows those links that correspond to the plugins you have installed. Install a new one and a new link will appear automatically. Delete one, it will hide.
There is only one problem. If you customize the menu then obviously this will bring the menu back to the default state. However, the idea is – if you are able to customize the menu yourself, then you don´t need this automation and you can simply add the links to the new plugins you install yourself.
Other new features
- interactive graph now includes dew point
- METAR now includes wind direction
- Scottish flag added to the country flags
Updates
- CSS tweaks for the homepage for more precise block alignment
- Highcharts CSS tweaks
- all bug fixes since version 6 release incorporated – changes in climate maps (reflecting changes in Google Maps API), changes in METAR (reflecting changes at NOAA website)
- improved translation functions
Bug fixes
- fixed problem with exporting solar radiation in the interactive table
Update Instructions
In general the update procedure is the same as always. Inside the update package you will fine folders that match your template structure. Replace/add the files from the update package to the corresponding folders already in your template directory.
The update should really be quite easy, fast and hopefully everything will go smoothly.
- As always – make a backup copy, if not the whole template, back up at least your config.php and indexDesktop.php.
- Open the css directory in the update package and replace the corresponding files in your template root/css directory.
- Open the icons directory in the update package and copy the new “warnings” folder inside it as well as the two new menu icons.
- Add the Scottish flag in the corresponding folder in the imgs directory
- Replace createConfig.php and setup.php in your Install directory with the new files in the update package.
- Replace all language files in the lang directory with the updated versions.
- Replace the updated versions of the pages inside the mobile folder.
- Replace the updated versions of the pages inside the pages directory.
- Replace the updated versions of the scripts inside the scripts directory.
- Replace your footer.php and header.php in template root folder, as well as in the mobile directory.
- Now go to your current indexDesktop.php and copy the settings at the top. Then, open the new indexDesktop.php from the update package and paste your settings there. This step is optional. You can of course simply start from scratch, but the settings did not change, so you will save yourself time doing it this way. However, once you do it, you can now think about if you want to make any changes, given the possibility of using the menu blocks in version 7.
- Once you make the desired changes, replace your old indexDesktop.php with the one you have just created and saved.
- Repeat step 12 with the indexMobile.php.
- Now open the browser and open the setup.php (do not forget you have to include your password in the URL to access the setup.php, as explained in the Wiki).
- Once you are in the setup.php, scroll down until you get to the “Station Warnings” section. This entire section is new. It will be prefilled with default values. Read the instructions and then set up this section as you want. Then scroll to the very bottom and click save – this will create new config.php that will include your original setting as well as the new parameters.
- Now finally, you have to decide what you want to do with the menu. If you are a beginner and struggle with editing the HTML, and especially if you have not customized the menu in any way, then go to meteotemplate.com and in the Downloads section, download the newest menu.php file and replace your current menu. If, however, you have made some customized changes in the menu.php, then this would obviously lead to resetting the menu to default and you would lose your changes. My assumption is – if you have customized the menu, you obviously know how to work with HTML and so for you it would be better to simply add new plugins yourself. If you want to always have just the default functionality, then everytime you download and install a new plugin, simply download the newest menu.php and all the plugins you have installed will appear in the menu automatically.
- You are now hopefully fully upgraded to Meteotemplate 7.0 Pomegranate 🙂
Enjoy