Page 2 of 3

Re: CumulsMX PHP Webtags

Posted: Sat 25 Apr 2020 7:41 pm
by water01
OK after reading the PHP documentation pointed to by sfws I have changed the two files to exclude the closing ?> and tested them to see if they work correctly.

Been programming in PHP now for so many years I care not to recall, but I am always willing to learn!! Why I never spotted this I will never know as I always RTFM!!

Re: CumulsMX PHP Webtags

Posted: Sat 25 Apr 2020 11:42 pm
by beteljuice
:groan:

the beteljuice will continue to 'close' his tags (keeps the editor happy)

Just as I'm sort of trying to rebuild the Saratoga / Kocher style 'wxstatus' page for everyone, the files and tags and file sizes are in 'flux' .

test page is also in flux and has much yet to do and 'new records' has an incredible amount of possible notifications to try and code for.

Different size versions have been mentioned, so what is the expected upload frequency of this file ?

Re: CumulsMX PHP Webtags

Posted: Sun 26 Apr 2020 3:40 am
by HansR
Ah, that's a nice one @beteljuice. Had been looking at something like this with kocher but did not have the time to dive in deep.
Looks good. Has it finished already? And I don't even use webtags. ;)

Re: CumulsMX PHP Webtags

Posted: Sun 26 Apr 2020 8:20 am
by water01
Different size versions have been mentioned, so what is the expected upload frequency of this file ?
If you mean my cumulswubtags.txt only if there is an error or Mark adds more webtags. :D :D :D

Re: CumulsMX PHP Webtags

Posted: Tue 05 May 2020 9:09 am
by water01
OK Mark is a hard man to keep up with but I have added all the new build 3076 "feels like" webtags and updated and added the Davis webtags in cumuluswebtags.txt in the first post and tested it on my website. All is working at it should be!!

This is both files by the way as there are new ByMonth Feels Like webtags

Re: CumulsMX PHP Webtags

Posted: Mon 18 May 2020 4:04 pm
by water01
Latest update in Build 3077 <#LastRainTip> added.

Re: CumulsMX PHP Webtags

Posted: Tue 26 May 2020 1:08 pm
by water01
Updated for Build 3080 with Ecowitt web tags

Re: CumulsMX PHP Webtags

Posted: Wed 10 Jun 2020 7:30 pm
by dazza1223
hi i took on somthink abit here

im trying to get cumuluswebtags.php to inport in the tags with out cumuls prossising it

but it not outputing the same way as if it get prosested bye cumuls

this is the one
var then_month = 06 -1;
var then = Date.UTC(2020, then_month, 10, 18, 50, 07);
var timetodie = 10 * missed * 60000; // milliseconds per minute

im trying to get it done in php


and the php one outputs this

// Javascript Cumulus update checker - betejuice v2.0 July 2011
// set these variables to suit
var missed = 2; // Number of updates to miss before deciding "offline", MUST be > 1, fractions allowed (eg. 1.5)
var online_pic = "images/pictures/greenbrightled21px.gif"; // location of ONline image
var online_txt = "on line"; // your ONline text
var online_txt2 = "0";
var offline_pic = "images/pictures/redgreenled21px.gif"; // location of OFFline image
var offline_txt = "off line"; // your OFFline text
var offline_txt2 = "2";
// END user vars


Code: Select all

script type="text/javascript">
<!--
// Javascript Cumulus update checker - betejuice v2.0 July 2011
// set these variables to suit
var missed = 2; // Number of updates to miss before deciding "offline", MUST be > 1, fractions allowed (eg. 1.5)
var online_pic = "images/pictures/greenbrightled21px.gif"; // location of ONline image
var online_txt = "on line"; // your ONline text
var online_txt2 = "0";
var offline_pic = "images/pictures/redgreenled21px.gif"; // location of OFFline image
var offline_txt = "off line"; // your OFFline text
var offline_txt2 = "2";
// END user vars

var now = new Date();	
var then_month = <?php echo $timeUTC?> format=mm> -1;
var then = Date.UTC(<?php echo $timeUTC?> format=yyyy>, then_month, <?php echo $timeUTC?> format="dd', 'hh', 'mm', 'ss");
var timetodie = <?php echo $interval?> * missed * 60000; // milliseconds per minute

if(now - then < timetodie){
status_pic = online_pic;
status_txt = online_txt;
status_txt2 = online_txt2;
} else {
status_pic = offline_pic;
status_txt = offline_txt;
status_txt2 = offline_txt2;
}
-->
</script>  

Re: CumulsMX PHP Webtags

Posted: Wed 10 Jun 2020 9:27 pm
by water01
I am sorry but I do not understand what you are attempting to do.

By it's very nature cumuluswebtags.txt has to be processed by CumulusMX in order to produce the values required to upload cumulswebtags.php, otherwise the values will not be present in the file.

Re: CumulsMX PHP Webtags

Posted: Fri 10 Jul 2020 8:30 am
by water01
Updated for Build 3087.

Re: CumulsMX PHP Webtags

Posted: Sat 01 Aug 2020 10:17 am
by water01
Updated for Build 3089 on 1st August, sorry for delay.

Re: CumulsMX PHP Webtags

Posted: Sat 01 Aug 2020 10:31 am
by ConligWX
David.

Line 791 of cumulusmxwebtags.txt has a typo by the looks of it. $txchammels

Re: CumulsMX PHP Webtags

Posted: Sat 01 Aug 2020 11:14 am
by water01
Not really an error as it is a PHP generated tag anyway i.e. not output by MX, but I have altered it to channels.

File now available.

To anyone who was using it $txchammels is now $txchannels (would only apply to David users).

Re: CumulsMX PHP Webtags

Posted: Fri 28 Aug 2020 2:08 pm
by water01
Updated for all builds up to Build 3092 on 23rd August, sorry for delay.

Re: CumulsMX PHP Webtags

Posted: Sun 04 Oct 2020 11:07 am
by water01
Updated for all builds up to Build 3094 on 14th September, sorry for delay.