Meteotemplate 4.0 Mango

Meteotemplate 4.0 Mango

Hi guys,

Mango is here! This version I hope will be a huge improvement and a decent compensation for the ugly homepage you had to do with in versions lower than 3. Also good to know is that update took me about 10 seconds 🙂

So what is new? Well everything and nothing….

This version introduces a completely new concept of the homepage blocks! Version 3 was sort of a interphase between what I had originally in my head and it is now ready in version 4. There is also one new page, so make sure you read till the end!

I will not describe it in too much detail as there is a new dedicated page about it in the wiki, which you must read in order to be able to use it.

In summary – the blocks are now completely independent. What this means? This means you download the blocks just like you download plugins. Then, on the homepage you just specify the number of columns, their percentage width and the order of the blocks you have installed in which you want them to appear in that column.

Main advantages:

  • absolute freedom in terms of the layout of the homepage – choose any number of columns you want, any order of blocks, any blocks you like
  • possibility to create alternative homepages, for example one with just one column – ideal for mobile devices
  • even if you put tens of blocks on your homepage, each one will load independently – this means your homepage will basically load instantly and then, those blocks that do not use any external resources or are cached, will also load instantly, the ones that do might take slightly longer, but you no longer have to wait for everything to load, and the user does not see a blank page.
  • if one resource is temporarily unavailable, there is an error in one of the blocks etc. – your homepage loads absolutely fine, just that one particular block will be blank
  • each block has a separate file if setting up is required – updates of blocks are very easy and you do not lose your settings
  • all blocks have the unified design and styling, which corresponds to your config.php and what you specify in the index.php
  • blocks are responsive, so will adjust based on the column width you specify
  • I have many ideas what other blocks I could create and it is very simple to do so now, so expect these to be released just like the regular plugins (which will of course also continue).
  • for now I have created almost 50 blocks to choose from. As mentioned above, use whichever ones you like, position them the way you like (any combination is possible) or even create several pages if you wish to. And even if you put many of them, the loading time will not be affected because the page loads gradually and some blocks show instantly.
  • all blocks are compatible with the new translations system so if not localized already, will be soon

Examples of some new blocks (all the ones included in version 3 are available):

  • insert a text on your homepage using GUI text editor and your admin password – no need to use FTP, change the code etc.
  • interactive map
  • qr code
  • greeting the user based on the time of the day
  • NASA image of the day
  • time until next sunrise/sunset
  • analog clock
  • calendar
  • logo
  • fire danger index
  • cloud height
  • cloud temperature
  • precipitation summary

Make sure you read the wiki page which explains exactly how to install each block (very simple as usual – in most cases download -> upload -> add to the homepage).

And one more thing. Together with Ken from Saratoga we have created a script which will generate a file using your database which can then be used directly in the meso maps and you can use it to add your station to it!

Update:

  1. Download the update package and extract it
  2. Upload the liveMesodata.php into your pages/station directory.
  3. Make a backup of your current index.php and the homepage directory!
    TIP: If you then download the forecast block, I suggest you copy the settings you originally had in your forecastInfo.php – i.e. your WU API and for some, the automatic location recognition script failed and I wrote you a customized URL, which we hard-coded. In that case you can also copy it to make things easier.
  4. Now delete the entire homepage directory and the index.php in your root.
  5. Upload the 40mangoBlack.png into the icons/versions directory.
  6. Upload the new homepage directory and the new index.php – this file is now empty and ready for you to download and add the blocks you like. Just as an example, one block is included, which is actually the logo block showing the logo of Meteotemplate.
  7. Replace the footer.php – this will only change the version number in the footer.
  8. One last thing, I discovered a bug in the header.php. To fix it, open your header.php and find this line at the top:
    $languageRaw = file_get_contents("lang/gb.php");

    replace it with this one and save the changes and upload the modified header.php:

    $languageRaw = file_get_contents($baseURL."lang/gb.php");

And now just have fun building your homepage(s) 🙂

Homepage – WIKI

DEMO – default

DEMO – many blocks

DEMO – version 3 blocks

Plans for the future:

  • do not expect version 5 any time soon, the reason I released two major updates in a short period of time was because I so disliked the original homepage 🙂
  • work on improving already existing plugins (localization, new functions)
  • new blocks – especially I want to concentrate on adding region-specific blocks
  • changes “under the hood” – especially to improve the possibilities for me to diagnose errors if there are any

5 thoughts on “Meteotemplate 4.0 Mango

  1. Excellent work Jachym creating Mango. The block layout makes it easy to configure the Homepage to your liking.
    I used 3 Columns with multiple blocks and like how easy it is to change the placement of blocks.

    Regards, Tom
    donganhillsweather.net

  2. Woop!

    The weather has turned wet outside, so I was bored. I can now update my website and keep entertained for a while!

    Many thanks Jachym, for all your hard work.

Leave a Comment