If you use Cumulus, please donate Image

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

Cumulus ‘Current Conditions’ Alternative v3.0

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderators: daj, TNETWeather

User avatar
beteljuice
Posts: 2455
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby beteljuice » Mon Dec 22, 2014 1:25 am

OK - your converted _apptemp is:
<!-- _apptemp: -4 C -->
The code says:

Code: Select all

        } elseif ($_apptemp >= -10.0 && $apptemp < 0.0){
            $CI_text = $langCurrComfort[3];
The array should be:

Code: Select all

$langCurrComfort = array (
   "DANGEROUSLY COLD", "Extremely Cold", "Bitterly Cold", "Very Cold", "Uncomfortably Cold", "Cold", "Cool", "Coolish", "Mild", "Warm", "Very Warm", "Hot", "Uncomfortably Hot", "Very Hot", "Extremely Hot", "DANGEROUSLY HOT");
So your output should be "Very Cold"

What's been changed ?
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
JennyLeez
Posts: 283
Joined: Wed Dec 16, 2009 2:32 am
Weather Station: La Crosse WS3083
Operating System: Windows XP, Win7 & Win 10
Location: Wairoa, Hawkes Bay. New Zealand.
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby JennyLeez » Mon Dec 22, 2014 12:15 pm

Errors all fixed and hopefully we are back on track :)

The 3 versions have been repacked and uploaded.

Thanks bnwrx for helping sort out your dangerously hot weather at -4.0 °C (26.8°F)

Cheers
Jenny
Wairoa, Hawkes Bay, New Zealand Weather Station:
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
Image

User avatar
beteljuice
Posts: 2455
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby beteljuice » Mon Dec 22, 2014 12:38 pm

@everyone

Jenny fixed it Image ... and it was a beteljuice problem :oops:

Just in time for you all to 'Prefix' with Happy Christmas ;)
Image
......................Imagine, what you will KNOW tomorrow !

bnwrx
Posts: 448
Joined: Wed Feb 25, 2009 12:01 am
Weather Station: Ambient WS2095 (Fine/Offset)
Operating System: Windows 10 64bit
Location: Woodland Park, Colorado USA
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby bnwrx » Mon Dec 22, 2014 12:47 pm

I can confirm also for all "F" users, it now works!!! :clap: :clap:

Many thanks to beteljuice and jenny!!!

User avatar
beteljuice
Posts: 2455
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby beteljuice » Tue Dec 23, 2014 2:39 pm

I think perhaps that so far the 'optional' Admin Modifier hasn't been appreciated and is a worthwhile and powerful thing .....

Comments within the script:

Code: Select all

Options:
   Auto - default behaviour fully automatic best guess current conditions.
   Manual - Completely REPLACES Auto with the specified text for the specified amount of time, then returns to Auto
   Prefix - Specified text is put in front of Auto for the specified amount of time, then returns to Auto
   Hybrid - As for Prefix BUT rain reporting (If applicable) is removed for the specified amount of time, then returns to Auto
            this is useful eg. snow / hail when your bucket reports nothing until a thaw then says you have a monsoon with clear skies

So you could for example put "Merry Christmas" or "Webcam broken" or ..... whatever in front of the conditions text.

If your weather station is temporarily 'sick' you can suppress the (Incorrect) conditions text and optionally replace it with eg. "Anemometer frozen"

... and so on.

Everything (except Auto ;) ) can be given a "Time To Die" or "Never" so that you don't have to remember to remove a temporary comment.

For those using Multi-Lingual templates (eg. Saratoga ML or WeatherByYou ML) the script will try to do a best guess translation of your comment !

.... and for those using saratoga ML, we've even enabled a little used feature in the footer that shows you all the (saratoga) missing translations for the page language.

What more do you want :clap: (That is rhetorical by the way and not a request for even more coding :bash: )
Image
......................Imagine, what you will KNOW tomorrow !

bnwrx
Posts: 448
Joined: Wed Feb 25, 2009 12:01 am
Weather Station: Ambient WS2095 (Fine/Offset)
Operating System: Windows 10 64bit
Location: Woodland Park, Colorado USA
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby bnwrx » Tue Dec 23, 2014 3:31 pm

beteljuice wrote:....What more do you want :clap: (That is rhetorical by the way and not a request for even more coding :bash: )


But we do want more, more, more.....Figgy Pudding that is!! :lol: :lol:

Seriously though...This is really great work by beteljuice and Jenny....
I've been using it, and yes, using the Modifier, and I can insert a brief comment about what is happening at the moment, and have it time out and not worry about it not being "quite accurate", if you catch my drift.

water01
Posts: 1395
Joined: Sat Aug 13, 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 7 64bit HP SP1
Location: Gurney Slade,Somerset, UK
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby water01 » Tue Dec 23, 2014 3:47 pm

OK is it me being thick but I cannot see why the instructions say
Add both CCdataT.php and CCdata.php files to 'cumulus\web' folder.


Surely I only need either CCdataT.php or CCdata.php and upload which ever one you choose, after processing, as CCdata.php?

User avatar
JennyLeez
Posts: 283
Joined: Wed Dec 16, 2009 2:32 am
Weather Station: La Crosse WS3083
Operating System: Windows XP, Win7 & Win 10
Location: Wairoa, Hawkes Bay. New Zealand.
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby JennyLeez » Tue Dec 23, 2014 8:44 pm

Surely I only need either CCdataT.php or CCdata.php and upload which ever one you choose, after processing, as CCdata.php?


HI David,

'To my knowledge' you need both in your cumulus folder. CCdataT.php to be processed to CCdata.php. CCdata.php to be uploaded.
Just the same as the Cumulus standard pages, you dont want the original file with the tags over written.

