ok this might help you get started barometermod-full.php how you determine what colour to associate with the values is up-to you but think about the wider audience otherwise i am more inclined to leave it untouched, some may see low pressure readings as stormy wet windy/storm force , some may see very high pressure as warm dry (red) in warmer seasons but much colder(blue) scenarios in winter seasons ,I'm not aware of any standard colour scale to reflect pressure hence I always stick to one colour but obviously I understand the values having owned many ship/standard drum needle /barograph pressure gauges/instruments in my youth , i use to repair/restore them for antique shops but i wouldn't touch mercury instruments !! . need a clean solution that works for everyone not personal individual cases please think of the wider audience and scenarios.. brian
Weather34 Meteobridge Master Template Download
Moderator: Mattk
-
- Platinum Boarder
- Posts: 1693
- Joined: Tue Mar 28, 2017 6:57 am
Re: Weather34 Meteobridge Master Template Download
- jmontamat
- Gold Boarder
- Posts: 267
- Joined: Tue Sep 09, 2014 4:49 pm
- Location: Barcelona Spain
- Contact:
Re: Weather34 Meteobridge Master Template Download
Respecting values like Barometer chartstoday colors:
if (weather34value>=900 && weather34value<=1000) {thecolor='hsl(201, 79%, 47%)';}
else if (weather34value>1000 && weather34value<=1010) {thecolor='hsl(75, 62%, 43%)';}
else if (weather34value>1010 && weather34value<=1020) {thecolor='hsl(35, 77%, 58%)';}
else if (weather34value>1020 && weather34value<=1030) {thecolor='hsl(19, 66%, 55%)';}
else if (weather34value>1030 && weather34value<=1040) {thecolor='hsl(12, 80%, 52%)';}
else if (weather34value>1040 && weather34value<=1060) {thecolor='hsl(2, 56%, 55%)';}
else {thecolor='hsla(206, 12%, 27%, .4)';}
if (weather34value>=900 && weather34value<=1000) {thecolor='hsl(201, 79%, 47%)';}
else if (weather34value>1000 && weather34value<=1010) {thecolor='hsl(75, 62%, 43%)';}
else if (weather34value>1010 && weather34value<=1020) {thecolor='hsl(35, 77%, 58%)';}
else if (weather34value>1020 && weather34value<=1030) {thecolor='hsl(19, 66%, 55%)';}
else if (weather34value>1030 && weather34value<=1040) {thecolor='hsl(12, 80%, 52%)';}
else if (weather34value>1040 && weather34value<=1060) {thecolor='hsl(2, 56%, 55%)';}
else {thecolor='hsla(206, 12%, 27%, .4)';}
Last edited by jmontamat on Thu Mar 30, 2023 11:37 am, edited 1 time in total.
- jmontamat
- Gold Boarder
- Posts: 267
- Joined: Tue Sep 09, 2014 4:49 pm
- Location: Barcelona Spain
- Contact:
Re: Weather34 Meteobridge Master Template Download
Code: Select all
<div class="weather34sunratebar1"
style=
"width:<?php if ( $meteobridgeapi[10]<950){echo $meteobridgeapi[10]*0.020;}
else if ( $meteobridgeapi[10]<960){echo $meteobridgeapi[10]*0.035;}
else if ( $meteobridgeapi[10]<970){echo $meteobridgeapi[10]*0.045;}
else if ( $meteobridgeapi[10]<990){echo $meteobridgeapi[10]*0.055;}
else if ( $meteobridgeapi[10]<=1000){echo $meteobridgeapi[10]*0.070;}
else if ( $meteobridgeapi[10]<=1010){echo $meteobridgeapi[10]*0.080;}
else if ( $meteobridgeapi[10]<=1020){echo $meteobridgeapi[10]*0.100;}
else if ( $meteobridgeapi[10]<=1030){echo $meteobridgeapi[10]*0.120;}
else echo $meteobridgeapi[10]*0.148;
?>px;background:
<?php if ($meteobridgeapi[10]>=900 && $meteobridgeapi[10]<= 1000) {echo 'hsl(201, 79%, 47%)';}
else if ($meteobridgeapi[10]>1000 && $meteobridgeapi[10]<= 1010) {echo 'hsl(75, 62%, 43%)';}
else if ($meteobridgeapi[10]>1010 && $meteobridgeapi[10]<= 1020) {echo 'hsl(35, 77%, 58%)';}
else if ($meteobridgeapi[10]>1020 && $meteobridgeapi[10]<= 1030) {echo 'hsl(19, 66%, 55%)';}
else if ($meteobridgeapi[10]>1030 && $meteobridgeapi[10]<= 1040) {echo 'hsl(12, 80%, 52%)';}
else if ($meteobridgeapi[10]>1040 && $meteobridgeapi[10]<= 1060) {echo 'hsl(2, 56%, 55%)';} ;?>;">
- Attachments
-
- Sin título1.png (12.5 KiB) Viewed 39175 times
-
- Sin título.png (15.5 KiB) Viewed 39176 times
-
- Platinum Boarder
- Posts: 1693
- Joined: Tue Mar 28, 2017 6:57 am
Re: Weather34 Meteobridge Master Template Download
Good morning Josep
all done many thanks feel free to suggest other ideas/improvements
Simple-Update-Aurora-MKII-April-2023-Rev-E
https://www.mediafire.com/file/l8b3g06k ... E.zip/file
added requested barometer/pressure colour range (Josep)
adds requested humidity dry - comfortable - wet phrases (George)
adds requested wind run (George)
..brian
all done many thanks feel free to suggest other ideas/improvements
Simple-Update-Aurora-MKII-April-2023-Rev-E
https://www.mediafire.com/file/l8b3g06k ... E.zip/file
added requested barometer/pressure colour range (Josep)
adds requested humidity dry - comfortable - wet phrases (George)
adds requested wind run (George)
..brian
-
- Senior Boarder
- Posts: 78
- Joined: Sun Mar 03, 2019 8:12 pm
- Contact:
Re: Weather34 Meteobridge Master Template Download
Hi, Brian! Do you remember how I bothered you with changing the units of atmospheric pressure measurement in "mmHg"? Is there a possibility to implement them in Layout No. 5 and 6? Layout No. 6 is just super! In the settings when mmHg is enabled in the "Barometer Unit" and in the "Card Position - barometer - modmmHG.php ", the hPa is still displayed. I understand that I am most likely the only user of your template with such wishes, but this functionality has already been implemented, except for the last two layouts. Thanks.
- Attachments
-
- Screenshot 2023-04-01 090050.png (125.69 KiB) Viewed 39088 times
-
- Platinum Boarder
- Posts: 1693
- Joined: Tue Mar 28, 2017 6:57 am
Re: Weather34 Meteobridge Master Template Download
Hello Alex
it was on the todo list so you have prompted me .so all done mmHG added to theme 5 and 6 and almanac screens updated to reflect mmHG
Simple-Update-Aurora-MKII-April-2023-Rev-F.zip
https://www.mediafire.com/file/pw26lanq ... F.zip/file
as previous it relies on mmHG module being set in the theme there is probably a neater or smarter way of doing but its a lot recoding so stick with original way. also updates the solar module for those with no UV but have a solar sensor .brian
it was on the todo list so you have prompted me .so all done mmHG added to theme 5 and 6 and almanac screens updated to reflect mmHG
Simple-Update-Aurora-MKII-April-2023-Rev-F.zip
https://www.mediafire.com/file/pw26lanq ... F.zip/file
as previous it relies on mmHG module being set in the theme there is probably a neater or smarter way of doing but its a lot recoding so stick with original way. also updates the solar module for those with no UV but have a solar sensor .brian
-
- Senior Boarder
- Posts: 78
- Joined: Sun Mar 03, 2019 8:12 pm
- Contact:
Re: Weather34 Meteobridge Master Template Download
Super! mmHg are working, but I also noticed this thing: there are still other values in screenshots 1 and 2 (according to the links for today, month, year).
I understand it this way, only for 2023, at the bottom of the page "consolecharts-year.php " the highs and lows of all parameters are displayed, and from 2022 and earlier the current forecast is displayed?
Also as a suggestion: is it possible to add a choice in "Full Fixed Theme Display Position 11" (screenshot 4), for example, the moon-sun module?
I understand it this way, only for 2023, at the bottom of the page "consolecharts-year.php " the highs and lows of all parameters are displayed, and from 2022 and earlier the current forecast is displayed?
Also as a suggestion: is it possible to add a choice in "Full Fixed Theme Display Position 11" (screenshot 4), for example, the moon-sun module?
- Attachments
-
- Screenshot4.png (403.99 KiB) Viewed 39058 times
-
- Screenshot3.png (401.12 KiB) Viewed 39058 times
-
- Screenshot2.png (346.05 KiB) Viewed 39058 times
-
- Screenshot1.png (310.26 KiB) Viewed 39058 times
-
- Platinum Boarder
- Posts: 1693
- Joined: Tue Mar 28, 2017 6:57 am
Re: Weather34 Meteobridge Master Template Download
Good morning ALEXalexeysailman wrote: ↑Sat Apr 01, 2023 9:01 pm Super! mmHg are working, but I also noticed this thing: there are still other values in screenshots 1 and 2 (according to the links for today, month, year).
I understand it this way, only for 2023, at the bottom of the page "consolecharts-year.php " the highs and lows of all parameters are displayed, and from 2022 and earlier the current forecast is displayed?
Also as a suggestion: is it possible to add a choice in "Full Fixed Theme Display Position 11" (screenshot 4), for example, the moon-sun module?
i have updated the max/min small chart modules to reflect mmHG .
no plans at the moment to add more module options for position 11 perhaps in the future
no plans to update previous years chart modules .
Simple-Update-Aurora-MKII-April-2023-Rev-G
https://www.mediafire.com/file/3b3goeuz ... G.zip/file
hope that helps for mmHG..brian
- jmontamat
- Gold Boarder
- Posts: 267
- Joined: Tue Sep 09, 2014 4:49 pm
- Location: Barcelona Spain
- Contact:
Re: Weather34 Meteobridge Master Template Download
Good afternoon, wouldn't it be better to unify how to change themes 2 3 4 ??
- Attachments
-
- Sin título.png (20.86 KiB) Viewed 39029 times
-
- Platinum Boarder
- Posts: 1693
- Joined: Tue Mar 28, 2017 6:57 am
Re: Weather34 Meteobridge Master Template Download
Hello Josep
its mostly been updated to use that setting just takes time to check all the screens,charts,small modules where mmHG is used and making sure it doesn't screw up existing hPa,inches,etc .
im sure by end of week it will be done amongst other requested options to be added like earthquake etc ..
its mostly been updated to use that setting just takes time to check all the screens,charts,small modules where mmHG is used and making sure it doesn't screw up existing hPa,inches,etc .
im sure by end of week it will be done amongst other requested options to be added like earthquake etc ..
Re: Weather34 Meteobridge Master Template Download
I have implemented for my site some time ago also for the other years the display of the high/low values. For me it works, but the code is Quick&Dirty, no guarantee that it works error free:alexeysailman wrote: ↑Sat Apr 01, 2023 9:01 pm I understand it this way, only for 2023, at the bottom of the page "consolecharts-year.php " the highs and lows of all parameters are displayed, and from 2022 and earlier the current forecast is displayed?
As an example for the year 2022, in the file updater2022charts.php the value "weather34-chart-bottom.php" must be changed twice to "weather34-chart-yearmaxmin-2022.php".
For the other years accordingly or replace the files with those in the attachment.
UV INDEX Max and SOLOR Max I did not include this in the code, because my weather station does not provide it.
Please make a backup before, who wants to try it!
- Attachments
-
- weather34-chart-yearmaxmin-2019-2022.zip
- (18.51 KiB) Downloaded 219 times
- jmontamat
- Gold Boarder
- Posts: 267
- Joined: Tue Sep 09, 2014 4:49 pm
- Location: Barcelona Spain
- Contact:
Re: Weather34 Meteobridge Master Template Download
Hello Brian, a small correction in firerisk full
else if ($firerisk>=0){ echo "var(--green)";}
For those of us who have lightning sensors, a module for it. ??
Thank you.
else if ($firerisk>=0){ echo "var(--green)";}
For those of us who have lightning sensors, a module for it. ??
Thank you.
- Attachments
-
- Sin título.png (16.65 KiB) Viewed 38966 times
-
- Platinum Boarder
- Posts: 1693
- Joined: Tue Mar 28, 2017 6:57 am
Re: Weather34 Meteobridge Master Template Download
Hello Torsten nice stuff very complex coding but Im getting a ERROR and to be honest I don't go near code I can't get my head around or understand .dont be offended because ultimately its me that ends up trying unravel it all in the event of issues .is this pulling data from CSV ??
Thanks Josep will correct in next simple update end of week.
BRIAN
Code: Select all
Warning: fopen(weather34charts/xmin.csv):
Failed to open stream: No such file or directory in Weather34/weather34-chart-yearmaxmin.php on line 112
Fatal error: Uncaught TypeError: feof(): Argument #1 ($stream) must be of type resource,
bool given in Weather34/weather34-chart-yearmaxmin.php:126
Stack trace: #0 Weather34/weather34-chart-yearmaxmin.php(126):
feof(false) #1 {main} thrown in Weather34/weather34-chart-yearmaxmin.php on line 126
Thanks Josep will correct in next simple update end of week.
BRIAN
Re: Weather34 Meteobridge Master Template Download
Hello Brian,
It does not find your CSV file, are you sure that the path is correct? use you fopen with mode "r" ?
https://www.php.net/manual/en/function.fopen.php
Otherwise the code read the year CSV into indexed array $row and then via the while loop (line by line until the end of the file) the desired columns are collected in new arrays with all values of the year. This new arrays can then be used to find out the min/max values.
Cold spring greetings from germany
Torsten
It does not find your CSV file, are you sure that the path is correct? use you fopen with mode "r" ?
https://www.php.net/manual/en/function.fopen.php
Otherwise the code read the year CSV into indexed array $row and then via the while loop (line by line until the end of the file) the desired columns are collected in new arrays with all values of the year. This new arrays can then be used to find out the min/max values.
Cold spring greetings from germany
Torsten
-
- Platinum Boarder
- Posts: 1693
- Joined: Tue Mar 28, 2017 6:57 am
Re: Weather34 Meteobridge Master Template Download
Hello TorstenToTo wrote: ↑Mon Apr 03, 2023 7:42 pm Hello Brian,
It does not find your CSV file, are you sure that the path is correct? use you fopen with mode "r" ?
https://www.php.net/manual/en/function.fopen.php
Otherwise the code read the year CSV into indexed array $row and then via the while loop (line by line until the end of the file) the desired columns are collected in new arrays with all values of the year. This new arrays can then be used to find out the min/max values.
Cold spring greetings from germany
Torsten
I have it working I missed adding a file ...made a few modifications to simplify and try and understand what and where does what

ill release it end of week in a simple update ..hopefully ive understood how it works and will add the uv,solar possible air quality ..
many many thanks for your idea and input much appreciated ..