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 4019) - 03 April 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

BT's Global Sager Weathercaster PHP Scripts For CumulusMX

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

Moderator: daj

User avatar
GraemeT
Posts: 312
Joined: Wed 21 Oct 2009 11:19 am
Weather Station: La Crosse WS-2355 & WS-2306
Operating System: Windoze 7, 10, 11
Location: Bayswater, Australia
Contact:

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Post by GraemeT »

Oops! :oops:

I went away for a couple of weeks and in my rush to get out the door, I put up the old page by mistake.

It should be visible now.
http://weather.gktnet.com/index.php
Cheers,
Graeme.
sgrmick
Posts: 6
Joined: Thu 22 Sep 2011 12:31 pm
Weather Station: Davis Vantage Pro II
Operating System: Windows 7
Location: Conisbrough, South Yorkshire

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Post by sgrmick »

Just downloaded and installed. Appears to be working fine and looking forward to seeing how it performs.

http://www.conisbroughweather.co.uk
Image
User avatar
Buford T. Justice
Posts: 423
Joined: Fri 17 Aug 2012 9:21 pm
Weather Station: Ecowitt GW1002
Operating System: Windows 11 Pro
Location: USA

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Post by Buford T. Justice »

I am still working on what I think will be the final version of this. Using the current version should work fine. I plan to release the final near the end of the year.
darren
Posts: 13
Joined: Wed 06 Nov 2013 11:24 pm
Weather Station: Davis Vantage Pro 2
Operating System: Windows 10
Location: Stockton on Tees UK
Contact:

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Post by darren »

Hi All

First post..

Thanks Steve for a wonderful piece of software, has been up and running for a fair few days now no problems - a donation is imminent!

Buford, I have downloaded and am running your JavaScript on my website, installed and followed your instructions and it is running fine.

http://www.martonweather.webspace.virginmedia.com/

Just need to get my low humidity sorted out, new temperature/humidity sensor on order...
honestjohn
Posts: 27
Joined: Fri 18 Nov 2011 2:00 pm
Weather Station: Davies Vantage Vue
Operating System: Windows 10 Pro 64bit
Location: Northants, UK
Contact:

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Post by honestjohn »

Hi BT
I just wanted to say a big thank you for all your hard work on this software.
I have spent this evening loading it and configuring and it appears to be running really well.

Your instructions were first class.

http://www.rushden-weather.co.uk

It's currently reading in line with Cumulas forecast.

Many thanks, it's a great addition to my weather template.

Best regards

John
User avatar
Buford T. Justice
Posts: 423
Joined: Fri 17 Aug 2012 9:21 pm
Weather Station: Ecowitt GW1002
Operating System: Windows 11 Pro
Location: USA

Re: BT's Global Sager Weathercaster JavaScripts For Cumulus

Post by Buford T. Justice »

@darren and @honestjohn
Glad you guys like it. In a couple of days, the new version will be released. I am still testing it. It is much faster and gets the cloud condition automatically to name a few improvements.
User avatar
Buford T. Justice
Posts: 423
Joined: Fri 17 Aug 2012 9:21 pm
Weather Station: Ecowitt GW1002
Operating System: Windows 11 Pro
Location: USA

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by Buford T. Justice »

The new version is now available! I killed off JavaScript and now PHP is used as it is much faster. You no longer need to use the Current Condition box in Cumulus to type out the sky condition as it is now automatic! Your web server will have to support PHP for this to work which pretty much all website hosting companies should.

For you guys trying this for the first time, go to the first post in this thread and follow the directions. Ignore what follows below.

For you guys who are using the old and no longer supported JavaScript version, you will have to make the following changes depending on what templates you are using on your website.

First you will need to download BT's Global Sager Weathercaster PHP Scripts For Cumulus.zip at the bottom of the first post in this thread. When you open it, you will see 4 files:

bt-metar.php
bt-sager.php
bt-sager-cu.php
bt-sager-var.php

Save them to your Cumulus web folder. Open the web folder.

Delete "bt-sager.js" and "bt-sager-cu.js" if they are there. Now open "bt-metar.php" with an editor like Notepad++. You will need to know your closest METAR station which hopefully uses the standard report format and doesn't add a bunch of crap to it. On Line 14, change XXXX between the quotes to your preferred METAR station. Save the file then close Notepad++.

You will now need to upload the 4 files once to your web server into the same directory Cumulus uses when it uploads files during a web update. Also, delete "bt-sager.js" and "bt-sager-cu.js" if they are on your web server.

