Author Topic: Installing Saratoga Scripts  (Read 3774 times)

0 Members and 1 Guest are viewing this topic.

Offline nineback

  • Contributor
  • ***
  • Posts: 136
    • Albertville, AL Weather
Installing Saratoga Scripts
« on: January 03, 2013, 03:13:51 PM »
I am working on converting my site to teh Saratoga scripts.  I need to make sure I understand the file structure on the web site.  Assume my main directory is weather and contains the php, js, and css files.  Would I then have sub directories labled ajax-images, alert-imsges, cache, and Forecast/images?

Is the WXtags-template-files directory needed since it only contains the README.txt and testtags.txt.  I beleive the main part of the zip file was copied to the root directory.

Thanks in advance.

Tom
Davis VP+
Weather Display/WeeWX
http://www.kq5s.com/

Offline Bunty

  • Forecaster
  • *****
  • Posts: 2432
  • Stillwater, home of Oklahoma State University
    • Welcome to Stillwater Weather
Re: Installing Saratoga Scripts
« Reply #1 on: January 03, 2013, 03:40:07 PM »
The main directory is not "weather".  It's what your web space provider says it is.  For instance, it might be web.  You're correct on names of the other files.  Carefully follow the directions on configuring and installing the Saratoga scripts and do take your time. 

Also the 2nd home page using modified AltDashboard 6.95 at http://stillwaterweather.com/2ndhome.php

Offline nineback

  • Contributor
  • ***
  • Posts: 136
    • Albertville, AL Weather
Re: Installing Saratoga Scripts
« Reply #2 on: January 03, 2013, 03:46:07 PM »
Thanks.  Weather is the directory I created on my domain.  I am working through the various setup files now.  Not a simple undertaking but am just taking my time and playing around as I go.  I have a Davis VP2 and use weather display software.  I have a site running now using the tag capabilities of WD.

Tom
Davis VP+
Weather Display/WeeWX
http://www.kq5s.com/

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9278
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Installing Saratoga Scripts
« Reply #3 on: January 03, 2013, 03:47:07 PM »
Hi Tom,

You are correct -- the contents of the Base and Plugin distribution and the carterlake icons .zip packages are unpacked into a directory (preferably the document root), and in the end you have in that directory:

the .php, .css, .js, .txt files
./ajax-images/ .gif, .png and .jpg files
./cache/ (which must be writable by PHP)
./alert-images/ .png files
./forecast/images/ .jpg (and .gif if montetreviglio animated forecast icons used)

The ./WXtags-template-files directory isn't really needed on your website .. it only serves as a container for you to extract and use the tags file for WD.

If you are not installing the template in the document root, then be sure to change the ajaxWDwx.js script to reflect where your clientraw.txt is being loaded.

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline g4mhj

  • Member
  • *
  • Posts: 39
    • WDL from Erith, Kent, UK
Re: Installing Saratoga Scripts
« Reply #4 on: July 19, 2018, 02:13:01 PM »
I know this is an old post but I want to try the Saratoga web pages.  I already have a very basic website and I would at the very least want  to keep ALL the files / directories in a new folder under root.  My main reason for this is to ensure if things go wrong it would be easy to remove. If I add to the root and am worried that my existing files might be overridden.  Is a link available for any instructions.  I currently use Weather Display with my VP2+.

www.bobhewitt.co.uk

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9278
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Installing Saratoga Scripts
« Reply #5 on: July 19, 2018, 04:02:45 PM »
I know this is an old post but I want to try the Saratoga web pages.  I already have a very basic website and I would at the very least want  to keep ALL the files / directories in a new folder under root.  My main reason for this is to ensure if things go wrong it would be easy to remove. If I add to the root and am worried that my existing files might be overridden.  Is a link available for any instructions.  I currently use Weather Display with my VP2+.

www.bobhewitt.co.uk
The short answer to the question regarding installation in a subdirectory (like ./weather/ ), is "yes" with a caveat:
The relative directories cited above need to be preserved so you'd have
weather/ajax-images/
weather/alert-images/
weather/forecast/images/
weather/cache/
with weather/ containing the .css, .php, .txt, .html and a few .jpg/.gif/.png files

