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 4019) - 03 April 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

Tweaks to world template for Cumulus

Discussion of Ken True's web site templates

Moderator: saratogaWX

Post Reply
BCJKiwi
Posts: 1256
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Tweaks to world template for Cumulus

Post by BCJKiwi »

For those of you using the Saratoga Website templates, you may be interested in some of the changes I have made to the standard World Templates ajax-dashboard.php and wxastronomy.php.
The key areas relate to making use of the Cumulus specific data in place of derived data from NOAA and other external sources.

I was dissatisfied by the standard template use of derived data for sun and moon times which did not match my station and, moon by 1/4 graphics.
Have changed these templates to use the Cumulus data where practical.
Also of note is that the templates use the $moonphase variable to hold the % value, not the text.
Accordingly have added another variable to CU-defs.php to provide the text data for the templates. This variable is $moonphasetxt = $WX['moonphase']; and is used in the modified ajax-ashboard.php as I found without it, 'New Moon' was always shown. It also allows display of the moonphase text on the Astronomy page.

Rather that trying to describe the changes to dashboard and astronomy files, suggest - should you be interested, that you firstly look at silveracorn.co.nz/weather to see if you would like to make these changes.
If so, then copy the attached files and load them up in diffmerge's sgdm.exe available here http://www.sourcegear.com/diffmerge/ You can use this program to compare the one used on silveracorn with the original. Note that I have stripped out all the alternative sources code to make it a bit simpler to find my way around the templates - that code can be left in if you wish.

You might also be interested in the changed presentation of the 14 icons in the WU forecast page - if so I could upload that file as well. The day and night rows swap over at around 4 o'clock.

Enjoy
You do not have the required permissions to view the files attached to this post.
captzero
Posts: 363
Joined: Wed 03 Mar 2010 10:20 am
Weather Station: Vantage Pro2 w/ daytime FARS
Operating System: Windows 10
Location: Brisbane, Australia
Contact:

Re: Tweaks to world template for Cumulus

Post by captzero »

I'm getting this error at http://silveracorn.co.nz/weather/

Parse error: syntax error, unexpected $end in /home/silverac/public_html/weather/ajax-dashboard.php on line 1161
Dan

http://www.brisbaneliveweather.com




A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
BCJKiwi
Posts: 1256
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Tweaks to world template for Cumulus

Post by BCJKiwi »

Sorry, doing further edits (with errors!) - all good now.
captzero wrote:I'm getting this error at http://silveracorn.co.nz/weather/
Parse error: syntax error, unexpected $end in /home/silverac/public_html/weather/ajax-dashboard.php on line 1161
Dolmen
Posts: 13
Joined: Thu 23 Jan 2014 7:21 am
Weather Station: Davis VP2
Operating System: Windows 7
Location: Genoa - Italy

Re: Tweaks to world template for Cumulus

Post by Dolmen »

Hallo BCJKiwi,
I like very much your present homepage. :clap:

I downloaded the ajax-dashboard.php you linked, but seems like the file it's not the one you're using right now.

Can you please help me?

Thank you,
Ale.
BCJKiwi
Posts: 1256
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Tweaks to world template for Cumulus

Post by BCJKiwi »

Well no its not the same - times change and so does the source Saratoga and BCJKiwi's rendition of it - almost 16 months of tinkering makes for a number of 'upgrades'!
Is there something in particular that you would want to adopt?
Would you please provide a link to what you have now - Thanks.
Dolmen
Posts: 13
Joined: Thu 23 Jan 2014 7:21 am
Weather Station: Davis VP2
Operating System: Windows 7
Location: Genoa - Italy

Re: Tweaks to world template for Cumulus

Post by Dolmen »

BCJKiwi wrote:Well no its not the same - times change and so does the source Saratoga and BCJKiwi's rendition of it - almost 16 months of tinkering makes for a number of 'upgrades'!
Is there something in particular that you would want to adopt?
Would you please provide a link to what you have now - Thanks.
thanks for your quick answer :-)

I've just started to install my new website: I've downloaded the saratoga templates, made the very first setting and then started to add/remove some features.... so I can say for the moment the website is totally under costruction

here is the link: http://genovameteo.altervista.org/web/index.php

From your personalized dashboard, I'd like to adopt:
- the wider main table
- the 5 columns format
- the cumulus trends previews in the first column
- some more data here and there (especially in the rain section)

I'd like also to change the standard red thermometer, add the cloud-base script, etc, but I think I can find all that stuff on the saratoga weather website (or in the sites listed there)

As today I have a free day off work, I'll try to make by myself some change to the dashboard format, compatibly with my poor php knowledges :roll:

EDIT: my rain section and page/table width are now ok, to me
BCJKiwi
Posts: 1256
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Tweaks to world template for Cumulus

Post by BCJKiwi »

From your personalized dashboard, I'd like to adopt:
- the wider main table
- the 5 columns format
- the cumulus trends previews in the first column
- some more data here and there (especially in the rain section)
I'd like also to change the standard red thermometer, add the cloud-base script,
1.The wider main table starts with a change to the ...-narrow.css file. The width is set in the 3rd block from the top;

Code: Select all

      #page {
        margin: 20px auto;
        color: black;
        background-color: white;
        padding: 0;
        width: 800px;
        border: 1px solid #959596;
      }
Change width: 800px; to width: whateveryouwantpx;

2. The 5 column layout was set up to accommodate the trends in the first column. That change was not trivial and took a lot of work - not easy to describe! There are many changes in different places to get everything looking OK. The charts are managed by a package called highslide which I had help with from another Cumulus user after seeing a similar setup across the bottom of his dashboard.

3. The thermometer script is from Bashewa. The Cloudbase script is my conversion from Bashewa's WD code and is available on this forum - new version with minor revisions (no timezone, separate metar file) due real soon! Bashewa's Thermometer script is quite old and there some obsolete syntax errors in it (and I may have tweaked it a bit).

Hope this helps. If you want more specific info, please PM me.
Post Reply