Page 2 of 7

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Posted: Mon 22 Dec 2014 1:25 am
by beteljuice
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 ?

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Posted: Mon 22 Dec 2014 12:15 pm
by JennyLeez
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

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Posted: Mon 22 Dec 2014 12:38 pm
by beteljuice
@everyone

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

Just in time for you all to 'Prefix' with Happy Christmas ;)

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Posted: Mon 22 Dec 2014 12:47 pm
by bnwrx
I can confirm also for all "F" users, it now works!!! :clap: :clap:

Many thanks to beteljuice and jenny!!!

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Posted: Tue 23 Dec 2014 2:39 pm
by beteljuice
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 !

Edit: Google have removed the free translator that was being used :(

.... 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: )

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Posted: Tue 23 Dec 2014 3:31 pm
by bnwrx
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.

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Posted: Tue 23 Dec 2014 3:47 pm
by water01
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?

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Posted: Tue 23 Dec 2014 8:44 pm
by JennyLeez
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

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Posted: Tue 23 Dec 2014 9:59 pm
by JennyLeez
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

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Posted: Tue 23 Dec 2014 11:53 pm
by water01
'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.

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Posted: Wed 24 Dec 2014 12:42 am
by JennyLeez
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

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Posted: Wed 24 Dec 2014 12:53 am
by PaulMy
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

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Posted: Wed 24 Dec 2014 1:33 am
by water01
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.

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Posted: Wed 24 Dec 2014 2:04 am
by JennyLeez
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.

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Posted: Wed 24 Dec 2014 2:06 am
by JennyLeez
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