In Cumulus, click on CONFIGURATION>INTERNET then click on the FILES tab. You should see a REMOTE file listed as /{YOUR FOLDER}/bt-sager-cu.js ({YOUR FOLDER} is optional) which you will need to change to /{YOUR FOLDER}/bt-sager-cu.php and then click on the BROWSE and select "bt-sager-cu.php" in the Cumulus web folder as the LOCAL file to upload. Verify both LOCAL and REMOTE now say bt-sager.cu.php then click OK.

On the following templates, the line 3s are approximate so be prepared to do some searching if you cannot find the code. Once again, use Notepad++ which will make editing much easier.

If you are using the default Cumulus indexT.htm file:

CHANGE:

Code: Select all

<head>
	<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
	<meta http-equiv="refresh" content="299">
	<meta name="description" content="<#location> weather data">
	<meta name="keywords" content="Cumulus, <#location> weather data, weather, data, weather station">
	<script type="text/javascript" src="bt-sager-cu.js"></script>
	<script type="text/javascript" src="bt-sager.js"></script>
	<title><#location> weather</title>
	<link href="weatherstyle.css" rel="stylesheet" type="text/css">
</head>

<body onload="forecast();">
TO:

Code: Select all

<head>
	<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
	<meta http-equiv="refresh" content="299">
	<meta name="description" content="<#location> weather data">
	<meta name="keywords" content="Cumulus, <#location> weather data, weather, data, weather station">
	<title><#location> weather</title>
	<link href="weatherstyle.css" rel="stylesheet" type="text/css">
</head>

<body>
CHANGE:

Code: Select all

<p align="center"><b>12-24 Hour Forecast:</b><br>
<a href="bt-sager-cu.js" style="text-decoration:none;" target="_blank"><b><span id="Forecast" style="font-family:Tahoma;color:red;font-size:20px;">...Forecast Offline...</span></b></a></p>
OR FOR SMALLER LETTERS:

Code: Select all

<p><b>12-24 Hour Forecast:</b>&nbsp;<a href="bt-sager-cu.js" style="text-decoration:none;" target="_blank"><b><span id="Forecast" style="font-family:Tahoma;color:red;font-size:14px;">...Forecast Offline...</span></b></a></p>
TO:

Code: Select all

<p align= "center"><b>12-24 Hour Forecast:</b><br>
<a href = "bt-sager-var.php" style = "text-decoration:none;" target = "_blank"><b><font color = "#FF0000" face = "Tahoma" size = "4"><script src = "bt-sager.php"></script></font></b></a></p>
OR FOR SMALLER LETTERS:

Code: Select all

<p><b>12-24 Hour Forecast:</b>&nbsp;<a href = "bt-sager-var.php" style = "text-decoration:none;" target = "_blank"><b><font color = "#FF0000"><script src = "bt-sager.php"></script></font></b></a></p>
PLEASE leave the <a href> link in the code as it makes it easy to see the variables used to determine a forecast simply by clicking on the forecast.

Saratoga Weather Templates

Backup these three files just to be safe then open them with a text editor such as Notepad++:

ajax-dashboard.php
top.php
wxindex.php (possibly renamed to index.php)

Using the 17 Mar 2013 01:25pm PDT version of "Base-USA.zip":

For ajax-dashboard.php on Lines 970-971, CHANGE:

Code: Select all

           <tr>
		   <p align="center"><b>12-24 Hour Forecast:</b><br>
		   <a href="bt-sager-cu.js" style="text-decoration:none;" target="_blank"><b><span id="Forecast" style="font-family:Tahoma;color:red;font-size:20px;line-height:1.3;">...Forecast Offline...</span></b></a></p>
		   <td class="data1" style="width: 80px;font-size: 8pt;border: none;text-align: center" valign="middle" align="center"><strong><?php echo $forecasticons[0] . 
TO:

Code: Select all

           <tr>
		   <p align = "center" style = "line-height : 1.3"><b>12-24 Hour Forecast:</b><br>
		   <a href = "bt-sager-var.php" style = "text-decoration:none;" target = "_blank"><b><font color = "#FF0000" face = "Tahoma" size = "4"><script src = "bt-sager.php"></script></font></b></a></p>
		   <td class="data1" style="width: 80px;font-size: 8pt;border: none;text-align: center" valign="middle" align="center"><strong><?php echo $forecasticons[0] . 
For top.php on Line 113, CHANGE:

Code: Select all

	<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
	<meta http-equiv="refresh" content="299">
	<script type="text/javascript" src="bt-sager-cu.js"></script>
	<script type="text/javascript" src="bt-sager.js"></script>
