Welcome to the Cumulus Support forum.

Latest Cumulus MX release v3.0.0 build 3050 - 1 May 2019.
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014

See the Wiki for downloading either version.

Saratoga, CumulusMX and new trend graphs

Discussion of Ken True's web site templates

Moderator: saratogaWX

User avatar
PeterP
Posts: 79
Joined: Tue 21 Apr 2009 4:03 am
Weather Station: Davis VP2
Operating System: Vista
Location: Coromandel, New Zealand
Contact:

Re: Saratoga, CumulusMX and new trend graphs

Post by PeterP » Thu 27 Oct 2016 4:31 am

Thank you sir!

Dolmen
Posts: 5
Joined: Thu 23 Jan 2014 7:21 am
Weather Station: Davis VP2
Operating System: Windows 7
Location: Genoa - Italy

Re: Saratoga, CumulusMX and new trend graphs

Post by Dolmen » Thu 21 Mar 2019 4:22 pm

BCJKiwi wrote:
Thu 08 Oct 2015 7:21 pm
Like this?
http://silveracorn.nz/weather/wxcharts.php (was wxgraphs.php)
This has been working since February http://sandaysoft.com/forum/viewtopic.php?f=28&t=13382

You will need to make changes to the attached file to suit your website layout - particularly the path settings for the lib and js folders.
Also the .json files need to be uploaded to the correct path by CumulusMX. In my layout they are in the wxshare folder which holds the lib and js folders
Hallo!
I've been using cumulus1 + saratoga templates for years. Now i'm swapping to cumulusMX and I've found this useful post and attached zipfile from you.
I tweaked the .php to fit the paths of lib and js folders within my webserver and seems ok, BUT I can't find a way to write where my .json files are (in fact I manually copied them).
At present CumulusMX uploads the files in myhost/cumulus/ (where the standard cumulus website runs) while the saratoga template website stands in myhost/web/
Do you think the only way to make it work is to upload de .json files in the same directory where the wxgraphs.php is?
Thank you,
Ale.

http://genovameteo.altervista.org/cumulus/trends.htm
http://genovameteo.altervista.org/web/wxgraphs2.php

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

Re: Saratoga, CumulusMX and new trend graphs

Post by BCJKiwi » Fri 22 Mar 2019 8:22 pm

Hmm,
If you wish to to use the myhost/cumulus/xxx.json files from the myhost/web/ folder, then the way to reference them is to add ../cumulus in front to the file name.

e.g.
myhost/cumulus/js/cumuluscharts.js
myhost/web/wxgraphs2.php (or wxcharts.php - or whatever the file name is) should contain the correct path to cumuluscharts.js in wxcharts2.php

So, for saratoga in the myhosts/web folder, where you may have the reference to js/cumuluscharts.js you should instead reference ../cumulus/js/cumuluscharts.js

The ../ moves the path up one level in the website folder structure

Trust this helps.

Dolmen
Posts: 5
Joined: Thu 23 Jan 2014 7:21 am
Weather Station: Davis VP2
Operating System: Windows 7
Location: Genoa - Italy

Re: Saratoga, CumulusMX and new trend graphs

Post by Dolmen » Sat 23 Mar 2019 11:08 am

BCJKiwi wrote:
Fri 22 Mar 2019 8:22 pm
Hmm,
If you wish to to use the myhost/cumulus/xxx.json files from the myhost/web/ folder, then the way to reference them is to add ../cumulus in front to the file name.

e.g.
myhost/cumulus/js/cumuluscharts.js
myhost/web/wxgraphs2.php (or wxcharts.php - or whatever the file name is) should contain the correct path to cumuluscharts.js in wxcharts2.php

So, for saratoga in the myhosts/web folder, where you may have the reference to js/cumuluscharts.js you should instead reference ../cumulus/js/cumuluscharts.js

The ../ moves the path up one level in the website folder structure

Trust this helps.
First of all, I thank you for your fast answer :-)

Let me recap quickly:
- my saratoga-style website runs in genovameteo.altervista.org/web/
- my standard cumulus website runs in genovameteo.altervista.org/cumulus/
- CumulusMX uploads all weather data files in genovameteo.altervista.org/cumulus/
- therefore, every file which stands in /web folder and needs to read such weather data files must have their paths set to ../cumulus/


When I wrote my post, I had already set the paths for the lib and js folders, from this

Code: Select all

   <script src=<?php echo $sharedir."lib/jquery/jquery-latest.min.js";?>></script>
   <script src=<?php echo $sharedir."lib/highstock/js/highstock.js";?>></script>
   <script src=<?php echo $sharedir."lib/highstock/js/themes/grid.js";?>></script>
   <script src=<?php echo $sharedir."js/cumuluscharts.js";?>></script>   
   
to this

Code: Select all

   <script src=<?php echo $sharedir."../cumulus/lib/jquery/jquery-latest.min.js";?>></script>
   <script src=<?php echo $sharedir."../cumulus/lib/highstock/js/highstock.js";?>></script>
   <script src=<?php echo $sharedir."../cumulus/lib/highstock/js/themes/grid.js";?>></script>
   <script src=<?php echo $sharedir."../cumulus/js/cumuluscharts.js";?>></script>    
   

In fact the page structure was correctly loaded and showed in the browser, but with blank graphs (CumulusMX uploads the .json files in /cumulus/).

Now I've managed to make wxgraps.php read and show the data, tweaking the file cumuluscharts.js too, where I set the paths for all the .json files, from this (line #3)

Code: Select all

$(document).ready(function () {    
    $.ajax({url: "graphconfig.json", dataType:"json", success: function (result) {
            config=result;
			doTemp();
to this

Code: Select all

$(document).ready(function () {    
    $.ajax({url: "../cumulus/graphconfig.json", dataType:"json", success: function (result) {
            config=result;
			doTemp();
and from this (line #173)

Code: Select all

 $.ajax({
        url: 'tempdata.json',
        cache: false,
        dataType: 'json',
        
to this

Code: Select all

 $.ajax({
        url: '/cumulus/tempdata.json',
        cache: false,
        dataType: 'json',
        
...etc.... for all the other nine occurences of *.json data files in cumuluscharts.js

...and now I'm happy with this :-D

I send you many thanks again, from the opposite side of the world!

Ale

Post Reply