Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

CumulusMX PHP Webtags

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

Moderator: daj

water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: CumulsMX PHP Webtags

Post 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!!
David
Image
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: CumulsMX PHP Webtags

Post 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 ?
Last edited by beteljuice on Sun 26 Apr 2020 6:39 am, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
HansR
Posts: 5871
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: CumulsMX PHP Webtags

Post 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. ;)
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: CumulsMX PHP Webtags

Post 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
David
Image
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: CumulsMX PHP Webtags

Post 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
David
Image
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: CumulsMX PHP Webtags

Post by water01 »

Latest update in Build 3077 <#LastRainTip> added.
David
Image
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: CumulsMX PHP Webtags

Post by water01 »

Updated for Build 3080 with Ecowitt web tags
David
Image
User avatar
dazza1223
Posts: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

Re: CumulsMX PHP Webtags

Post 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>  
Have fun and keep learning

dazza :D

https://www.davisworthing.co.uk

Image
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: CumulsMX PHP Webtags

Post 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.
David
Image
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: CumulsMX PHP Webtags

Post by water01 »

Updated for Build 3087.
David
Image
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: CumulsMX PHP Webtags

Post by water01 »

Updated for Build 3089 on 1st August, sorry for delay.
David
Image
User avatar
ConligWX
Posts: 1570
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

Re: CumulsMX PHP Webtags

Post by ConligWX »

David.

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

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir •

Image
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: CumulsMX PHP Webtags

Post 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).
David
Image
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: CumulsMX PHP Webtags

Post by water01 »

Updated for all builds up to Build 3092 on 23rd August, sorry for delay.
David
Image
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: CumulsMX PHP Webtags

Post by water01 »

Updated for all builds up to Build 3094 on 14th September, sorry for delay.
David
Image
Post Reply