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

saratogaWX wrote:Manuel,

As far as I know, nobody has adapted the Cloud-height graphic script to use Cumulus realtime.txt instead of clientraw.txt. It should be possible to do, however.
Then becomes the challenge for programmers who are interested in applying this feature to our cumulus.
These templates are in some way a visual improvement over the default web cumulus. As such we would expect not to loose functionality and data, like the cloud-height...

saratogaWX wrote:The Cumulus forecast is in $WX['forecast'] in the CUtags.php.
In your index.php page, change

Code: Select all

	<?php if(isset($SITE['ajaxDashboard']) and file_exists($SITE['ajaxDashboard']))
	 { include_once("ajax-dashboard.php");
	   } else {
to

Code: Select all

	<?php if(isset($SITE['ajaxDashboard']) and file_exists($SITE['ajaxDashboard']))
	 { $vpforecasttext = $WX['forecast'];
      include_once("ajax-dashboard.php");
	   } else {
and that will display the Cumulus forecast as the VP Forecast in the dashboard.

Best regards,
Ken
Hummm I have tried, but I did not like the end result:

Image

First because it refers to Davis and my station is a PCE and there is also confused in the middle of the forecast wu.

Anyway thanks for your explanation Ken! ;)
Last edited by actioman on Mon 28 Mar 2011 10:18 pm, edited 1 time in total.
Kind Regards, Manuel.

Image
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Now available: AJAX/PHP multilingual website templates

Post by gemini06720 »

saratogaWX wrote:...As far as I know, nobody has adapted the Cloud-height graphic script to use Cumulus realtime.txt instead of clientraw.txt. It should be possible to do, however.
I have adapted Rainer Finkeldeh's 'cloudbase' script to the Cumulus 'realtime' file format almost a year ago... I am just putting a finishing hand into the code (cleaning it - making it more 'portable') and will be able to release it later on today (Monday, late afternoon, PDT)... :)

If you have some time available, once the script has been released, you could check the code and suggest modification or improvments... ;)
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Now available: AJAX/PHP multilingual website templates

Post by gemini06720 »

actioman wrote:...Hummm I have tried, but did not I liked the end result...
... First because it refers to Davis and my station is a PCE and there is also confused in the middle of the forecast wu...
Well, Manuel, I guess some modification to the 'ajax-dashboard.php' script are required... :mrgreen:
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 »

gemini06720 wrote: I have adapted Rainer Finkeldeh's 'cloudbase' script to the Cumulus 'realtime' file format almost a year ago... I am just putting a finishing hand into the code (cleaning it - making it more 'portable') and will be able to release it later on today (Monday, late afternoon, PDT)... :)

If you have some time available, once the script has been released, you could check the code and suggest modification or improvments... ;)
Big Ray! :clap:

Tomorrow morning when I can, I come lurking here. :D

gemini06720 wrote:Well, Manuel, I guess some modification to the 'ajax-dashboard.php' script are required... :mrgreen:
Indeed, you need to know is do it! :mrgreen:
Kind Regards, Manuel.

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 »

gemini06720 wrote:
actioman wrote:...Hummm I have tried, but did not I liked the end result...
... First because it refers to Davis and my station is a PCE and there is also confused in the middle of the forecast wu...
Well, Manuel, I guess some modification to the 'ajax-dashboard.php' script are required... :mrgreen:
Easy change. Replace in ajax-dashboard.php

Code: Select all

		      print '		   	   <b>Davis VP+ ' . langtransstr('forecast') . ':</b> <span style="color: green; font-size:9pt">' . ucfirst($vpforecasttext) . "</span>"; 
with

Code: Select all

		      print '		   	   <b>Cumulus ' . langtransstr('forecast') . ':</b> <span style="font-size:9pt">' . ucfirst($vpforecasttext) . "</span>"; 
and it should work for you.

Best regards,
Ken
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Now available: AJAX/PHP multilingual website templates

Post by gemini06720 »

OK, here is what I hope a fully multilingual cloud base script - I have tried the script with the three template sets and the results appeared correct (well, at least for english and french languages) - I tried with other languages but they only displayed in english as the proper translations had not been entered into the 'language-LL.txt' language templates. I have not yet translated the Cumulus forecasts - would any of you have the 27 Cumulus forecast strings translated to french?

