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

Now available: AJAX/PHP multilingual website templates

Discussion of Ken True's web site templates

Moderator: saratogaWX

User avatar
PaulMy
Posts: 4355
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by PaulMy »

Hi Ken,
I did the rehome but looks like this will not work as I have my modified index.html in the root directory that starts my http://www.komokaweather.com page so http://www.komokaweather.ca also gets http://www.komokaweather.com. I will need to go the install in komokaweather-ca folder.
The NOAA reports are now working just fine, as is all the other data (after about 2 hours trying to get the Station Graphs to update but then found I kept getting a cached version :bash: - trying another browser was the solution :oops: ).

Now to work on ss-gauges. I have these working in my http://www.komokaweather.com site. I have edited wxssgauges.php
$ssgDir = './weather/'; // set to relative directory location of the SteelSeries gauge directory
as the existing ss-gauges are in /weather/gauges-ss.htm, and this is then similar to the NOAA reports, images, realtime.txt and CUtags.php which are all set as './weather/xxxxxx/';. Any more guidance available?

Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
Image
BCJKiwi
Posts: 1259
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by BCJKiwi »

Just wondering what you plan to do long term. If I understood correctly, you plan to stop using the Cumulus web pages once the Saratoga scripts are working.
If this is still the plan then you would be best deciding on where that final setup will be located. As Ken indicated, there are no file name clashes except index.php / index.htm so if you plan to stop using the Cumulus webpages, leave the wxindex.php in place for testing.
If the directory structure is going to be different, then copy everything you need for the Saratoga setup into the new directory structure. If it means duplicating a lot of files it does not matter in the long term as the Cumulus pages will be deleted once you have completed the changeover. That way you can make everything work as intended with the default template system directory structure as intended all stemming from the main directory where the wxindex.php file is located. Once this is in place if it is a different directory structure you can rename wxindex.php to index.php
i.e. don't try to 'share' files between the two different systems.
For testing, just add the full path plus index.php to the URL.
You should be able to get Cumulus to send the files needed to the Saratoga directorty structure by adding them into the Cumulus config with the extra path info in the configuration/internet/files table.

Once you have the Saratoga stuff testing OK, then you can change the directories in Cumulus to make that the default destination.

Trust I have helped rather than hindered ;)

Just had a look,
You seem currently to have both the Cumulus pages and the Saratoga scripts working in .com and .ca as indicated.
I don't understand what komokaweather-ca refers to.

Could you just confirm the full URL to where each set of files is located, and what the 'rehome' is set to do.
Our hoster has a feature which they call URL Redirection (with or without 'Cloaking') This allows us to apply to a registered domain name, a forwarding address which is a URL on a different registered domain. The cloaking means that when you get to the destination, you still see the domain name from which you forwarded.
In our case we only pay for hosting service on one registered domain name but can run multiple websites with different registered domain names each in separate directory structures on the domain name with the hosting service. This is all hidden from the browsers.

GoDaddy seem to call this Forwarding (with masking). Is this 'rehoming'?
Thanks
User avatar
PaulMy
Posts: 4355
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by PaulMy »

