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 4017) - 17 March 2024

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

Saratoga, CumulusMX and new trend graphs

Discussion of Ken True's web site templates

Moderator: saratogaWX

PeterP

Re: Saratoga, CumulusMX and new trend graphs

Post by PeterP »

Thank you sir!
Dolmen
Posts: 13
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 »

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 https://cumulus.hosiene.co.uk/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: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Saratoga, CumulusMX and new trend graphs

Post by BCJKiwi »

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: 13
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 »

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