Also, change the ajaxWDwx.js from '/clientraw.txt' to './clientraw.txt' so the AJAX updates will work.
It is expected that weather/ would receive all the uploaded Weather-Display files (testtags.php, clientraw*.txt, etc.)

Then it should all work fine for you.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline g4mhj

  • Member
  • *
  • Posts: 39
    • WDL from Erith, Kent, UK
Re: Installing Saratoga Scripts
« Reply #6 on: July 20, 2018, 08:32:56 AM »
Thanks for the reply.
I now have all the structure as you suggested with a directory:  weather/

Currently, for whatever historical reason my WD files are directed to this structure:  pictures/WeatherDisplay/

If this can still be used what would the syntax be in ajaxWDwx.js for the clientraw.txt?  I am unfamiliar with the "./" terminology being a very old newbie !


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9278
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Installing Saratoga Scripts
« Reply #7 on: July 20, 2018, 10:40:46 AM »
I suggest two changes:
1) in ajaxWDwx.js change
Code: [Select]
var clientrawFile = '/clientraw.txt'; // location of clientraw.txt relative to this page on website[code] to [code]var clientrawFile = '/pictures/WeatherDisplay/clientraw.txt'; // location of clientraw.txt relative to this page on website

2) in Settings-weather.php change
Code: [Select]
$SITE['WXtags'] = 'testtags.php';  // for weather variables .. we're using the old name instead of WDtags.php
$SITE['ajaxScript']     = 'ajaxWDwx.js'; // for AJAX enabled display
$SITE['clientrawfile']  = 'clientraw.txt';  // directory and name of Weather-Display realtime.txt file
$SITE['graphImageDir']  = './';  // directory location for graph images with trailing /
# wxhistory.php settings
$SITE['HistoryStartYear'] = '2000';  // start year for station operation
$SITE['HistoryFilesDir']  = './';    // directory location for the [month][year].htm history files
$SITE['HistoryGraphsDir'] = './';    // directory location for the YYYYMMDD.gif graphic daily report files
to
Code: [Select]
$SITE['WXtags'] = '../pictures/WeatherDisplay/testtags.php';  // for weather variables .. we're using the old name instead of WDtags.php
$SITE['ajaxScript']     = 'ajaxWDwx.js'; // for AJAX enabled display
$SITE['clientrawfile']  = '../pictures/WeatherDisplay/clientraw.txt';  // directory and name of Weather-Display realtime.txt file
$SITE['graphImageDir']  = '../pictures/WeatherDisplay/';  // directory location for graph images with trailing /
# wxhistory.php settings
$SITE['HistoryStartYear'] = '2000';  // start year for station operation
$SITE['HistoryFilesDir']  = '../pictures/WeatherDisplay/';    // directory location for the [month][year].htm history files
$SITE['HistoryGraphsDir'] = '../pictures/WeatherDisplay/';    // directory location for the YYYYMMDD.gif graphic daily report files

That assumes that on your website, the weather/ and pictures/ directories are both directly in the document root directory of the website.
« Last Edit: July 20, 2018, 10:42:42 AM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4108
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: Installing Saratoga Scripts
« Reply #8 on: July 20, 2018, 12:40:47 PM »
Quote
I am unfamiliar with the "./" terminology being a very old newbie !

A single "dot" references the current directory. So "./" means that the file is located there.

A double dot is two levels up. ../ would mean that the file is located a level above the current.

I have to use the "./" prefix for my bash (shell) scripts on my Linux box. Otherwise it doesn't know where to look.

Greg H.


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9278
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Installing Saratoga Scripts
« Reply #9 on: July 20, 2018, 12:51:46 PM »
Minor correction.. the '../' means ONE level up from the current directory.  TWO levels up would be '../../' when navigating the filesystem or the URL path  :)
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline g4mhj

  • Member
  • *
  • Posts: 39
    • WDL from Erith, Kent, UK
Re: Installing Saratoga Scripts
« Reply #10 on: July 20, 2018, 01:11:40 PM »
And there was I thinking the ../ was a typo.

Thanks for addition explanation.

