Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.0.1 (build 4023) - 16 May 2024

(Note that 4.1.0 (build 4024) - 05 June 2024 remains available, but usage of this version is not recommended - particularly for Davis stations - and the included utility in this distribution for migrating to v4 is known to contain errors affecting conversion of dayfile.txt)

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

Reworked default websites

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
User avatar
HansR
Posts: 6084
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Reworked default websites

Post by HansR »

Hi Neil,

I just started looking at the reworked website V3 and noticed it assumed to be installed in the directory where the datafiles are. Many users have more than one website either for experimenting or because those sites are supplemental. Is it possible to have a feature included (either by the site or by CMX) to make the data relative to where the data are located?

As an example a user might configure ../ as the data directory and for all data access the website would use that as a prefix. This technique could be used by all which want to experiment with data on the server while CMX only uploads to one location. It would also prevent the need to run multiple instances of CMX I assume, so maybe it could also be a functional request for CMX to define such prefix.
Hans

https://meteo-wagenborgen.nl
CMX build 4023+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
NeilThomas
Posts: 277
Joined: Thu 11 Oct 2012 9:51 am
Weather Station: Davis Vantage Pro2
Operating System: Raspberry Pi 4
Location: Gloucester
Contact:

Re: Reworked default websites

Post by NeilThomas »

LindaFNM wrote: Mon 03 Jul 2023 10:11 am Neil,

Thanks for looking at this, it could well be my error then. I have yet to get to grips with looking at the configuration and was leaving it as is for now so if the default is not to show then that’s what caused the issue. Sorry if you’ve had to look at it for no reason, I’m afraid it’s a learn as you break it process for me.

Linda
I've had another look and it is definitely a coding error that I have made. :bash: I will update the upload files accordingly later this afternoon.

Neil.
Neil Thomas
website: oaktreewebs.co.uk | Davis Vantage Pro II | CumulusMX, Raspberry Pi 4 | MX V4 build 4023 (ai2)
NeilThomas
Posts: 277
Joined: Thu 11 Oct 2012 9:51 am
Weather Station: Davis Vantage Pro2
Operating System: Raspberry Pi 4
Location: Gloucester
Contact:

Re: Reworked default websites

Post by NeilThomas »

HansR wrote: Mon 03 Jul 2023 10:24 am Hi Neil,

I just started looking at the reworked website V3 and noticed it assumed to be installed in the directory where the datafiles are. Many users have more than one website either for experimenting or because those sites are supplemental. Is it possible to have a feature included (either by the site or by CMX) to make the data relative to where the data are located?

As an example a user might configure ../ as the data directory and for all data access the website would use that as a prefix. This technique could be used by all which want to experiment with data on the server while CMX only uploads to one location. It would also prevent the need to run multiple instances of CMX I assume, so maybe it could also be a functional request for CMX to define such prefix.
Hi HansR

I do the same, I have aways though that it is inappropriate to put the data in the same location as the web pages. I will look into adjusting the config settings so that the location can be varied. Shouldn't be too difficult.

Neil.
Neil Thomas
website: oaktreewebs.co.uk | Davis Vantage Pro II | CumulusMX, Raspberry Pi 4 | MX V4 build 4023 (ai2)
User avatar
HansR
Posts: 6084
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Reworked default websites

Post by HansR »

NeilThomas wrote: Mon 03 Jul 2023 12:31 pm I do the same, I have aways though that it is inappropriate to put the data in the same location as the web pages. I will look into adjusting the config settings so that the location can be varied. Shouldn't be too difficult.
Thanks!
Hans

https://meteo-wagenborgen.nl
CMX build 4023+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
NeilThomas
Posts: 277
Joined: Thu 11 Oct 2012 9:51 am
Weather Station: Davis Vantage Pro2
Operating System: Raspberry Pi 4
Location: Gloucester
Contact:

Re: Reworked default websites

Post by NeilThomas »

NeilThomas wrote: Mon 03 Jul 2023 12:29 pm
LindaFNM wrote: Mon 03 Jul 2023 10:11 am Neil,

Thanks for looking at this, it could well be my error then. I have yet to get to grips with looking at the configuration and was leaving it as is for now so if the default is not to show then that’s what caused the issue. Sorry if you’ve had to look at it for no reason, I’m afraid it’s a learn as you break it process for me.