TO:

Code: Select all

	<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
	<meta http-equiv="refresh" content="299">
For wxindex.php (or index.php) on Line 40, CHANGE:

Code: Select all

<body onload="forecast();">
TO:

Code: Select all

<body>
"Weather by You" Templates

Backup index.php just to be safe then open it with a text editor such as Notepad++. Using the "Weather Blues V2 PHP" template as an example:

CHANGE Lines 31-45 FROM:

Code: Select all

<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<title><?php echo $location.' | '.$TT_now; ?></title>
	<meta name="keywords" content="Current, actually, last minute" />
	<meta name="description" content="Current weather observations" />
	<link href="styles.css" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" href="nivo-slider.css" type="text/css" media="screen" />
	<script type="text/javascript" src="lib/clock/clockt.js"></script>
	<script type="text/javascript" src="lib/clock/clockp.js"></script>
	<script type="text/javascript" src="lib/dropmenu/dropdowntabs.js"></script>
	<script type="text/javascript">
		var dayname = new Array('<?php echo $Tr_sun."', '".$Tr_mon."', '".$Tr_tue."', '".$Tr_wed."', '".$Tr_thu."', '".$Tr_fri."', '".$Tr_sat."', '".$Tr_sun; ?>');
	</script>
	<meta http-equiv="refresh" content="299">
	<script type="text/javascript" src="bt-sager-cu.js"></script>
	<script type="text/javascript" src="bt-sager.js"></script>
</head>
<body onload="forecast(); setClocks();">
TO:

Code: Select all

<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<meta http-equiv="refresh" content="299">
	<title><?php echo $location.' | '.$TT_now; ?></title>
	<meta name="keywords" content="Current, actually, last minute" />
	<meta name="description" content="Current weather observations" />
	<link href="styles.css" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" href="nivo-slider.css" type="text/css" media="screen" />
	<script type="text/javascript" src="lib/clock/clockt.js"></script>
	<script type="text/javascript" src="lib/clock/clockp.js"></script>
	<script type="text/javascript" src="lib/dropmenu/dropdowntabs.js"></script>
	<script type="text/javascript">
		var dayname = new Array('<?php echo $Tr_sun."', '".$Tr_mon."', '".$Tr_tue."', '".$Tr_wed."', '".$Tr_thu."', '".$Tr_fri."', '".$Tr_sat."', '".$Tr_sun; ?>');
	</script>
</head>
<body>
CHANGE Line 85 FROM:

Code: Select all

					<p align="center"><b>12-24 Hour Forecast:</b><br>
					<a href="bt-sager-cu.js" style="text-decoration:none;" target="_blank"><b><span id="Forecast" style="font-family:Tahoma;color:red;font-size:20px;line-height:1.3;">...Forecast Offline...</span></b></a></p><br>
TO:

Code: Select all

					<p align = "center" style = "line-height : 1.3"><b>12-24 Hour Forecast:</b><br>
					<a href = "bt-sager-var.php" style = "text-decoration:none;" target = "_blank"><b><font color = "#FF0000" face = "Tahoma" size = "4"><script src = "bt-sager.php"></script></font></b></a></p><br>
honestjohn
Posts: 27
Joined: Fri 18 Nov 2011 2:00 pm
Weather Station: Davies Vantage Vue
Operating System: Windows 10 Pro 64bit
Location: Northants, UK
Contact:

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by honestjohn »

Hi BT

I have loaded your new php version and all is well. http://www.rushden-weather.co.uk

Great work!

I'll provide you with some feedback after it has been running a few days.

Wishing you a very Happy New Year.

Regards

John
uncle_bob
Posts: 505
Joined: Wed 17 Aug 2011 2:58 pm
Weather Station: WeatherDuino Pro2
Operating System: 2008
Location: Canberra

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by uncle_bob »

Hi BT,
Happy New Year from down under.

I've given your new forecaster a crack, but have failed.
I think I followed your instructions to the letter but somehow something has gone wrong.
The forecaster isn't working and I've lost the hands on the clock of my site using the WeatherBluesV2 php template.

Could you be so kind as to take a look?
http://www.users.on.net/~cond/weather/index.php