I have started the download again as I was missing the Settings-weather.php file for some reason  :eek:

I will now start to read and maybe understand any read-me files now that I have made the changes suggested.

Here is where I am up to.

http://bobhewitt.co.uk/pictures/WeatherDisplay/wxindex.php 

I hope I am on the right track now.

Many thanks



Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4108
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: Installing Saratoga Scripts
« Reply #11 on: July 20, 2018, 01:17:05 PM »
Minor correction.. the '../' means ONE level up from the current directory.  TWO levels up would be '../../' when navigating the filesystem or the URL path  :)

I get confused by the "first floor", "ground floor" thing too. That is what I meant anyways, a single level up....  :oops:

The 2nd sentence is correct, still. I think...
../ would mean that the file is located a level above the current.

Greg H.
« Last Edit: July 20, 2018, 01:19:19 PM by miraculon »


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9278
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Installing Saratoga Scripts
« Reply #12 on: July 20, 2018, 01:36:06 PM »
And there was I thinking the ../ was a typo.

Thanks for addition explanation.

I have started the download again as I was missing the Settings-weather.php file for some reason  :eek:

I will now start to read and maybe understand any read-me files now that I have made the changes suggested.

Here is where I am up to.

http://bobhewitt.co.uk/pictures/WeatherDisplay/wxindex.php 

I hope I am on the right track now.

Many thanks
Since you've installed the template set in the same directory where your Weather-Display is currently uploading files, you don't need to change Settings-weather.php at all .. the defaults for the WD Settings-weather.php assume that WD is uploading files to the same directory the template resides in.
The ajaxWDwx.js should remain as
Code: [Select]
var clientrawFile = 'clientraw.txt'; // location of clientraw.txt relative to this page on website

Just a note.. precision is important regarding file path.  You'd previously said you were installing in the weather/ directory, so my suggestions on modifications necessary to use that directory along with the pictures/WeatherDisplay directory were done.  Since you installed in the pictures/WeatherDisplay directory instead, no additional changes were needed to the defaults in the template set.

You will need to upload the contents of the WD-plugin.zip to the pictures/WeatherDisplay folder for your site to operate correctly.  Because that Settings-weather.php is missing, your site is unable to display your weather data.
« Last Edit: July 20, 2018, 01:38:36 PM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline g4mhj

  • Member
  • *
  • Posts: 39
    • WDL from Erith, Kent, UK
Re: Installing Saratoga Scripts
« Reply #13 on: July 20, 2018, 02:26:36 PM »
Ken

Sorry that I confused you with the file locations.

I did a fresh install and we now have the beginnings of a new webpage.

http://bobhewitt.co.uk/pictures/WeatherDisplay/wxindex.php

Bob


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9278
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Installing Saratoga Scripts
« Reply #14 on: July 20, 2018, 02:29:54 PM »
Excellent!

Now do the WD configuration to get your testtags.php uploading with your station's weather data and complete the template customization.

You're now off to a good start.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline g4mhj

  • Member
  • *
  • Posts: 39
    • WDL from Erith, Kent, UK
Re: Installing Saratoga Scripts
« Reply #15 on: July 20, 2018, 04:44:56 PM »
My test tags are not updating and trying as I might I cannot see where in WD they are triggered.  I'll look again tomorrow and if I cannot find it I will have to ask the WD forum.

EDIT:  Thanks to a message at the top of the Saratoga webpage I discovered the testtags.txt was missing from my WD web files.  Since adding it testtags.php is being sent to the server at 15 minute cycles.
« Last Edit: July 21, 2018, 05:26:54 AM by g4mhj »

Offline g4mhj

  • Member
  • *
  • Posts: 39
    • WDL from Erith, Kent, UK
Re: Installing Saratoga Scripts
« Reply #16 on: July 21, 2018, 07:41:52 AM »
My next question is how do I permanently remove the WXSIM comment as shown.  I didn't know what it was until I looked it up - very unlikely I will ever require it.


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9278
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Installing Saratoga Scripts
« Reply #17 on: July 21, 2018, 12:46:15 PM »
That's a simple change in Settings.php.  Change
Code: [Select]
$SITE['WXSIM'] = true;  // Set to false if you have not installed WXSIM
to
Code: [Select]
$SITE['WXSIM'] = false;  // Set to false if you have not installed WXSIM

