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

Use <webtag> in css file

Discussion and questions about Cumulus weather station software version 1. This section is the main place to get help with Cumulus 1 software developed by Steve Loft that ceased development in November 2014.
Post Reply
User avatar
K8POS
Posts: 94
Joined: Sat 03 Jan 2015 4:17 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 7
Location: Thumb of Michigan
Contact:

Use <webtag> in css file

Post by K8POS »

Will cumulus process a webtag in a css file and upload it?
I want to add/change a picture depending on the number of the month using <#month>.
But the code is currently inside a css file. Will cumulus process this?

Bob
water01
Posts: 3670
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10/11 64bit Synology NAS
Location: Burnham-on-Sea
Contact:

Re: Use <webtag> in css file

Post by water01 »

It will process any file with webtags in it with any name as long as you tell it how to find it and where to put it in the definition.

However, do remember that it will process that file at your upload interval, so to process a monthly file and upload it every 30 minutes (the default time) is awful waste of server bandwidth during the course of a month for a file that needs to be uploaded once a month. Wouldn't it be better to use Cumulus Toolbox or an FTP tool to do as required and manually do the edit?
David
Image
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: Use <webtag> in css file

Post by sfws »

Cumulus can process any file, see http://wiki.sandaysoft.com/a/Customised ... mplates.27, so it could process your CSS for you.

But another approach is that used by Jacques' Sunny Weather templates. The web tag appears in the HTML template and his installation zip includes one CSS file for each possible value of the web tag he uses. Depending on the value output by that web tag, when the page is loading, it chooses the right CSS. Mind you his web tag has only two values 0 or 1. You would need 12 CSS files, each loading a different picture if you worked that way. But the advantage, as Water01 hints, is that these 12 CSS files are static on your web server, you never need to upload fresh ones, and certainly not every 10 (or whatever) minutes for the whole of a month!
Last edited by sfws on Mon 03 Aug 2015 3:23 pm, edited 1 time in total.
User avatar
K8POS
Posts: 94
Joined: Sat 03 Jan 2015 4:17 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 7
Location: Thumb of Michigan
Contact:

Re: Use <webtag> in css file

Post by K8POS »

It is actually from the sunny weather templates I got the idea.
I would already have to make 24 images (12 for each month X day or night)
No it would not be that hard to change the css file as Jacques' has done with 2, only I would need 24, but yes it is a one time change.
But I also see that I would have to change about 13 htm files to but the <#month> tag into.
Just a thought, will have to think about it some more. Would make my pages less static from month to month.
Getting the SS gauges into Jacques' template is kicking my butt enough as it is.


Bob
duke

Re: Use <webtag> in css file

Post by duke »

Do you not have PHP on your server / site?
User avatar
K8POS
Posts: 94
Joined: Sat 03 Jan 2015 4:17 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 7
Location: Thumb of Michigan
Contact:

Re: Use <webtag> in css file

Post by K8POS »

I do have PHP.
Just very limited knowledge of it's use, but I am learning.
water01
Posts: 3670
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10/11 64bit Synology NAS
Location: Burnham-on-Sea
Contact:

Re: Use <webtag> in css file

Post by water01 »

Then a PHP program that decides which image to load based on a Cumulus Web tag that tells you the month would happen Server side and all you would need is the 24 images for it to load.
David
Image
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: Use <webtag> in css file

Post by sfws »

Do you need to retain separate pictures for night and day when you move to picture by month? (try 12 pictures not 24 at first)
Do you need all your HTML pages to see all the monthly pictures? For example on my set-up something like the equivalent of now would see different pictures at different times of day, but the equivalents of all-time and of this year only see one picture (that represents all seasons in the year). (try less than 13 HTML files to edit at first)

Some editors offer batch replace editing of multiple files. So for me editing xxxx into yyyy in 12 HTML files is as easy as editing one. e.g. http://www.chami.com/html-kit/plugins/i ... chreplace/

Again I'm not following Jacques's work after he moved on from Sunny Weather and the original HTML version of Weather Blues, but I believe he moved away from HTML into php, could you not adopt some parts of his PHP designs until you can write PHP for yourself?
User avatar
K8POS
Posts: 94
Joined: Sat 03 Jan 2015 4:17 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 7
Location: Thumb of Michigan
Contact:

Re: Use <webtag> in css file

Post by K8POS »

Actually, I have been looking at Jacques' PHP driven templates. I am thinking about making the switch mainly due to the ability to make one change that can affect the entire web site. HTML is great but has many limitations. I want my site to be more lively and ever changing in looks and not just the weather data presented. Making a test site on my server as we speak to play with it.

Bob
Post Reply