Page 4 of 6

Re: Extreme Weather script(s)

Posted: Mon 20 Nov 2023 9:09 pm
by BeaumarisWX
Hi Paul,
OMG blanky birds.

Were did Mike work, our old store chain was as Split from Safeway in the Late 1970's to capture a different level of shoppers it was called Jack The Slasher Foodbarn, run by Jack Butler and Staff.

Thanks for the link I had no idea it existed, which brings up another project I have been playing with since The Cumulus Forum List of User sites is a dismal mess and most now dead links and also since the beteljuice (God Rest his Soul) User Map has departed with him, I started plodding my way through the list and in order to eventually put forward some sort of proposal to have something similar on the Forum, I can output xml feends json etc from my database. But I had not shown it to anyone.
If you would like to take a look, would appreciate your thoughts, I just removed your site from the list so you can try and add it if you like.
Here is a link https://beaumaris-weather.com/wxcuusermap.php
Link can be found on my main site menu About/Forums/Cumulus Users Map.

Kindest Regards,
Tony

Re: Extreme Weather script(s)

Posted: Mon 20 Nov 2023 10:15 pm
by PaulMy
Hi Tony,
We're getting of topic here so will post new.

Enjoy,
Paul

Re: Extreme Weather script(s)

Posted: Tue 21 Nov 2023 5:37 pm
by ConligWX
Tony

seems to be a bug in the script..