Also, your testtags.php is showing an invalid time
Quote
$time =  '17:45 PM';   // current time
$date =  '21/7/2018';   // current date
In Weather-Display, Control Panel, Units/Other Settings, Precision Date/Time.. TAB
Untick the AM/PM checkbox since you have ticked the Use 24 Hour Clock checkbox.  One or the other should be checked, but not both.
« Last Edit: July 21, 2018, 12:53:21 PM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline g4mhj

  • Member
  • *
  • Posts: 39
    • WDL from Erith, Kent, UK
Re: Installing Saratoga Scripts
« Reply #18 on: July 21, 2018, 03:51:40 PM »
That's a simple change in Settings.php.  Change
Code: [Select]
$SITE['WXSIM'] = true;  // Set to false if you have not installed WXSIM
to
Code: [Select]
$SITE['WXSIM'] = false;  // Set to false if you have not installed WXSIM

Also, your testtags.php is showing an invalid time
Quote
$time =  '17:45 PM';   // current time
$date =  '21/7/2018';   // current date
In Weather-Display, Control Panel, Units/Other Settings, Precision Date/Time.. TAB
Untick the AM/PM checkbox since you have ticked the Use 24 Hour Clock checkbox.  One or the other should be checked, but not both.

Many thanks Ken for the WXSIM fix and for spotting my 12/24 AM/PM error.  Both now fixed.

Next task will be the Navigation !

Offline g4mhj

  • Member
  • *
  • Posts: 39
    • WDL from Erith, Kent, UK
Re: Installing Saratoga Scripts
« Reply #19 on: July 22, 2018, 06:35:59 AM »
I am now looking at the navigation and I am following your help and I am using the http://bobhewitt.co.uk/pictures/WeatherDisplay/wxindex.php?menu=test
method.

In the fly-menu-test.xml I experimented and copied a block of buttons which was successful.

I will probably want to keep some of my older WD pages from my old website but due to historical reasons these pages are in the root of my site. 

An example being www.bobhewitt.co.uk/live.htm

Can you please look at the syntax that I have added where Radar was and not the next block is duplicated for my experimentation.

<menu>
   <item caption="Home" link="wxindex.php" title="Home Page"/>
   <item wxonly="VWS" caption="Mesonet" title="Local Weather Exchange Stations" link="wxmesonet.php"/>
   <item caption="Weather Display Live">
       <item caption="WDL" link="bobhewitt.co.uk/live.htm" title="Flash Version"/>
<!--
      <item caption="GRLevel3 Radar" link="wxgr3radar.php" title="NEXRAD Radar using GRLevel3" />
-->
   </item>
<!--
      <item caption="Nearby Buoys" link="wxbuoys.php"/>
-->
   <item caption="Forecast &amp;amp; Advisories" title="Weather outlook">
      <item caption="Forecast details" link="wxforecast.php"/>
      <item caption="Advisories" link="wxadvisory.php" />
      <item caption="WXSIM Forecast details" link="wxsimforecast.php"/>
      <item caption="UV Index Forecast" link="wxuvforecast.php"/>
   </item>
   <item caption="Forecast &amp;amp; Advisories" title="Weather outlook">
      <item caption="Forecast details" link="wxforecast.php"/>
      <item caption="Advisories" link="wxadvisory.php" />
      <item caption="WXSIM Forecast details" link="wxsimforecast.php"/>
      <item caption="UV Index Forecast" link="wxuvforecast.php"/>
   </item>

I did add the full URL http://www.bobhewitt.co.uk/live.htm but as expected it brought up a new page outside of your system.  Is it possible to show external pages in the main window of your templates.

You help is so much appreciated Ken.


Offline Cutty Sark Sailor

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3394
    • Frankfort Weather - TwinHollies WeatherCenter
Re: Installing Saratoga Scripts
« Reply #20 on: July 22, 2018, 07:24:12 AM »
Forecast &amp;amp; Advisories delete amp;