The multilingual cloud base script should produce an image with, not only Cumulus, but also Weather Display, VWS (Virtual Weather Station) and WUHU (Heavy Weather) - I have tested the code only with the Cumulus and the Weather Display data files - I have not tried the script with the other software.

This is the image the cloud base script should produce - not all options have been activated:
Image

Ensure that you keep the proper directory path for the graphic files.

If you encounter any problems, I would like to hear about them. If you have suggestions, I would like to hear about them (but, please, do not ask me to completely rewrite the script for you personal needs :roll: ). If you produce a translation to another languages, I would really appreciate if you send me a copy - eventually, I would like to include translations.
Last edited by gemini06720 on Wed 30 Mar 2011 10:01 am, edited 1 time in total.
kinder
Posts: 38
Joined: Mon 08 Nov 2010 5:50 pm
Weather Station: DAVIS VANTAGE PRO 2
Operating System: Windows 7
Location: Nowhere

Re: Now available: AJAX/PHP multilingual website templates

Post by kinder »

Ken sorry about that request but is this possible to give me a summary of what u have changed to ajax-dashboard and ajax-gizmo.php to fix the trend issue?I have done some changes to those scripts and i dont want to loose everything:P
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: Now available: AJAX/PHP multilingual website templates

Post by n9mfk »

HI ken i have a question about ajaxcu.js
i have been look at the pressure code i fond the math to convert mb to hpa but no inhg to hpa
thanks for any info Beau
JESUS HEREDERO
Posts: 12
Joined: Fri 19 Mar 2010 12:19 pm
Weather Station: PCE-FWS 20 = VH1080/81
Operating System: VISTA

Re: Now available: AJAX/PHP multilingual website templates

Post by JESUS HEREDERO »

Hi Ray

The format cloudbase.php test works well in all 1 .. 5
But two questions, if you do not need to use realtime.txt METAR conditions, Cumulus falsifies or not used.
Since I am not good at PHP script is required for introduction in the ajax-dashboard.php.

Thanks for your time to me

Jesus
JESUS
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 »

Ray wrote:
Ensure that you keep the proper directory path for the graphic files.
If you encounter any problems, I would like to hear about them.
I probably had the file structure wrong as I got "Path to realtime.txt file not found! and can't see any settings in cloudbase.php to change.

The realtime.txt is in root/weather/ folder and I have put cloudbase in
root/cloudbase/cloudbase.php and the others in
root/cloudbase/cloudbase/cb/ and
root/cloudbase/cloudbase/cb/moon/

Ray can you help me on this?

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 »

kinder wrote:Ken sorry about that request but is this possible to give me a summary of what u have changed to ajax-dashboard and ajax-gizmo.php to fix the trend issue?I have done some changes to those scripts and i dont want to loose everything:P
I generally don't keep around prior versions of the scripts (unless there's a really major change), but I downloaded your ajax-dashboard and compared it to the current version and used Ultra Compare to highlight the differences (attached below). This was ajax-dashboard, a similar correction was done to the ajax-gizmo.

I noticed a couple of things that may simplify your maintenance in the future:
1) you don't have to change the settings area inside ajax-dashboard.php if you run it in the template set .. all the settings are replaced by corresponding settings in Settings.php and Settings-weather.php.
2) your use of a different domain for the thermometer.php image may not allow the ajaxCUwx.js to 'refresh' the image as it makes it be a cross-site-scripting issue.

So the basic changes involve automatically changing to two decimal points of precision for the barometer trend arrow when the pressure is measured using inHg units. Otherwise the precision is 1 decimal point for this and all other values.

Hope this helps...
Best regards,
Ken
You do not have the required permissions to view the files attached to this post.
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Now available: AJAX/PHP multilingual website templates

Post by gemini06720 »

saratogaWX wrote:I generally don't keep around prior versions of the scripts (unless there's a really major change)...
Ken, should you need an older version of the scripts (the new 'AJAX-PHP Saratoga templates for VWS, Cumulus, WeatherLink, WD' template sets or even the older 'Weather Display (PHP-AJAX) Website' template set) they are all archived on one of my drives going back to February 2009... ;)
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Now available: AJAX/PHP multilingual website templates

Post by gemini06720 »

JESUS HEREDERO wrote:The format cloudbase.php test works well in all 1 .. 5
Jesus, I presume you are writing about the command line 'test=' with values from 1 to 5, such as:

Code: Select all