Please let me know if you need any of the site files (I'd prefer not to post them in a public space), or remote access.

Cheers Bob
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image
User avatar
Buford T. Justice
Posts: 423
Joined: Fri 17 Aug 2012 9:21 pm
Weather Station: Ecowitt GW1002
Operating System: Windows 11 Pro
Location: USA

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by Buford T. Justice »

Thanks guys. I accidentally overlooked some JavaScript code which needed to be changed to PHP code. The attachment in the first post is corrected. For you guys who have already made the switch, re-download and reinstall the files. No webpage changes need to be made if you have already performed them. My bad.
Last edited by Buford T. Justice on Wed 01 Jan 2014 8:43 am, edited 1 time in total.
User avatar
Buford T. Justice
Posts: 423
Joined: Fri 17 Aug 2012 9:21 pm
Weather Station: Ecowitt GW1002
Operating System: Windows 11 Pro
Location: USA

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by Buford T. Justice »

uncle_bob wrote:Hi BT,
Happy New Year from down under.

I've given your new forecaster a crack, but have failed.
I think I followed your instructions to the letter but somehow something has gone wrong.
The forecaster isn't working and I've lost the hands on the clock of my site using the WeatherBluesV2 php template.

Could you be so kind as to take a look?
http://www.users.on.net/~cond/weather/index.php

Please let me know if you need any of the site files (I'd prefer not to post them in a public space), or remote access.

Cheers Bob
Looks like your webpages are still using the old JavaScript version. Your main page doesn't have the <body> tag as far as I can see in my drunken state.
Last edited by Buford T. Justice on Wed 01 Jan 2014 8:44 am, edited 1 time in total.
uncle_bob
Posts: 505
Joined: Wed 17 Aug 2011 2:58 pm
Weather Station: WeatherDuino Pro2
Operating System: 2008
Location: Canberra

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by uncle_bob »

Your right BT. I've now added the <body>. Unfortunately it still isn't working, though I've the hands on the clock are back. I also changed to the newer fixed files. I'm running 1.9.4 (1079) so I'll upgrade that now.

Here's my updaed indec.php file from the web server:

Code: Select all

<?php
$tpl_version = "1.0";
if (isset($_GET['ver'])) {
  echo $tpl_version;
  exit;
}

session_start(); // start PHP session
// Check if a language has been selected
if (isset($_POST['langue'])) {
  $lang = $_POST['langue'];
  $_SESSION['langue'] = $lang; // store session data
}
elseif(isset($_SESSION['langue'])){
  $lang = $_SESSION['langue']; // Default language
}
else {
  $lang = 'en'; // Default language
  $_SESSION['langue'] = $lang;
}

// Include text and data file
require('lang/text_standard_'.$lang.'.php');
include('wt_data_inc.php');

// Include language files available in lang folder
include('include/local_lang.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
   <meta http-equiv="content-type" content="text/html; charset=utf-8" />
   <meta http-equiv="refresh" content="299">
   <title><?php echo $location.' | '.$TT_now; ?></title>
   <meta name="keywords" content="Current, actually, last minute" />
   <meta name="description" content="Current weather observations" />
   <link href="styles.css" rel="stylesheet" type="text/css" />
   <link rel="stylesheet" href="nivo-slider.css" type="text/css" media="screen" />
   <script type="text/javascript" src="lib/clock/clockt.js"></script>
   <script type="text/javascript" src="lib/clock/clockp.js"></script>
   <script type="text/javascript" src="lib/dropmenu/dropdowntabs.js"></script>
   <script type="text/javascript">
      var dayname = new Array('<?php echo $Tr_sun."', '".$Tr_mon."', '".$Tr_tue."', '".$Tr_wed."', '".$Tr_thu."', '".$Tr_fri."', '".$Tr_sat."', '".$Tr_sun; ?>');
   </script>
</head>
<body>
<div id="bg_clouds">
	<div id="main">
		<!-- header top and main menu begins -->
    <?php
      require_once('header_menu.php');
    ?>
    <script type="text/javascript">
    // Select menu current item highlight
    //SYNTAX: tabdropdown.init("menu_id", [item menu, start from 0])
    tabdropdown.init("mainmenu", 0)
    </script>
		<div style="height:13px"></div>
		<!-- header ends -->
		<div class="header_top"></div>
		<div class="header">
			<div id="wrapper">
				<div id="slider-wrapper">        
					<div id="slider" class="nivoSlider">
						<img src="style/header1.jpg" alt="" />
						<img src="style/header2.jpg" alt=""/>
						<img src="style/header3.jpg" alt="" />
					</div>
				</div>
			</div>
			<script type="text/javascript">
				$(window).load(function() {
				$('#slider').nivoSlider();
				});
			</script>
		</div>
		<div class="header_bot"></div>
		<div style="height:15px"></div>
		<!-- content begins -->
		<div class="cont_top"></div>
		<div id="content">
			<div class="razd_lr_h">
				<div id="left_h">
					<h1 style="padding-top:15px"><?php echo $Tr_welcome.' '.$Tr_station; ?></h1>
					<p><?php echo $Tr_ind_station.' '.$stationtype.', '.$Tr_ind_update.' '.$interval.' '.$Tr_minutes.'<br />'.$Tr_ind_mday.' '.$rollovertime; ?>.
					</p>
					<br />
					<p align="center"><b>12-24 Hour Forecast:</b><br>
               <a href="bt-sager-cu.js" style="text-decoration:none;" target="_blank"><b><span id="Forecast" style="font-family:Tahoma;color:red;font-size:20px;">...Forecast Offline...</span></b></a></p><br>
					<!-- WEATHER DATA INCLUSION -->
          <?php include('index_txt.php');?>
					<div style="clear: both"></div>
				</div>
        <!--  Right side column  -->
				<div id="right_h">
					<div class="pan_clock">
						<div class="local_time">
							<h1 style="padding: 5px 0px; text-align:center"><?php echo $Tr_localtime ?></h1>
              <!-- This place to indicate your location (City and contry)  -->
							<p><strong>Conder, Tuggeranong</strong></p>
							<p><strong>Canberra, Australia</strong></p>
						</div>
						<div id="clock_a" class="clock"></div>
					</div>
					<div class="pan observ" style="margin-top:5px">
						<h2 style="padding-top:10px;">Observations</h2>
						<table cellspacing="0" style="padding:30px 0px; line-height: 22px" summary="Most recent observations">
						<tr>
							<td style="text-align:right"><?php echo $now_temp; ?> :</td>
							<td style="text-align:left"><strong><?php echo $temp; ?></strong><small><?php echo $tempunit; ?></small></td>
						</tr><tr>
							<td style="text-align:right"><?php echo $now_hum; ?> :</td>
							<td style="text-align:left"><strong><?php echo $hum; ?></strong><small>%</small></td>
						</tr><tr>
							<td style="text-align:right"><?php echo $Tr_wind; ?> :</td>
							<td style="text-align:left"><strong><?php echo $wspeed; ?></strong> <small><?php echo $windunit; ?></small></td>
						</tr><tr>
							<td style="text-align:right"><?php echo $Tr_windd; ?> :</td>
							<td style="text-align:left"><strong><?php echo $currentwdir; ?></strong></td>
            </tr>
						</table>
						<p style="text-align: center">
              <!--  This show current date, format: Monday, 1 may 2012  -->
              <?php echo $dayname.', '.$day.' '.$monthname.' '.$year; ?>
            </p>
						<p style="text-align: center">Last read at <?php echo $timehhmmss; ?></p>
					</div>
					<div class="pan forec">
						<h2><?php echo $Tr_forecast; ?></h2>
						<img src="style/forecast/forecast_<?php echo $isdaylight.'_'.$forecastnumber; ?>.png" style="padding: 35px 0px 10px 75px" alt="<?php echo $Tr_forecast.': '.$forecast; ?>" title="<?php echo $Tr_forecast.': '.$forecast; ?>" />
						<p style="text-align:center">Forecast image<br /><em>(next 12 hours)</em></p>
					</div>
					<div class="pan night" style="margin-bottom:5px;">
						<h2><?php echo $Tr_moonphase; ?></h2>
						<img src="images/moon.bmp" style="padding: 50px 0px 52px 120px" alt="Forecast icon" title="Forecast icon" />
						<p style="text-align:center">Phase : <strong><?php echo $moonphase; ?></strong><br />
						<?php echo $Tr_MoonPercent; ?> <strong><?php echo $MoonPercentAbs; ?>%</strong></p>
					</div>
				</div>
				<div style="clear: both"></div>
			</div>
		</div>
    <!-- content ends --> 
		<div class="cont_bot"></div>
		<!-- footer begins -->
		<div id="footer">
      <!-- Do not remove -->
			<a href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional"><abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a> | <a href="http://jigsaw.w3.org/css-validator/check/referer" title="This page validates as CSS"><abbr title="Cascading Style Sheets">CSS</abbr></a> | Weather Blues Template by <a href="http://weatherbyyou.com">Weather by You!</a>
			<p style="width:100%; font-family:helvetica; font-size:10px; color:#fff">Copyright  2011. Designed by <a href="http://www.metamorphozis.com/free_templates/free_templates.php" title="Free Web Templates">Free Web Templates</a>, coded by <a href="http://www.myfreecsstemplates.com/" title="Free CSS Templates">Free CSS Templates</a></p>
     <p>&nbsp</p>
	 <script type="text/javascript" src="http://jc.revolvermaps.com/r.js"></script><script type="text/javascript">rm_f1st('7','260','true','true','3578c9','296u1v3zk6d','true','ff0000');</script><noscript><applet codebase="http://rc.revolvermaps.com/j" code="core.RE" width="260" height="260" archive="g.jar"><param name="cabbase" value="g.cab" /><param name="r" value="true" /><param name="n" value="true" /><param name="i" value="296u1v3zk6d" /><param name="m" value="7" /><param name="s" value="260" /><param name="c" value="ff0000" /><param name="v" value="true" /><param name="b" value="3578c9" /><param name="rfc" value="true" /></applet></noscript>

	 <a href="http://cumulussites.net/"><img src="http://cumulussites.net/button.php?u=uncle_bob" alt="Cumulus Top Weather Sites" border="0"></a>
	 
	<!-- Do not remove end -->
		</div>
		<!-- footer ends -->
	</div>
</div>
<!--  Best place to put javascript to speed up page loading  -->
<script type="text/javascript" src="lib/jquery-1.4.3.min.js"></script>
<script type="text/javascript" src="lib/jquery.nivo.slider.pack.js"></script>
<script type="text/javascript">
	$(window).load(function() {
	$('#slider').nivoSlider();
	});
</script>
<script type="text/javascript">
	var dayname = new Array('<?php echo $Tr_sun."', '".$Tr_mon."', '".$Tr_tue."', '".$Tr_wed."', '".$Tr_thu."', '".$Tr_fri."', '".$Tr_sat."', '".$Tr_sun; ?>');
</script>

</body>
</html>
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image
User avatar
Buford T. Justice
Posts: 423
Joined: Fri 17 Aug 2012 9:21 pm
Weather Station: Ecowitt GW1002
Operating System: Windows 11 Pro
Location: USA

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by Buford T. Justice »

CHANGE:

Code: Select all

               <p align="center"><b>12-24 Hour Forecast:</b><br>
               <a href="bt-sager-cu.js" style="text-decoration:none;" target="_blank"><b><span id="Forecast" style="font-family:Tahoma;color:red;font-size:20px;">...Forecast Offline...</span></b></a></p><br>
TO:

Code: Select all

               <p align = "center" style = "line-height : 1.3"><b>12-24 Hour Forecast:</b><br>
               <a href = "bt-sager-var.php" style = "text-decoration:none;" target = "_blank"><b><font color = "#FF0000" face = "Tahoma" size = "4"><script src = "bt-sager.php"></script></font></b></a></p><br>
Also download the .ZIP in the first post one more time. Extract the 4 files to "C:\Cumulus\web". Browse to that folder. Delete "bt-sager.js" and "bt-sager-cu.js" if they are there. Open "bt-meter.php" and change XXXX to your local METAR station code. Save the file.

Upload these to your web server:

bt-metar.php
bt-sager.php
bt-sager-var.php

You can either delete the 3 files above from "C:\Cumulus\web" after you upload them or keep them if you like.

Now set up Cumulus to process "bt-sager-cu.php" as detailed in the directions in the first post.

Happy New Year and I hope this gets you going.
uncle_bob
Posts: 505
Joined: Wed 17 Aug 2011 2:58 pm
Weather Station: WeatherDuino Pro2
Operating System: 2008
Location: Canberra

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by uncle_bob »

BT, I've did as you asked. Still no go though.

Here's my index.php now:

Code: Select all

<?php
$tpl_version = "1.0";
if (isset($_GET['ver'])) {
  echo $tpl_version;
  exit;
}

session_start(); // start PHP session
// Check if a language has been selected
if (isset($_POST['langue'])) {
  $lang = $_POST['langue'];
  $_SESSION['langue'] = $lang; // store session data
}
elseif(isset($_SESSION['langue'])){
  $lang = $_SESSION['langue']; // Default language
}
else {
  $lang = 'en'; // Default language
  $_SESSION['langue'] = $lang;
}

// Include text and data file
require('lang/text_standard_'.$lang.'.php');
include('wt_data_inc.php');

// Include language files available in lang folder
include('include/local_lang.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
   <meta http-equiv="content-type" content="text/html; charset=utf-8" />
   <meta http-equiv="refresh" content="299">
   <title><?php echo $location.' | '.$TT_now; ?></title>
   <meta name="keywords" content="Current, actually, last minute" />
   <meta name="description" content="Current weather observations" />
   <link href="styles.css" rel="stylesheet" type="text/css" />
   <link rel="stylesheet" href="nivo-slider.css" type="text/css" media="screen" />
   <script type="text/javascript" src="lib/clock/clockt.js"></script>
   <script type="text/javascript" src="lib/clock/clockp.js"></script>
   <script type="text/javascript" src="lib/dropmenu/dropdowntabs.js"></script>
   <script type="text/javascript">
      var dayname = new Array('<?php echo $Tr_sun."', '".$Tr_mon."', '".$Tr_tue."', '".$Tr_wed."', '".$Tr_thu."', '".$Tr_fri."', '".$Tr_sat."', '".$Tr_sun; ?>');
   </script>
</head>
<body>
<div id="bg_clouds">
	<div id="main">
		<!-- header top and main menu begins -->
    <?php
      require_once('header_menu.php');
    ?>
    <script type="text/javascript">
    // Select menu current item highlight
    //SYNTAX: tabdropdown.init("menu_id", [item menu, start from 0])
    tabdropdown.init("mainmenu", 0)
    </script>
		<div style="height:13px"></div>
		<!-- header ends -->
		<div class="header_top"></div>
		<div class="header">
			<div id="wrapper">
				<div id="slider-wrapper">        
					<div id="slider" class="nivoSlider">
						<img src="style/header1.jpg" alt="" />
						<img src="style/header2.jpg" alt=""/>
						<img src="style/header3.jpg" alt="" />
					</div>
				</div>
			</div>
			<script type="text/javascript">
				$(window).load(function() {
				$('#slider').nivoSlider();
				});
			</script>
		</div>
		<div class="header_bot"></div>
		<div style="height:15px"></div>
		<!-- content begins -->
		<div class="cont_top"></div>
		<div id="content">
			<div class="razd_lr_h">
				<div id="left_h">
					<h1 style="padding-top:15px"><?php echo $Tr_welcome.' '.$Tr_station; ?></h1>
					<p><?php echo $Tr_ind_station.' '.$stationtype.', '.$Tr_ind_update.' '.$interval.' '.$Tr_minutes.'<br />'.$Tr_ind_mday.' '.$rollovertime; ?>.
					</p>
					<br />
					<p align = "center" style = "line-height : 1.3"><b>12-24 Hour Forecast:</b><br>
               <a href = "bt-sager-var.php" style = "text-decoration:none;" target = "_blank"><b><font color = "#FF0000" face = "Tahoma" size = "4"><script src = "bt-sager.php"></script></font></b></a></p><br>
					<!-- WEATHER DATA INCLUSION -->
          <?php include('index_txt.php');?>
					<div style="clear: both"></div>
				</div>
        <!--  Right side column  -->
				<div id="right_h">
					<div class="pan_clock">
						<div class="local_time">
							<h1 style="padding: 5px 0px; text-align:center"><?php echo $Tr_localtime ?></h1>
              <!-- This place to indicate your location (City and contry)  -->
							<p><strong>Conder, Tuggeranong</strong></p>
							<p><strong>Canberra, Australia</strong></p>
						</div>
						<div id="clock_a" class="clock"></div>
					</div>
					<div class="pan observ" style="margin-top:5px">
						<h2 style="padding-top:10px;">Observations</h2>
						<table cellspacing="0" style="padding:30px 0px; line-height: 22px" summary="Most recent observations">
						<tr>
							<td style="text-align:right"><?php echo $now_temp; ?> :</td>
							<td style="text-align:left"><strong><?php echo $temp; ?></strong><small><?php echo $tempunit; ?></small></td>
						</tr><tr>
							<td style="text-align:right"><?php echo $now_hum; ?> :</td>
							<td style="text-align:left"><strong><?php echo $hum; ?></strong><small>%</small></td>
						</tr><tr>
							<td style="text-align:right"><?php echo $Tr_wind; ?> :</td>
							<td style="text-align:left"><strong><?php echo $wspeed; ?></strong> <small><?php echo $windunit; ?></small></td>
						</tr><tr>
							<td style="text-align:right"><?php echo $Tr_windd; ?> :</td>
							<td style="text-align:left"><strong><?php echo $currentwdir; ?></strong></td>
            </tr>
						</table>
						<p style="text-align: center">
              <!--  This show current date, format: Monday, 1 may 2012  -->
              <?php echo $dayname.', '.$day.' '.$monthname.' '.$year; ?>
            </p>
						<p style="text-align: center">Last read at <?php echo $timehhmmss; ?></p>
					</div>
					<div class="pan forec">
						<h2><?php echo $Tr_forecast; ?></h2>
						<img src="style/forecast/forecast_<?php echo $isdaylight.'_'.$forecastnumber; ?>.png" style="padding: 35px 0px 10px 75px" alt="<?php echo $Tr_forecast.': '.$forecast; ?>" title="<?php echo $Tr_forecast.': '.$forecast; ?>" />
						<p style="text-align:center">Forecast image<br /><em>(next 12 hours)</em></p>
					</div>
					<div class="pan night" style="margin-bottom:5px;">
						<h2><?php echo $Tr_moonphase; ?></h2>
						<img src="images/moon.bmp" style="padding: 50px 0px 52px 120px" alt="Forecast icon" title="Forecast icon" />
						<p style="text-align:center">Phase : <strong><?php echo $moonphase; ?></strong><br />
						<?php echo $Tr_MoonPercent; ?> <strong><?php echo $MoonPercentAbs; ?>%</strong></p>
					</div>
				</div>
				<div style="clear: both"></div>
			</div>
		</div>
    <!-- content ends --> 
		<div class="cont_bot"></div>
		<!-- footer begins -->
		<div id="footer">
      <!-- Do not remove -->
			<a href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional"><abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a> | <a href="http://jigsaw.w3.org/css-validator/check/referer" title="This page validates as CSS"><abbr title="Cascading Style Sheets">CSS</abbr></a> | Weather Blues Template by <a href="http://weatherbyyou.com">Weather by You!</a>
			<p style="width:100%; font-family:helvetica; font-size:10px; color:#fff">Copyright  2011. Designed by <a href="http://www.metamorphozis.com/free_templates/free_templates.php" title="Free Web Templates">Free Web Templates</a>, coded by <a href="http://www.myfreecsstemplates.com/" title="Free CSS Templates">Free CSS Templates</a></p>
     <p>&nbsp</p>
	 <script type="text/javascript" src="http://jc.revolvermaps.com/r.js"></script><script type="text/javascript">rm_f1st('7','260','true','true','3578c9','296u1v3zk6d','true','ff0000');</script><noscript><applet codebase="http://rc.revolvermaps.com/j" code="core.RE" width="260" height="260" archive="g.jar"><param name="cabbase" value="g.cab" /><param name="r" value="true" /><param name="n" value="true" /><param name="i" value="296u1v3zk6d" /><param name="m" value="7" /><param name="s" value="260" /><param name="c" value="ff0000" /><param name="v" value="true" /><param name="b" value="3578c9" /><param name="rfc" value="true" /></applet></noscript>

	 <a href="http://cumulussites.net/"><img src="http://cumulussites.net/button.php?u=uncle_bob" alt="Cumulus Top Weather Sites" border="0"></a>
	 
	<!-- Do not remove end -->
		</div>
		<!-- footer ends -->
	</div>
</div>
<!--  Best place to put javascript to speed up page loading  -->
<script type="text/javascript" src="lib/jquery-1.4.3.min.js"></script>
<script type="text/javascript" src="lib/jquery.nivo.slider.pack.js"></script>
<script type="text/javascript">
	$(window).load(function() {
	$('#slider').nivoSlider();
	});
</script>
<script type="text/javascript">
	var dayname = new Array('<?php echo $Tr_sun."', '".$Tr_mon."', '".$Tr_tue."', '".$Tr_wed."', '".$Tr_thu."', '".$Tr_fri."', '".$Tr_sat."', '".$Tr_sun; ?>');
</script>

</body>
</html>
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image
User avatar
Buford T. Justice
Posts: 423
Joined: Fri 17 Aug 2012 9:21 pm
Weather Station: Ecowitt GW1002
Operating System: Windows 11 Pro
Location: USA

Re: BT's Global Sager Weathercaster PHP Scripts For Cumulus

Post by Buford T. Justice »

It seems like you haven't uploaded any of the PHP files as none of these links for your website works and they should be if the files are there unless you have them going to a different directory:

http://www.users.on.net/~cond/weather/bt-sager-var.php
http://www.users.on.net/~cond/weather/bt-sager-cu.php
http://www.users.on.net/~cond/weather/bt-sager.php
http://www.users.on.net/~cond/weather/bt-metar.php

You main weather webpage is here:

http://www.users.on.net/~cond/weather/index.php

So we know your web server supports PHP.
Post Reply