for your WDL swobject display, basically create a new page using the "wxnewpage.php" template... and bring your html for the graphs content into the 'main-copy' div...
you'll have to bring in scripts, etc into the head,
Code: [Select]
?>
</head>
<body>

Code: [Select]
?>
<script type="text/javascript" src="swfobject.js"></script>
<style type="text/css">
<!--
a:link {
color: #FFFFFF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #FFFFFF;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
.style3 {
color: #0000FF;
font-size: medium;
}
-->
</style>
</head
<body>

and may have to make some size adjustments...

« Last Edit: July 22, 2018, 07:37:38 AM by Cutty Sark Sailor »
 


Offline g4mhj

  • Member
  • *
  • Posts: 39
    • WDL from Erith, Kent, UK
Re: Installing Saratoga Scripts
« Reply #21 on: July 22, 2018, 08:14:16 AM »
Thanks Cutty Sark Sailor.

I appreciate your guidance here.  Before I start why the change in Forecast &amp;amp; Advisories delete amp;

I didn't intentionally change another thing from the original download.
 
[I live just a few miles to the Cutty Sark Tea Clipper in dry dock in Greenwich, London and I initially thought you were from there].

Very steep learning curve being undertaken here with the occasional fall back :(

Bob..

Offline Cutty Sark Sailor

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3394
    • Frankfort Weather - TwinHollies WeatherCenter
Re: Installing Saratoga Scripts
« Reply #22 on: July 22, 2018, 08:35:42 AM »
...why the change in Forecast &amp;amp; Advisories delete amp;
Bob..
Oh... i wasn't thinking XML... which will parse &amp;amp; as '&" and the HTML will validate...I was locked for some reason into visualizing a rendering as "Forecast & amp; Advisories"
My bad...

Yeah, I've used "Cutty" as a handle for 50 years... I ordered enough Cutty Sark in previous years I claimed title to a main mast and part of the deck, which I spent considerable time admiring, face down... :-"
« Last Edit: July 22, 2018, 08:37:18 AM by Cutty Sark Sailor »
 


Offline g4mhj

  • Member
  • *
  • Posts: 39
    • WDL from Erith, Kent, UK
Re: Installing Saratoga Scripts
« Reply #23 on: July 22, 2018, 11:22:43 AM »
Plenty yet to plan and do but there is one thing that I can't quite work out.

Here in the UK we prefer units of MPH, mm, hPa and Celsius.

My main page has everything correct except the mph.  The Gust Month shows mph and the Today: above shows km/h.

I have noticed that if I refresh the colour choices and click on Set the 'Today' figure shows mph until the clientraw refreshes when it reverts to km/h. This is also apparent when the page is initially opened.

Could this be a WD setting issue?

My Settings.php is shown below.

// world Settings
$SITE['WDdateMDY'] = false; // for weather software date format of month/day/year.  =false for day/month/year
$SITE['uomTemp'] = '&deg;C';  // ='&deg;C', ='&deg;F'
$SITE['uomBaro'] = ' hPa';    // =' hPa', =' mb', =' inHg'
$SITE['uomWind'] = ' mph';   // =' km/h', =' kts', =' m/s', =' mph'
$SITE['uomRain'] = ' mm';     // =' mm', =' in'
$SITE['uomSnow'] = ' cm';     // =' cm', =' in'
$SITE['uomDistance'] = ' km';  // or ' miles' -- used for Wind Run display
$SITE['uomPerHour'] = '/hr';

http://bobhewitt.co.uk/pictures/WeatherDisplay/wxindex.php

Bob
« Last Edit: July 22, 2018, 11:41:13 AM by g4mhj »

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9278
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Installing Saratoga Scripts
« Reply #24 on: July 22, 2018, 03:04:21 PM »
If it looks like the wind display is in MPH when the page first loads, and then switches to km/h when the AJAX refresh happens, then your Settings.php is correct as-is.  What needs to change is ajaxWDwx.js script
Code: [Select]
var useMPH   = false;       // set to true to force MPH for both English and Metric units
to
Code: [Select]
var useMPH   = true;       // set to true to force MPH for both English and Metric units
  That will keep the rest of the units in metric and force the wind to display in MPH.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

 

anything