Linda
I've had another look and it is definitely a coding error that I have made. :bash: I will update the upload files accordingly later this afternoon.

Neil.
Changes made to the package on the Wiki - you should don't now have any issues with Apparent Temp and Feels Like temps. The new package also addresses the flicker encountered when you choose not to use the default theme.

Neil.
Neil Thomas
website: oaktreewebs.co.uk | Davis Vantage Pro II | CumulusMX, Raspberry Pi 4 | MX V4 build 4023 (ai2)
griffo42
Posts: 231
Joined: Thu 10 Dec 2015 6:41 am
Weather Station: Davis Vantage Pro2
Operating System: Win 11 Home
Location: Brisbane, Queensland, Australia
Contact:

Re: Reworked default websites

Post by griffo42 »

Hi Neil

For my site I would very much like to insert "Yesterday" and "Today" above each of the columns in each box in the todayyest.html script. The same line of code looks to me like it would fit into each box. Could you please suggest such line?

I like your software. Thanks.
Keith
Davis Vantage Pro2 Model #6152AU - CumulusMX - Win11 - Saratoga/CUMX Default Scripts
https://www.kstwx.net/index.php
https://www.kstwx.net/cumx/index.html
Image
NeilThomas
Posts: 277
Joined: Thu 11 Oct 2012 9:51 am
Weather Station: Davis Vantage Pro2
Operating System: Raspberry Pi 4
Location: Gloucester
Contact:

Re: Reworked default websites

Post by NeilThomas »

griffo42 wrote: Tue 04 Jul 2023 1:24 am Hi Neil

For my site I would very much like to insert "Yesterday" and "Today" above each of the columns in each box in the todayyest.html script. The same line of code looks to me like it would fit into each box. Could you please suggest such line?

I like your software. Thanks.
Unfortunately, they are not columns as found in tables - they are fluid areas that move depending on the size of the screen. However, you might want to try the following:

Code: Select all

<p class="w3-col l6 w3-hide-medium w3-hide-small">&nbsp;</p>
<p class="w3-col l3 m6 s6 w3-center">Yesterday</p>
<p class="w3-col l3 m6 s6 w3-center">Today</p>
This should be placed immediately after the '<h5>' tag in each panel and will have the following effect on large screens. On smaller screens it will appear above the row titles.
Screenshot 2023-07-04 at 05.17.52.png
Hope this meets your requirements.

Neil.
You do not have the required permissions to view the files attached to this post.
Neil Thomas
website: oaktreewebs.co.uk | Davis Vantage Pro II | CumulusMX, Raspberry Pi 4 | MX V4 build 4023 (ai2)
griffo42
Posts: 231
Joined: Thu 10 Dec 2015 6:41 am
Weather Station: Davis Vantage Pro2
Operating System: Win 11 Home
Location: Brisbane, Queensland, Australia
Contact:

Re: Reworked default websites

Post by griffo42 »

@NeilThomas

Thank you very much for your prompt reply. Your coding works a treat!

best wishes
Keith
Davis Vantage Pro2 Model #6152AU - CumulusMX - Win11 - Saratoga/CUMX Default Scripts
https://www.kstwx.net/index.php
https://www.kstwx.net/cumx/index.html
Image
griffo42
Posts: 231
Joined: Thu 10 Dec 2015 6:41 am
Weather Station: Davis Vantage Pro2
Operating System: Win 11 Home
Location: Brisbane, Queensland, Australia
Contact:

Re: Reworked default websites

Post by griffo42 »

@NeilThomas

Here, for your information and for interested others, are a few largely cosmetic changes that I have made to my site:

index.html
Corrected spelling of Daylight

yesterday.html
deleted "& %" in heading of Temperature & Humidity box for consistency

thismonth.html and thisyear.html
included "at" between reading and time where appropriate

record.html and monthly record.html
deleted one of "on" from highest daily rainfall line
I note that "at" is used on these two pages whereas "@" is used in others.

My preference is "at" rather than "@" so edited styles2.css at line 103 to replace "@" with "at" for those with my preference.

Again, great software and thanks from all of us, I'm sure, for doing this.

Best wishes
Keith
Davis Vantage Pro2 Model #6152AU - CumulusMX - Win11 - Saratoga/CUMX Default Scripts
https://www.kstwx.net/index.php
https://www.kstwx.net/cumx/index.html
Image
NeilThomas
Posts: 277
Joined: Thu 11 Oct 2012 9:51 am
Weather Station: Davis Vantage Pro2
Operating System: Raspberry Pi 4
Location: Gloucester
Contact:

Re: Reworked default websites

Post by NeilThomas »

griffo42 wrote: Tue 04 Jul 2023 11:29 am @NeilThomas

Here, for your information and for interested others, are a few largely cosmetic changes that I have made to my site:

index.html
Corrected spelling of Daylight

yesterday.html
deleted "& %" in heading of Temperature & Humidity box for consistency

thismonth.html and thisyear.html
included "at" between reading and time where appropriate

record.html and monthly record.html
deleted one of "on" from highest daily rainfall line
I note that "at" is used on these two pages whereas "@" is used in others.

My preference is "at" rather than "@" so edited styles2.css at line 103 to replace "@" with "at" for those with my preference.

Again, great software and thanks from all of us, I'm sure, for doing this.

Best wishes
Thanks for all those updates - I must improve my proof reading skills :bash: . I have made all the changes except for the use of '@' rather than 'at. However, if anyone else prefers 'at' then all you will need to do is edit the styles2.css file as indicated above.' These will be incorporated in the next update tomorrow - I am currently adding more themes.

Neil
Neil Thomas
website: oaktreewebs.co.uk | Davis Vantage Pro II | CumulusMX, Raspberry Pi 4 | MX V4 build 4023 (ai2)
User avatar
ConligWX
Posts: 1681
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 24.04 LTS
Location: Bangor, NI
Contact:

Re: Reworked default websites

Post by ConligWX »

Neill

I use WXSim with a php code to display the forecast on Saratoga Templates and also on the default CumulusMX template site too.

https://www.conligwx.org/forecast.htm

I created a new forecast.html using the provided templates.html file from the v3 templates zip file.

I removed all code except the <!-- One Column --> code and added my php code to that in a similar fashion to what my htm file had, yet when i view the page:

https://www.conligwx.org/forecast.html

no wxsim code is imported. when I inspect the code my php code has somehow been commented out, yet it isn't in fact been commented out., is there some code in the css file doing this?

here is my code for the forecast.html page.

Code: Select all