Looks neat on your website David. Have a play with the currAdminML.php

Cheers
Jenny
Last edited by JennyLeez on Tue Dec 23, 2014 10:02 pm, edited 1 time in total.
Wairoa, Hawkes Bay, New Zealand Weather Station:
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
Image

User avatar
JennyLeez
Posts: 283
Joined: Wed Dec 16, 2009 2:32 am
Weather Station: La Crosse WS3083
Operating System: Windows XP, Win7 & Win 10
Location: Wairoa, Hawkes Bay. New Zealand.
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby JennyLeez » Tue Dec 23, 2014 9:59 pm

So you could for example put "Merry Christmas" or "Webcam broken" or ..... whatever in front of the conditions text.

I have just played beteljuice.
My standalone/own design site also allowed me to add styling to Manual to change the Merry Christmas to bold and red.
http://wairoa.net/weather/index.htm

For those using Multi-Lingual templates (eg. Saratoga ML or WeatherByYou ML) the script will try to do a best guess translation of your comment !

I also tried styling with the Saratoga template which worked in english but alas in other ML languages it tried to translate the code :)
So I reverted back to no styling and all is well.
http://wairoaweather.net/CCmodifier.php

21 languages all saying Merry Christmas, you are pretty clever beteljuice :)

http://wairoaweather.net/?lang=en
http://wairoaweather.net/?lang=fr
Wairoa, Hawkes Bay, New Zealand Weather Station:
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
Image

water01
Posts: 1395
Joined: Sat Aug 13, 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 7 64bit HP SP1
Location: Gurney Slade,Somerset, UK
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby water01 » Tue Dec 23, 2014 11:53 pm

'To my knowledge' you need both in your cumulus folder. CCdataT.php to be processed to CCdata.php. CCdata.php to be uploaded.
Just the same as the Cumulus standard pages, you dont want the original file with the tags over written.


I think you are wrong Jenny. Cumulus automatically processes CCdata.php to CCdata.phptmp and that gets uploaded as CCdata.php. The T files in the standard Cumulus web are simply to maintain any customised amendments made to the Templates which are then uploaded as standard to the files without the T in Steve's code, you do not need this if you are processing a file via the Files area as Cumulus automagically takes care of the tmp for you.

Therefore there is no need to have both files as my site proves because I am processing CCdata.php and uploading it I have not bothered with the CCdataT.php file.

User avatar
JennyLeez
Posts: 283
Joined: Wed Dec 16, 2009 2:32 am
Weather Station: La Crosse WS3083
Operating System: Windows XP, Win7 & Win 10
Location: Wairoa, Hawkes Bay. New Zealand.
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby JennyLeez » Wed Dec 24, 2014 12:42 am

Hi David,

Live and learn on my part :)
But for single upload only.

That would not work for me though. I also need CCdataT.php processed and stored on my hard drive as CCdata.php to allow another FTP program to upload it to a different server. I am feeding a few demo sites at present :) So yes I do need both.

Many of us have more than 1 web sites so I think I will leave the packages as is for clarity.

Thanks for you help David :)

Cheers
Jenny
Wairoa, Hawkes Bay, New Zealand Weather Station:
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
Image

User avatar
PaulMy
Posts: 1525
Joined: Sun Sep 28, 2008 11:54 pm
Weather Station: Davis Vantage Pro 2 w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby PaulMy » Wed Dec 24, 2014 12:53 am

I think perhaps that so far the 'optional' Admin Modifier hasn't been appreciated and is a worthwhile and powerful thing .....
I've been playing with trying this for a couple of things already such as Notice that EC forecasts were not available, and also the colour Merry Christmas looks nice!

Great idea,
Paul

water01
Posts: 1395
Joined: Sat Aug 13, 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 7 64bit HP SP1
Location: Gurney Slade,Somerset, UK
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby water01 » Wed Dec 24, 2014 1:33 am

That would not work for me though. I also need CCdataT.php processed and stored on my hard drive as CCdata.php to allow another FTP program to upload it to a different server. I am feeding a few demo sites at present :) So yes I do need both.


Since Cumulus doesn't delete CCdata.phptmp, instead of processing two files why don't you just upload that file and change its name to CCdata.php, which would save Cumulus the extra file process.

User avatar
JennyLeez
Posts: 283
Joined: Wed Dec 16, 2009 2:32 am
Weather Station: La Crosse WS3083
Operating System: Windows XP, Win7 & Win 10
Location: Wairoa, Hawkes Bay. New Zealand.
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby JennyLeez » Wed Dec 24, 2014 2:04 am

I tried that from your previous post if this is what you mean.

program files\cumulus\CCdata.phptmp --> /CCdata.php

It would not upload and overwrite like that unfortunately.
Wairoa, Hawkes Bay, New Zealand Weather Station:
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
Image

User avatar
JennyLeez
Posts: 283
Joined: Wed Dec 16, 2009 2:32 am
Weather Station: La Crosse WS3083
Operating System: Windows XP, Win7 & Win 10
Location: Wairoa, Hawkes Bay. New Zealand.
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby JennyLeez » Wed Dec 24, 2014 2:06 am

PaulMy wrote:
I think perhaps that so far the 'optional' Admin Modifier hasn't been appreciated and is a worthwhile and powerful thing .....
I've been playing with trying this for a couple of things already such as Notice that EC forecasts were not available, and also the colour Merry Christmas looks nice!
Great idea,
Paul


Looks neat Paul, did you have a look at it in French though.
Thats what happened to me also so I took the colour away :)

Cheers
Wairoa, Hawkes Bay, New Zealand Weather Station:
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
Image


Return to “Web site - General”

Who is online

Users browsing this forum: No registered users and 5 guests