A new plugin is now available!
This plugin extends the functionality of the built-in gauges plugin and allows much faster updates. The whole idea of this plugin is that unlike any of the other scripts in the template, it does NOT use the database, and uses data from the clientraw text file directly. This means it allows viewing the most recent conditions. The database is of course still updated in the standard interval.
The plugin requires that you use Weather Display and that you upload clientraw.txt to your server. Also, it will only make sense if this upload is more frequent than your database update, otherwise it will just duplicate the already built-in gauges in the main template.
If you do have a clientraw file on your server updated more often, then setting it up will be very easy. There are several designs available for you to choose from. As you know I prefer the simple “material” design style, however I do understand that many prefer more colors, 3D effects, shadows etc. There are therefore several versions, some of which use the material design theme and others with more colors and 3D effects. You can also choose from two available sizes, where one is probably ideal for mobile devices as it fits on one screen, while the other one is easier to read on a PC.
– live conditions with auto updates
– several design themes
– 2 sizes
– solar sensor and UV gauge automatically displayed/hidden based on config.php settings
– units either default or user-defined (linked to the rest of the template)
– in the “color” theme, thermometer color changes between red/blue (if freezing)
– precipitation gauge can be switched to show daily/monthly or annual rain
– thermometer can be switched to show temperature/apparent temperature or dew point
After you download the zip file, simply unzip it and all the settings you need to make is in the settings.php. Open this file and now set the parameters as you wish. The most important thing is the path to your clientraw. Probably the easiest is to put the absolute path to your clientraw text file – i.e. “http://….” and the URL of where the clientraw.txt is on your server.
Then you can set up the scales. For each parameter you can set different limits, this obviously depends on the units you use. However, keep in mind you should fill in both. For example, even if your entire template is in degrees F, you should still set the correct values for degrees C, because the plugin is linked to the template, where the user can switch units so the advantage is they can choose the units they want, but for you it means you should provide limits for both. The numbers present in the settings.php by default should work most of the time, but of course you can change it to anything based on the conditions typical for your location.
Solar gauge will be displayed/hidden automatically based on your settings in config, just like any other page in the template. Also tooltips will be displayed in language defined by the user (or default).
Last thing you need to set is the update interval. The number you specify should be in seconds. Think about what would be the ideal compromise. Obviously you want the data to be current, but it depends on how often you update your clientraw.txt and also how fast your server is.
Once you are done with the settings, simply save it. Now upload all the files to your server to the plugins directory and add a link to your menu. There are currently a total of 5 files, called index.php, index2.php…. Once your files are uploaded, you can try and look at each and then simply put a link to the one you want to use to the menu. Of course you can also put a link to several if you want. The settings.php is applied globaly to all of them. The “material” design ones adjust to the colors of your template. In the color/3d theme, the wind/gust gauges are color coded based on the Beaufourt scale.
DEMO – please note: the demo uses dummy random data as I don’t have WD connected to my station and generating clientraw. To see all versions simply view the demo and then replace index.php by index2.php, …. , index5.php
I have decided to gradually begin updating all the plugins so that they can also be localized to different languages. I hope this will be useful to some of you as right now the plugins are all in English unless you translated them by hard-coding different strings. However, that is not an ideal situation for two reasons – first, the user cannot change language, so it will always be displayed in the language you translated it to and second, if I release an update, you would either have to stick with your current version or update and lose all the changes.
First plugins that are now localized are one of the most popular ones and ones that contain relatively lot of strings – the diary and the disasters. However, right now, basically they are still just in English, but that is simply because somebody will first have to help me and translate them so that I can include the language file. The way it works is that the plugins will always first search if there is a language string available for the language chosen, if not, it will use English. This means that if you wish to translate, you don’t even need to translate everything. The untranslated strings will simply remain in English.
Language files are placed in the lang directory and the translation follows the exact same logic as the language strings for the core template.
In addition, the updates also contain a few minor bug fixes so I recommend you update the files. In case of the diary there were some minor problems with the Moon phase calculation.
I also apologize to our Canadian friends and I have added the only one F5 tornado ever observed in Canada and thus also renamed the “US F5 tornadoes” site :-).
When updating the diary, I highly recommend you make a backup just in case something goes wrong. Then, replace the new files, however – DO NOT do the update by first deleting the entire diary folder and then uploading the new one – this would permanently DELETE all your diary records. Instead, simply replace only the files, the “logs” directory where your data is saved is empty in the zip file so if you replace it, it wont touch your logs directory on the server and will not overwrite any of your records, but if you delete the whole folder first, you will of course lose all this data.
Disasters plugin does not require any settings so you can simply replace the original files as well.