Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

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

Legacy Cumulus 1 release 1.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

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Web tag parameters

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

Moderator: daj

User avatar
nking
Posts: 813
Joined: Thu 17 Dec 2009 2:03 pm
Weather Station: W-8681
Operating System: Windows 10
Location: Hurstpierpoint, West Sussex, UK
Contact:

Re: Web tag parameters

Post by nking »

mcrossley wrote:It assumes you have a page that is being updated via a client side script from the realtime.txt file.

Hmm, that's probably as clear as mud!
Thanks for the reply Mark.

I'm not processing the realtime.txt file so I think I have a way to go before I can expect to clear the mud :lol:

I think I will probably wait for Steve to add this as a feature (he is short of time and I'm short of brain cells) within Cumulus :)
Synewave
Posts: 642
Joined: Mon 25 Jan 2010 1:55 pm
Weather Station: Watson W-8681
Operating System: Raspian
Location: Brighton, UK
Contact:

Re: Web tag parameters

Post by Synewave »

Mark, Neil,

I think the bit that is missing to make the 'mud' clearer is that the code that Mark has quoted needs to be within <script> and </script> in the HTML, or call an external script.

Mark, I think you need to elaborate on the method to achieve this.
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Web tag parameters

Post by gemini06720 »

Synewave wrote:Mark, I think you need to elaborate on the method to achieve this.
Indeed Paul, the code proposed by Mark should be included (or added) into an external JS script such as the one you released (ie: 'realtimereader.js') a while back so additional lines of code do not have to be added to the HTM file(s)... ;)
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Web tag parameters

Post by mcrossley »

Indeed, they are just code snippets intended to provide a suggestion to people who are already doing this sort of thing. For instance the <span> 'populator' code would go into a function on its own.

As I said, having the data in an object with properties with the same names as the web tag names, and spans with the same ids again means you can automate the actual updates, and not have to worry about changing the code when adding tags to the HTML.

And the bit about me 'not' parsing the realtime.txt? I have a custom realtimeJS.txt that looks like this...

Code: Select all

...
cumulus.dew="<#dew>";
cumulus.wspeed="<#wspeed>";
cumulus.wlatest="<#wlatest>";
cumulus.wgust="<#wgust>";
cumulus.wchill="<#wchill>";
...
Again, an eval() of that file, updates all the current values on the client side.
User avatar
nking
Posts: 813
Joined: Thu 17 Dec 2009 2:03 pm
Weather Station: W-8681
Operating System: Windows 10
Location: Hurstpierpoint, West Sussex, UK
Contact:

Re: Web tag parameters

Post by nking »

mcrossley wrote:Indeed, they are just code snippets intended to provide a suggestion to people who are already doing this sort of thing.
I think that is the key point, I'm not there yet so will need to read more to understand how and what needs to be done. Something for my book reading list it seems.... Idiots Guide for Java Scripting?
Post Reply