Trust I have helped rather than hindered
Just had a look,
You seem currently to have both the Cumulus pages and the Saratoga scripts working in .com and .ca as indicated
Hi and thanks for the comments.
I still want to continue with my modified Cumulus templates as http://www.komokaweather.com as I indicated to Ken
Sorry for the many questions, but it has been satisfying and good learning to get back to these templates and I will keep them more up to date (and still keep my very modified http://www.komokaweather.com with which I am most comfortable for changes and additions).
and the wx-templates as http://www.komokaweather.ca. I have had both the Cumulus and wx-templates sites for over 2 years but the wx-templates (wxindex.php) site just as a link on the Cumulus home page. Now that I got http://www.komokaweather.ca figured out how to use it I will make this the wx-template site and change the wxindex.php to be the index file for http://www.komokaweather.ca. I think I understand what I need to do and will copy all the wx-template files to the new folder komokaweather-ca (or maybe a simpler name after I give it more thought) and then will basically have 2 separate weather sites on my GoDaddy hosting account, along with some others websites i.e. http://www.komokaseniorsapartments.com
I don't understand what komokaweather-ca refers to.
This is a folder that I created in my GoDaddy webhosting where all http://www.komokaweather.ca files would be saved as a total separate site (http://www.komokaweather.com is my main domain with GoDaddy and each of the other domains are in a separate folder)
Could you just confirm the full URL to where each set of files is located, and what the 'rehome' is set to do.
At the moment the wx-template files are in the root of http://www.komokaweather.com, and the Cumulus files in http://www.komokaweather.com/weather. Since I have index.html in the http://www.komokaweather.com root to start the Cumulus site I have not been able to change the wxindex.php there to index.php and therefore used the link on the Cumulus site to get to the wx-templates site. As I understood rehome, and have tried it, by not using a separate folder such as komokaweather-ca at my hosting for http://www.komokaweather.ca this http://www.komokaweather.ca will default (go home) to the main hosted site, being http://www.komokaweather.com and because the index.html is there it defaults to the Cumulus site.

Sorry for the lengthy reply as it has been somewhat confusing to me but think I've got my head around it now, and really quite simple once it is understood :lol:

Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
Image
BCJKiwi
Posts: 1259
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by BCJKiwi »

OK so the files are in separate directory structures.

The next thing to decide is what you want users to use as the URL for each site.
Then you can work out how best to place the files and redirect the URLs to those directory structures.
User avatar
PaulMy
Posts: 4355
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by PaulMy »

Hi Ken,
Got my www.komokaweather.ca site up and running. I took the route of a complete new download and install in my new komokaweather-ca folder and should say it went much easier than I anticipated. Once I get some problems sorted I'll make some personal changes to About, Flyout menu, and linksMost and then you can put me on the map. Most is working correctly but 4 items I have not been able to fix. My previous wxindex.php is still working and have used this to compare the running files to the new download but haven't found anything else. Looking for advice on where else to look and edit.

1. Radar is not showing on the Home Page - I can't see anything in the wxindex.php (now renamed to index.php)
2. Radar Local radar is not showing - I have edited to WSO for local EC Exeter and looked again in Settings-weather.php, in wxradar.php and ec-radar.php but can't see anything there
3. Almanac Station Graphs are not displaying - I have edited Settings-weather.php tfor $SITE[: 'graphImageDir] = '../weather/images/'; which is the same ../weather path as for the CUtags.php and the noaa /reports which is working. I have looked in wxgraphs.php but can't see anything
4. Almanac Weather Trends wind direction plot is not showing

Thanks for your help,
Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
Image
BCJKiwi
Posts: 1259
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by BCJKiwi »

You may want to check the path for the radar here;

Code: Select all

<img src="/radar/radar-NAT-0.png" 
as the leading / is pointing to the site root rather than a folder relative to the main scripts location.
If radar is a directory below the main scripts, try changing

Code: Select all

<img src="/radar/radar-NAT-0.png" 
to

Code: Select all

<img src="./radar/radar-NAT-0.png" 
User avatar
PaulMy
Posts: 4355
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by PaulMy »

Thanks for the suggestion. I have read many of the template set files but have not seen anything like that to change. I have however now read this
This ./radar/ directory is used by the ec-radar.php script to cache current radar images and
the html page from Environment Canada website.
Please ensure that this directory is given 766 or 777 permissions to allow the ec-radar.php
script to write the cache files here.

This directory is only used by the ec-radar.php script.
in the Radar folder. Could this be the cause and how/where can I change the permissions?

Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
Image
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by saratogaWX »

PaulMy wrote:Hi Ken,
Got my http://www.komokaweather.ca site up and running. I took the route of a complete new download and install in my new komokaweather-ca folder and should say it went much easier than I anticipated. Once I get some problems sorted I'll make some personal changes to About, Flyout menu, and linksMost and then you can put me on the map. Most is working correctly but 4 items I have not been able to fix. My previous wxindex.php is still working and have used this to compare the running files to the new download but haven't found anything else. Looking for advice on where else to look and edit.

1. Radar is not showing on the Home Page - I can't see anything in the wxindex.php (now renamed to index.php)
2. Radar Local radar is not showing - I have edited to WSO for local EC Exeter and looked again in Settings-weather.php, in wxradar.php and ec-radar.php but can't see anything there
3. Almanac Station Graphs are not displaying - I have edited Settings-weather.php tfor $SITE[: 'graphImageDir] = '../weather/images/'; which is the same ../weather path as for the CUtags.php and the noaa /reports which is working. I have looked in wxgraphs.php but can't see anything
4. Almanac Weather Trends wind direction plot is not showing

Thanks for your help,
Paul
As configured in ec-radar.php, you have

Code: Select all

$radarDir = './radar/';           // directory for storing radar-XXX-0.png to radar-XXX-6.png images
//                                  note: relative to document root.
so there should be a ./radar/ directory under the document root of the website (and there doesn't seem to be one there - I get 404-not found )
Doing a view-source on the ec-radar.php page output, I see:
<!-- changed '/var/chroot/home/content/p/a/u/paulmy/html/radar/ec-radar-en-WSO.txt'
to: '/home/content/p/a/u/paulmy/html/radar/ec-radar-en-WSO.txt' -->
which shows the script is using the radar/ directory on site. So there's something odd with the filesystem:URL mapping going on.
Is this actually a sub-site of your main site?

For 3. above, I don't think you can use a directory that is above the document root so I think this is related to trying to share two sites with one data feed (to the other site).
For 4. this is likely the same problem with site file structure as the other issues.

For http://www.komokaweather.ca/ the document root seems to be /var/chroot/home/content/p/a/u/paulmy/html
For http://www.komokaweather.com/ the document root seems to be /var/chroot/home/content/p/a/u/paulmy/html

So they look the same and should be configured the same.
Settings-weather.php $SITE['graphImageDir']='./weather/images/';
Settings-weather.php $SITE['NOAAdir']='./weather/reports/';
BCJKiwi
Posts: 1259
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by BCJKiwi »

X-Post with Kens!

An F12 (in IE) still shows the <img src="/radar/radar-NAT-0.png" path.

The info you quoted shows the ./radar/ as I suspected, so the first thing to do is to change the /radar/ to ./radar/ as per my previous post.
You probably won't need to change the permissions as the permissions they show are pretty standard.
In your FTP client you should be able to see what the permissions are for files/directories (may have to expand the window sideways to see the columns with that info). As to how to change them if you need to - that will depend on what (if any) access you have to those attributes on the hoster.

It may be, as Ken indicates, the directory may not be there or not being populated, but once it is, the <img src= is still pointing to the wrong place.

One step at a time!
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by saratogaWX »

I think there's some missing mapping of the filesystem to the URLs for the respective sites. If the .ca site is homed to the same directory in the filesystem as the .com site, then the sites should work identically. If this mapping is done via virtual directory mapping, then the filesystem:URL paths may not be congruent (as they need to be for normal operation).

I have multiple domain names mapping to my same document root on my site, and all work fine (and have the same filepath:URL mapping).

I guess we need to chat about how (exactly) the .ca domain was homed v.s. how the .com domain was homed...
User avatar
PaulMy
Posts: 4355
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by PaulMy »

Hi Ken and BCJ,
Sorry for coming back late but had to go out and cheer the local hockey team on to victory and win their current playoff series.

I attempted to do this as much by myself as possible and made a couple of mistakes. I hadn't uploaded the radar folder as all I had seen in it was a "readme" but have now uploaded :oops: . Now the Local Radar does its time countdown but no images, nor any image in Home. If I could find where
<img src="/radar/radar-NAT-0.png" path.
might be located I could check it and edit.
I guess we need to chat about how (exactly) the .ca domain was homed v.s. how the .com domain was homed...
All my domains are under 1 hosting plan and in my GoDaddy account -
komokaweather.com shows "Status" as 'Setup Primary' and folder '/'
komokaweather.ca shows "Status" as 'Setup' and folder 'komokaweather-ca'

The original wx-templates that are working as http://www.komokaweather.com/wxindex.php are all in the http://www.komokaweather.com root
and Cumulus files are in http://www.komokaweather.com/weather

The new wx-templates that are partially working are in http://www.komokaweather.com/komokaweather-ca folder when I log in with Filezilla

In order to have the new site mainly working I had to change the various settings as '../weather/CUtags.php'; and '../weather/realtime.txt'; and '../weather/images/'; and '../weather/reports/'; as well as '../weather/ in some others. Therefore in the recent upload of the radar folder to /komokaweather-ca/radar I have edited
$radarDir = '../radar/'; // directory for storing radar-XXX-0.png to radar-XXX-6.png images
= './radar/'; to '../radar/';

I have tried the ec-radar.php line 37 $radarDir = './radar/'; to '../radar/'; but without success.

I have further tried in ec-radar.php as 'radar/'; '.radar/'; and '/radar/';
and in /komokaweather-ca/radar/ folder as '.radar/'; '..radar/'; '/radar/'; ./radar/'; and '../radar/';

If I could find where
<img src="/radar/radar-NAT-0.png" path.
might be located I could check it and try to edit.

Thanks for all your help,
Paul

EDIT:
which shows the script is using the radar/ directory on site. So there's something odd with the filesystem:URL mapping going on.
Is this actually a sub-site of your main site?
Each are their own domain I purchased, as well as 3 others, and they show in my GoDaddy hosting as
Domain Name ---------------- Folder ------------------- Subdomains ------- Status
komokaweather.com ------ / -------------------------- Manage ----------- Setup Primary
komokaweather.ca -------- /komokaweather-ca -------- Add ----------- Setup
Last edited by PaulMy on Sun 10 Mar 2013 4:15 am, edited 1 time in total.
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
Image
BCJKiwi
Posts: 1259
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by BCJKiwi »

Paul, I'll leave this to the master. Ken is far more knowledgeable than I will ever be. Also I don't wish to add the confusion of differing advice into the mix! ;)
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by saratogaWX »

Ok, I think I see what the problem is, and it is a filesystem:URL mismatch problem.

With your sites homed as:

komokaweather.com maps to filesystem path /var/chroot/home/content/p/a/u/paulmy/html and
komokaweather.ca should map to filesystem path /var/chroot/home/content/p/a/u/paulmy/html/komokaweather-ca (but doesn't)

The komokaweather.ca site reports it's document root as filesystem path /var/chroot/home/content/p/a/u/paulmy/html (which is for the other site) instead of the expected /var/chroot/home/content/p/a/u/paulmy/html/komokaweather-ca

So when you use ../weather/ in the relative file addressing, it thinks that should be one directory up from html/ and in the paulmy/ directory itself, and therefore is not found.

I think this issue with the document root for komokaweather.ca will need help from GoDaddy tech support to get fixed .. until it is, the komokaweather.ca site will likely not function correctly.

After it is fixed, then the ec-radar script will use /var/chroot/home/content/p/a/u/paulmy/html/komokaweather-ca/radar/ as the cache and should work fine. Getting your weather data there is a different issue, however. While the filesystem can look back with a ../ and see the html/ directory, the komokaweather.ca site will not have a ../ URL available as it's document root starts in the komokaweather-ca/ directory in the filesystem, and that matches what http://komokaweather.ca/ sees and offers to the public for viewing.. it can't back up into the komokaweather.com site's document root.

So.. sorry for the long-winded discussion.. the short answer is your komokaweather.ca site has the wrong document root reported in $_SERVER['DOCUMENT_ROOT'] -- it should have /var/chroot/home/content/p/a/u/paulmy/html/komokaweather-ca there, and it doesn't.
Have GoDaddy tech support fix that.

Best regards,
Ken
User avatar
PaulMy
Posts: 4355
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by PaulMy »

That's fine, thanks for your efforts,

Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
Image
User avatar
actioman
Posts: 118
Joined: Sat 20 Mar 2010 1:01 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Elvas, Portugal
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by actioman »

Hello Ken! :)

I know you now have a lot to do and little free time. But when you have time do you think you can use the translation system, which you created as well, in the Davis weather forecast?


I've noticed that it is the Davis who send it in English, but a page in another language is really weird continue with a few lines in English. And I wish I could keep the weather forecast, because I think it's correct.
I think it was an implementation that would be welcomed by foreign owners of Davis using your Saratoga Templates. Because one of the major gains of these templates is the possibility of automatic translation to multiple languages​​.

Thanks again for your time.
Kind Regards, Manuel.

Image
Post Reply