is there any way of not showing certain fields with 0.0 values (mm/in and mph/km/h when there is no site numer/name? its showing this in the Station ID column.

https://www.conligwx.org/wxextremes.php?extremes=Austra#


Screenshot 2023-11-21 173526.png

Re: Extreme Weather script(s)

Posted: Tue 21 Nov 2023 10:23 pm
by BeaumarisWX
Hi Simon,
That was already in the Mapantz version you supplied, nothing I did.
I'll leave that for someone else to fix matey, sorry too much on. :lol:
You have a go at it matey.
Kindest Regards,
Tony

Re: Extreme Weather script(s)

Posted: Wed 22 Nov 2023 10:22 am
by ConligWX
BeaumarisWX wrote: Tue 21 Nov 2023 10:23 pm You have a go at it matey.
Kindest Regards,
Tony
lol I'd only break it :lol:

Re: Extreme Weather script(s)

Posted: Wed 22 Nov 2023 11:17 am
by Mapantz
It's also there in the original version.

The table has 4 columns but if a station doesn't show, the station id column is removed and the end column moves back by one, making it 3 columns in a 4-column-wide table. It needs a check to look for an empty one and add a dash in or something?!

I'll have a look later if I can find time.

Re: Extreme Weather script(s)

Posted: Wed 22 Nov 2023 11:44 pm
by BeaumarisWX
OK,
So I have found the cause, somehow an old version by Jeremy Dyde VerJ.1 27-Aug-15 which many of us had, was lost in new version.
So I have modified my example to prove it works, if everyone agrees I will update the Single and Dual Unit versions and post here and on https://www.wxforum.net/index.php?topic ... #msg466208.
2100bd9e-b3de-4087-8ad7-ab3f05c2ef16.png
See example here : https://beaumaris-weather.com/worldextremes.php
Note: Link above has ?sce=view disabled for now, also Note : 15 Stations selected The Baha returns only what's available and has no Wind.
1be34baf-b305-4fa4-aebe-29287a22fd2d.png

Update : The Single and Both Unit files have been updated, though release pending feedback by a few.
So I tidied up some more code and added some revamped old code back in for displaying (Just UTC) or (Both UTC and Your Local) or Just (Your Local).
Settings area, modified to hopefully be easily understood.
Test Files remove : Thu 23-Nov-2023 22:33 UTC, links below now actual new files.
1 : Single Units : https://beaumaris-weather.com/worldextr ... _units.php
2 : Both Units : https://beaumaris-weather.com/worldextr ... _units.php

I have also been working on adapting my own onsite version : which is a long way off sharing at this stage.
I have spent ages generating and resizing Country Flag Images and Re-Coding the script to display Flags based on user selected Country.
Still a way to go on this one. https://beaumaris-weather.com/worldextremes_flags.php

Kindest Regards,
Tony

Re: Extreme Weather script(s)

Posted: Thu 23 Nov 2023 3:40 pm
by ConligWX
Thanks for your work on this guys. much appreciated. :clap:

I would say however the dropdown list seems to be somewhat lacking in countries from around the world, considering the webpage is called "World Extremes". The EU countries, UK, US and a handful more seems a bit neglectful of the rest of the world would you not agree? The original script had more countries listed I think.

also wind values in km/h have no decimal place like mph. are they just rounded up or the decimal just dropped?

Re: Extreme Weather script(s)

Posted: Thu 23 Nov 2023 4:16 pm
by PaulMy
Hi Tony,

Code: Select all

 working on adapting my own onsite version
Looks great!!

Enjoy,
Paul

Re: Extreme Weather script(s)

Posted: Thu 23 Nov 2023 5:04 pm
by water01
1 : Single Units : https://beaumaris-weather.com/worldextr ... s_test.php
2 : Both Units : https://beaumaris-weather.com/worldextr ... s_test.php
?sce=view does not seem to work on these files.

Re: Extreme Weather script(s)

Posted: Thu 23 Nov 2023 5:27 pm
by PaulMy
Hi David,
I don't know what it takes to allow a PHP file with ?sce=view but presume that will be activated when Tony is ready to release them.
Note: Link above has ?sce=view disabled for now,

The Single and Both Unit files have been updated, though release pending feedback by a few.
Enjoy,
Paul

Re: Extreme Weather script(s)

Posted: Thu 23 Nov 2023 9:56 pm
by BeaumarisWX
Hi All,
So I get the feeling I am not going to get any real feedback on the new test files which address requested changes.

1 : Modified Units Switch, which was incorrectly coded (was forced to switch wind to Imperial)
2 : Also added Both Metric and Imperial but can be set to only one. 2 Separate files now Single Units and Both Units.
3 : Re-Instated changes by VerJ.1 Made output lines variable based on number of data items, if less than number of stations requested.
4 : Also added Alternate Time again with some mods. And a lame (d/m/y) or (m/d/y) display option, needs someone to upgrade it to a simpler variable.
5 : Also added Sitesource Switch in Settings now, ensure you try Source 1 First which is what most use. Currently default to 3 as I have to use that one.
6 : Also Painstakingly went through every station in main old list and removed null stations, note new long list array many stations only one return, but left in list, you can adjust to your liking (No idea who shortened it or when) .
7 : Also added Short and Long List Array Switch in Settings now, currently defaulted to "1" Shortlist.

Heaps of other tidy up and spelling and code corrections done.

Simon : The Ranking Data we obtain is already Rounded for wind, so we can't do anything about that. If you look on the actual stations detail they are not rounded, bet we don't access that data. The only reason MPH is rounded is because we import Rounded KMH and then convert it to a 1 decimal place for MPH.

OK : So the 2 Test files have been deleted and the original named files have been updated with new code and the ?sce=view (Enabled).
Hopefully they work as I had no real feedback !

1 : The Single Units Column : https://beaumaris-weather.com/worldextr ... p?sce=view

2 : The Both Units Column : https://beaumaris-weather.com/worldextr ... p?sce=view

UPDATE : If you downloaded these before (Thu 23-Nov-2023 22:17:55 UTC) then download again, I had a late correction.

Note : Do not forget to change your Local Timezone near start of the Settings :

Code: Select all

$where = 'Australia/Hobart'; // Long timezone name e.g. 'Europe/Sofia' or 'UTC' if no alternate
Oh Thanks Paul for the Like, that version is a way off :lol:

Kindest Regards,
Tony

Re: Extreme Weather script(s)

Posted: Fri 24 Nov 2023 11:25 am
by ConligWX
PaulMy wrote: Thu 23 Nov 2023 5:27 pm Hi David,
I don't know what it takes to allow a PHP file with ?sce=view but presume that will be activated when Tony is ready to release them.

Enjoy,
Paul
just a matter of php code in the file.

Code: Select all

if (isset($_REQUEST['sce']) && strtolower($_REQUEST['sce']) == 'view' ) {
   //--self downloader --
   $filenameReal = __FILE__;
   $download_size = filesize($filenameReal);
   header('Pragma: public');
   header('Cache-Control: private');
   header('Cache-Control: no-cache, must-revalidate');
   header("Content-type: text/plain,charset=ISO-8859-1");
   header("Accept-Ranges: bytes");
   header("Content-Length: $download_size");
   header('Connection: close');
   
   readfile($filenameReal);
   exit;
}

Re: Extreme Weather script(s)

Posted: Fri 24 Nov 2023 5:19 pm
by ConligWX
BeaumarisWX wrote: Thu 23 Nov 2023 9:56 pm Hi All,
So I get the feeling I am not going to get any real feedback on the new test files which address requested changes.

1 : Modified Units Switch, which was incorrectly coded (was forced to switch wind to Imperial)
2 : Also added Both Metric and Imperial but can be set to only one. 2 Separate files now Single Units and Both Units.
3 : Re-Instated changes by VerJ.1 Made output lines variable based on number of data items, if less than number of stations requested.
4 : Also added Alternate Time again with some mods. And a lame (d/m/y) or (m/d/y) display option, needs someone to upgrade it to a simpler variable.
5 : Also added Sitesource Switch in Settings now, ensure you try Source 1 First which is what most use. Currently default to 3 as I have to use that one.
6 : Also Painstakingly went through every station in main old list and removed null stations, note new long list array many stations only one return, but left in list, you can adjust to your liking (No idea who shortened it or when) .
7 : Also added Short and Long List Array Switch in Settings now, currently defaulted to "1" Shortlist.

Heaps of other tidy up and spelling and code corrections done.

Simon : The Ranking Data we obtain is already Rounded for wind, so we can't do anything about that. If you look on the actual stations detail they are not rounded, bet we don't access that data. The only reason MPH is rounded is because we import Rounded KMH and then convert it to a 1 decimal place for MPH.

OK : So the 2 Test files have been deleted and the original named files have been updated with new code and the ?sce=view (Enabled).
Hopefully they work as I had no real feedback !

1 : The Single Units Column : https://beaumaris-weather.com/worldextr ... p?sce=view

2 : The Both Units Column : https://beaumaris-weather.com/worldextr ... p?sce=view

UPDATE : If you downloaded these before (Thu 23-Nov-2023 22:17:55 UTC) then download again, I had a late correction.

Note : Do not forget to change your Local Timezone near start of the Settings :

Code: Select all

$where = 'Australia/Hobart'; // Long timezone name e.g. 'Europe/Sofia' or 'UTC' if no alternate
Oh Thanks Paul for the Like, that version is a way off :lol:

Kindest Regards,
Tony
Wow, such a change.... excellent work Tony and thanks for the explanations. Much Appreciated :clap:

Re: Extreme Weather script(s)

Posted: Sat 25 Nov 2023 4:37 am
by BeaumarisWX
Hi,

New versions available : I found some bugs which where not picked up, due to no one testing.
Last version for me, Main updates are reduced amount of users settings required by adding some more switches outside the (now much smaller Settings area).
Hopefully it works for you.
Make sure you backup the older version.

1 : The Single Units Column : https://beaumaris-weather.com/worldextr ... p?sce=view

2 : The Both Units Column : https://beaumaris-weather.com/worldextr ... p?sce=view

Kindest Regards,
Tony