http//www.mysite.com/cloud-base.php?test=1&html=1
It uses different fixed weather data to produce different images for testing purposes... :)
JESUS HEREDERO wrote:But two questions, if you do not need to use realtime.txt METAR conditions, Cumulus falsifies or not used.
Jesus, the 'cloudbase' script is designed to use the Cumulus 'realtime.txt' data file (or the Weather Display 'clientraw.txt' data file) which is updated often (about every 5 seconds). The 'cloudbase' script also uses the 'CUtags.php' (webtag file) if it is available to get additional variables.

I have tried to make 'cloudbase.php' a 'self-standing' script, meaning that once you have made basic setting modifications to the script (such as weather software to use, the latitude/longitude/timezone, the station elevation, and the correct paths to the required files) the script only needs the data file (such as 'realtime.txt' for Cumulus) to produce the image.

If the 'Settings.php' and 'Settings-weather.php' templates are in the same directory as the script (by default), then, some of the basic setting will be read/taken from those files and replace the default setting of the 'cloudbase.php' script.

If the webtag template 'CUtags.php' (for Cumulus) is in the same directory as the script (by default), then, some additional variables will be read/taken from that file and can/could/will replace the value of some of the variables being processed by the 'cloudbase.php' script.

But, as I indicated above, neither the 'Settings.php/Settings-weather.php' templates nor the 'CUtags.php' template is needed for the operation of the 'cloudbase.php' script - it only needs the 'realtime.txt' data file.

As a test example, I have temporarily installed another copy of the 'cloudbase.php' script, in a directory by itself, with no other file - the only modification I made to the script was to add the complete (relative) path to the 'realtime.txt' data file - and I get <link removed> this cloudbase image (test mode).
JESUS HEREDERO wrote:Since I am not good at PHP script is required for introduction in the ajax-dashboard.php.
Jesus, some 'major' modification must first be made to the 'ajax-dashboard.php' script to position the '100*200' image produced by the 'cloudbase.php' script. Once things have been moved around, adding the image produced by the script is as simple as adding an image on a page - the code to add the image produced by 'cloudbase' is:
<link removed>
Last edited by gemini06720 on Sat 17 Aug 2013 8:02 am, edited 1 time in total.
kinder
Posts: 38
Joined: Mon 08 Nov 2010 5:50 pm
Weather Station: DAVIS VANTAGE PRO 2
Operating System: Windows 7
Location: Nowhere

Re: Now available: AJAX/PHP multilingual website templates

Post by kinder »

i tried to modify this cloudbase script so it can work on another webserver than the one i have template and realtime.txt.I have done this because on my server there is no support for gd and no way to enable it.
The first attempt doesnt work,so i wonder if anyone else have done it and possible instruct me how to do this.
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Now available: AJAX/PHP multilingual website templates

Post by gemini06720 »

PaulMy wrote:I probably had the file structure wrong as I got "Path to realtime.txt file not found! and can't see any settings in cloudbase.php to change.
Paul, I will add some extra code in order to try simplifying the entry of paths such as those you are using...

Whereas some programmers like to work with fixed path from the root directory down, I prefer to work with relative paths, meaning you indicate the paths as being relative to the script being used.

But as I can see from your setup, it is going to be fun... :mrgreen:
PaulMy wrote: The realtime.txt is in root/weather/ folder and I have put cloudbase in
root/cloudbase/cloudbase.php and the others in
root/cloudbase/cloudbase/cb/ and
root/cloudbase/cloudbase/cb/moon/
OK, I am not that great with graphics, but, please bear with me... :oops:

Code: Select all

     +- weather == realtime.txt
     |
root +
     |
     +- cloudbase + == cloudbase.php
                  |
                  +- cloudbase +
                               |
                               +- cb + == cb-bg-XX.png
                                     |
                                     +- moon == NH-moon##.gif/SH-moon##.giv
Using the above graphic, to find the 'realtime.txt' data file, the 'cloudbase.php' script will first have to look up one directory (to the root directory) and then down one directory (to the weather directory) - thus the path needed will be:

Code: Select all

$realtimefile = '../weather/realtime.txt';
Paul, by the time you read this message, I would have released an update to the 'cloudbase.php' script (without the graphic files) with modifications to include paths to the needed files.
PaulMy wrote:Ray can you help me on this?
I really do not know ... how much money do you have at your disposal... :mrgreen: Or better yet, which political party will you be supporting... :twisted:
Post Reply