Page 1 of 1
Use <webtag> in css file
Posted: Fri 13 Feb 2015 4:43 pm
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
Re: Use <webtag> in css file
Posted: Fri 13 Feb 2015 5:51 pm
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?
Re: Use <webtag> in css file
Posted: Fri 13 Feb 2015 6:03 pm
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!
Re: Use <webtag> in css file
Posted: Fri 13 Feb 2015 6:17 pm
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
Re: Use <webtag> in css file
Posted: Fri 13 Feb 2015 6:26 pm
by duke
Do you not have PHP on your server / site?
Re: Use <webtag> in css file
Posted: Fri 13 Feb 2015 7:43 pm
by K8POS
I do have PHP.
Just very limited knowledge of it's use, but I am learning.
Re: Use <webtag> in css file
Posted: Fri 13 Feb 2015 10:40 pm
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.
Re: Use <webtag> in css file
Posted: Fri 13 Feb 2015 11:59 pm
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?
Re: Use <webtag> in css file
Posted: Sat 14 Feb 2015 1:11 am
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