<!DOCTYPE html>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	Default website 2023 	V: 3.0.0
	Web page:	template.html
	Author:		Neil Thomas
	Checked:	20-06-2023 09:23
	Verified:	20-06-2023 09:24
	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<html lang="en">
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta name="description" content="weather data">
		<meta name="keywords" content="CumulusMX, weather, data, weather station, PWS">
		<title>CMX Template</title>
		<link rel="icon" type="image/png" href="images/favicon.png">
		
		<!--	jQuery library		-->
		<script src="lib/jquery/jquery-latest.min.js"></script>
		
		<!--	Fonts	 -->
		<link rel="preconnect" href="https://fonts.googleapis.com">
		<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
		<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400&family=Red+Rose:wght@600&display=swap" rel="stylesheet">
		
		<!--	All Styles	-->
		<link href="css/w3Pro-plus.css" rel="stylesheet">					<!--	Basic w3shools responsive styles	-->
		<link href="css/thmDefaultBlue.css" rel="stylesheet" id="theme">	<!--	New Colours for site	-->
		<link href="css/styles2.css" rel="stylesheet">						<!--	Cascading Style Sheet	-->
		
		<!--	Scripts	-->
		<script src="js/page-manager.js"></script>							<!--	Utility scripts for all pages	-->

		<style>
		.panelGradient h2,
		.panelGradient h3 {
			margin: 0;
		}
		</style>
		<script></script>
	</head>
	<body>
		<header class="ow-theme w3-bottombar ow-theme-add3-bdr">
			<div class="page-width ow-flex-sb ow-flex-bottom">
				<img src="/images/logo.png" class="w3-image cmx-logo" alt="CumulusMX logo">
				<div class="w3-right-align w3-padding">
					<h5 class="w3-hide-small">Latitude: <span data-cmxdata="latitude">-.---</span>, Longitude: <span data-cmxdata="longitude">-.---</span>, Altidude: <span data-cmxdata="altitude">--m</span></h5>
					<h5 class="w3-hide-medium w3-hide-large">Lat: <span data-cmxdata="latitude">-.---</span>,<br>Long: <span data-cmxdata="longitude">-.---</span>,<br>Alt: <span data-cmxdata="altitude">--m</span></h5>
				</div>
			</div>
			<!--	Start of Menus	-->
			<div id="Main_Menu" class="page-width w3-bar ow-theme-sub3 w3-topbar ow-theme-sub5-bdr"><span class="w3-bar-item">Menu</span></div>
			<div id="Main_Menu_Mobile" class="w3-bar-block w3-hide w3-hide-large"></div>
		</header>
		
		<!--	Main Page Content	-->
		<div id="content" class="ow-theme-add4">
			<div class="page-width ow-row-padding ow-flex-sb ow-flex-bottom">	<!--	Page width section	-->
				<h1>Page heading</h1>
				<p class="w3-right-align">Additional information for the page.</p>
			</div>
			

			<!--	One Column	-->
			<div class="page-width w3-row" style="min-height: 1vh; margin-bottom:1vh; padding: 1vh 1%;">	<!--	Page width section	-->
				<div class="ow-flex-cr ow-flex-gap">
					<div class="ow-1col w3-border ow-theme-add3-bdr w3-container panelGradient" style="min-height: 1vh; order:1;">
						<h2>WXSim Forecast for Conlig, Co. Down.</h2>
						
							
						<?php  
                                //$doIncludePW = true;  
                                //include("PWcmx-forecast.php") 

						$doInclude = true;
						include_once("plaintext-parser.php"); 
						?>  
						
					</div>
				</div>
			</div>
		</div>
		
		<!--	Footer	-->
		<footer class="ow-theme w3-topbar ow-theme-add3-bdr">
			<div class="page-width ow-flex-sb w3-hide-small">
				<p class="w3-small ow-theme-add2-txt"><em>Template design v2.0 by Neil Thomas</em></p>
				<h5 class="w3-right-align">
					Powered by <span class="ow-theme-add3-txt">CumulusMX</span> 
					Version <span data-cmxdata="version">3.0</span> 
					(b:<span data-cmxdata="build">0</span>)
				</h5>
			</div>
			<div class="page-width ow-flex-cr w3-hide-large w3-hide-medium">
				<div class="w3-small ow-theme-add2-txt"><em>Template v2.0 by Neil Thomas</em></div>
				<div class="w3-right-align w3-small">
					<strong>Powered by <span class="ow-theme-add3-txt">CumulusMX</span> 
					V: <span data-cmxdata="version">3.0</span> 
					(b:<span data-cmxdata="build">0</span>)</strong>
				</div>
			</div>
		</footer>
	</body>
</html>
here is what I see!

Screenshot 2023-07-16 200345.png
as you see

Code: Select all

<?php 
and 
?> 
are changed to:

Code: Select all

<!--

-->
what code is doing this?
You do not have the required permissions to view the files attached to this post.
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir • CumulusMX v4.0.0

Image
Mapantz
Posts: 1834
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Reworked default websites

Post by Mapantz »

Try renaming the file to forecast.php
Image
User avatar
ConligWX
Posts: 1681
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 24.04 LTS
Location: Bangor, NI
Contact:

Re: Reworked default websites

Post by ConligWX »

Mapantz wrote: Sun 16 Jul 2023 7:29 pm Try renaming the file to forecast.php
Thanks that worked, but not what I wanted, but I want to understand why my forecast.htm works but the forecast.html doesn't using the same wxsim code.

I managed to fix it now however adding:

Code: Select all

AddType application/x-httpd-php .php .html
to the .htaccess
Last edited by ConligWX on Sun 16 Jul 2023 9:58 pm, edited 1 time in total.
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir • CumulusMX v4.0.0

Image
Mapantz
Posts: 1834
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Reworked default websites

Post by Mapantz »

Your server may be enabled to parse php in a .htm, but not .html, possibly?

In .htaccess, add this:
AddHandler application/x-httpd-php .html
Image
User avatar
ConligWX
Posts: 1681
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 24.04 LTS
Location: Bangor, NI
Contact:

Re: Reworked default websites

Post by ConligWX »

Mapantz wrote: Sun 16 Jul 2023 9:54 pm Your server may be enabled to parse php in a .htm, but not .html, possibly?

In .htaccess, add this:
AddHandler application/x-httpd-php .html
yep seems like it.
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir • CumulusMX v4.0.0

Image
Post Reply