Author Topic: Saratoga templates and Steel Series Gauges .. now fully work  (Read 7792 times)

0 Members and 1 Guest are viewing this topic.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9298
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Saratoga templates and Steel Series Gauges .. now fully work
« on: February 05, 2013, 11:30:33 PM »
Having read and responded to many concerns about using Mark's awesome Steel Series Gauges with the current Saratoga template set, I did a bit of 'shim' coding and can now announce that we can have our cake and eat it too :)

I did modifications to 3 files folks normally do not configure (common.php, flyout-menu.php, include-style-switcher.php) and unfortunately to two that are normally configured (top.php, footer.php) and together they comprise a dynamic UTF-8 on-the-fly conversion for the existing ISO-8859-n translation files (.txt, .js) and allow full HTML5 validation.

I have also included in the CU-plugin, VWS-plugin, and WD-plugin a sample wxssgauges.php template page that only requires configuration to point to where you have placed your Steel Series Gauges files.  The page uses a slightly modified gauges-ss-basic.htm file (as gauges-ss-basic-inc.php ) which Mark will be including in his distribution of the Gauges (also attached below for those who can't wait).

Languages supported by the Gauges will automatically be enabled when the template language changes by user option.  English will be the default for languages not yet available for the Gauges.

Since this wxssgauges.php page emits HTML5/UTF-8, the full features of the Steel Series Gauges are operational, and no mouseover image clipping is done (unlike my prior <iframe> recommendation).

Pick up the needed files from the update tool page using 05-Feb-2013 as the query date.  Since the Gauges currently have support for Cumulus, VWS and Weather-Display, only those plugins will have the wxssgauges.php file in them.

Don't forget to add the attached file as gauges-ss-basic-inc.php to your Steel Series directory to make it all work.  Mark will include that file in a future release of the Gauges.

Enjoy, and 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 cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #1 on: February 06, 2013, 12:56:46 AM »
I'm using the old version of the gauges as seen here http://www.hayskansasweather.com/gauges-ss.php . Will I have problems?

« Last Edit: February 06, 2013, 01:01:31 AM by hayskswx »




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Amcrest HD IP Camera

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #2 on: February 06, 2013, 04:04:51 AM »
Hi Ken,

Running fine at http://tiggrweather.net/wxssgauges.php.

As always, thank you for all the extra effort you continue to put into this. Most appreciated.
« Last Edit: February 07, 2013, 09:23:49 PM by jgillett »
John
W7JKG

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #3 on: February 28, 2013, 07:30:37 AM »
Weathergirl and I have had validation problems even with the modified Steel Series Gauges scripts.  It turns out that our web hosts spit out the actual degree character, '°', rather than '&deg;' while rendering the ajaxGizmo.  This causes validator.w3.org to choke on the now non-UTF-8 compliant code.  My web host is GoDaddy and I'm on PHP 5.2.17 if that's pertinent.  Turning off the ajaxGizmo in wxssgauges.php solves the problem, and the ajaxGizmo is somewhat redundant on this page given that the Steel Series Gauges provide the same real-time information.  Still...I'm curious as to why this occurs.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9298
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #4 on: February 28, 2013, 06:14:19 PM »
Hi Jerry,

To help diagnose the issue, could you make a copy of the wxssgauges.php page to a new name, enable the gizmo and give me the URL so I could have a look at what is returning?

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 gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #5 on: February 28, 2013, 06:40:00 PM »
Interesting!!!  I just created a gizmo-enabled wxssgauges_gizmo.php, loaded it, and it validated!

So, sorry, Ken, it's somehow gone away today, who knows if it's to stay. :-)

I checked the source, and there are no strange characters present, just '&deg;' instead.  I've enabled the gizmo in wxssgauges.php.

Thanks, Ken.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9298
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #6 on: February 28, 2013, 08:09:06 PM »
 :shock:  :? Very odd, Jerry .. I could find no Apache mod/directive that would cause a HTML entity code to automatically be converted to UTF-8 instead of just being emitted as the HTML entity code (which would be the logical cause) -- PHP doesn't work on stuff outside the <?php and ?> markers in the source page, and treats the rest of the stuff a just plain characters to be passed along by the webserver.

Glad it is validating now (as it should have), but.. no clue about what the temporary issue was caused by.

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 gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #7 on: February 28, 2013, 11:15:25 PM »
Thanks for looking, Ken.  I appreciate it.

All the best,
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline sbuckler

  • Senior Member
  • **
  • Posts: 92
    • Harwich, MA Weather
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #8 on: March 17, 2013, 03:42:45 PM »
I think this issue just popped up for me.  I went to validate my gauges page and it was unable to validate because of this line:

<span class="ajax" id="gizmotemprate">-1.6 �F/last hr</span>

Error report is:
Sorry, I am unable to validate this document because on line 229 it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication.
The error was: utf8 "\xB0" does not map to Unicode


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9298
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #9 on: March 17, 2013, 04:01:13 PM »
It's an issue with WD using the ISO-8859-1 degree sign (which is not converted).

Change ajax-gizmo.php
Code: [Select]
if(isset($tempchangehour)) {
echo $tempchangehour;
} ?></span>
to
Code: [Select]
if(isset($tempchangehour)) {
echo gizmo_strip_units($tempchangehour).$uomTemp;
} ?></span>
and that should fix the issue.

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 Weather Display

  • Forecaster
  • *****
  • Posts: 2611
    • West Coast Road Weather Data
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #10 on: March 17, 2013, 04:35:04 PM »
if you unset to show units in the custom web page setup in the webfiles/web page setup, in WD, that degree symbol will not be there
Brian
info@weather-display.com
http://www.weather-display.com

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9298
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #11 on: March 17, 2013, 04:35:30 PM »
I've just done an update to ajax-gizmo.php V1.14 to fix the issue.

Use: http://saratoga-weather.org/wxtemplates/updates.php (17-Mar-2013, Base-*) to get the fix

I should have included the gizmo_strip_units() call in the original code anyway  #-o

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 meteosanjuan

  • Senior Member
  • **
  • Posts: 60
    • Meteosanjuan
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #12 on: January 09, 2024, 04:34:43 AM »
Call me clumsy if you want, I come to ask when I have already searched the forum for possible solutions. Unfortunately I haven't found them. I have added this option to my website:

https://www.meteosanjuan.com/wxssgauges.php

but I can't get it to work. It seems to be configured for Virtual Weather Station and I suppose that is the fault because I have a weather display, but I have looked at the scripts and I don't see how to configure it.

It is not ruled out that due to my clumsiness I discarded the wrong scripts.

Ideas? Thank you

Offline hcorrin

  • Contributor
  • ***
  • Posts: 136
    • Ballaugh Weather
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #13 on: January 09, 2024, 12:10:58 PM »
You should have weather display creating and uploading a customclientraw.txt file to your site   
In the gauges folder on your site there is a script sub folder in it look for the gauge.js file then in that file around line 68 enter the path to the customclientraw.txt

Offline meteosanjuan

  • Senior Member
  • **
  • Posts: 60
    • Meteosanjuan
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #14 on: January 09, 2024, 02:47:21 PM »
You should have weather display creating and uploading a customclientraw.txt file to your site   
In the gauges folder on your site there is a script sub folder in it look for the gauge.js file then in that file around line 68 enter the path to the customclientraw.txt

Hello

Definitely more than clumsy. I do not get it. I have changed two things, one the program and the other the custom route. Can you help me?

Offline hcorrin

  • Contributor
  • ***
  • Posts: 136
    • Ballaugh Weather
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #15 on: January 09, 2024, 06:01:46 PM »
try ../customclientraw.txt ,  I am assuming the customclientraw.txt is in the route folder

Offline meteosanjuan

  • Senior Member
  • **
  • Posts: 60
    • Meteosanjuan
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #16 on: January 10, 2024, 02:31:46 AM »
try ../customclientraw.txt ,  I am assuming the customclientraw.txt is in the route folder

Unfortunately it still doesn't work even with the proposed route.

Download from the following repository: https://github.com/jkozik/saratoga/tree/master/ssg

Anything else to check?
« Last Edit: January 10, 2024, 02:34:24 AM by meteosanjuan »

Offline ConligWX

  • Forecaster
  • *****
  • Posts: 843
  • #conligwx
    • conligwx.org
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #17 on: January 10, 2024, 03:25:51 AM »
try ../customclientraw.txt ,  I am assuming the customclientraw.txt is in the route folder

Unfortunately it still doesn't work even with the proposed route.

Download from the following repository: https://github.com/jkozik/saratoga/tree/master/ssg

Anything else to check?

the repo I have always used is here:

https://github.com/mcrossley/SteelSeries-Weather-Gauges
Regards Simon
Davis Vantage Pro2 Plus (6162UK) • Daytime FARS • WeatherLink Live • AirLink • PurpleAir PA-II-SD • CumulusMX •


Offline meteosanjuan

  • Senior Member
  • **
  • Posts: 60
    • Meteosanjuan
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #18 on: January 10, 2024, 04:25:44 AM »

the repo I have always used is here:

https://github.com/mcrossley/SteelSeries-Weather-Gauges
Am I supposed to place the folders exactly as they appear there?

Thank you

Offline hcorrin

  • Contributor
  • ***
  • Posts: 136
    • Ballaugh Weather
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #19 on: January 10, 2024, 06:18:05 AM »
Put the gauges folder in the root directory and contents should  look similar to the attached I opened the readme and moved it to the weather display part which is also shown
« Last Edit: January 10, 2024, 06:21:16 AM by hcorrin »

Offline meteosanjuan

  • Senior Member
  • **
  • Posts: 60
    • Meteosanjuan
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #20 on: January 10, 2024, 02:45:16 PM »
Well, there is no way, it is clear that due to ignorance I am not doing something right.

I use Ken's script https://www.meteosanjuan.com/wxssgauges.php which in effect uses an ssg folder where Steel Series Gauges is.

From https://www.meteosanjuan.com/ssg/gauges-ss-basic-inc.php he doesn't either.

In short, I can't get it to work, despite having placed and configured what you tell me.

I don't know what else I can do, I've already tried everything. More suggestions?

Offline chief-david

  • Educational Weather
  • Forecaster
  • *****
  • Posts: 2846
  • Space Academy for Educators
    • Benilde-St. Margaret's Weather
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #21 on: January 10, 2024, 03:13:36 PM »
I could never get them to work. it is all my fault because I do not have the programming knowledge of others.



You can't phase me-I teach Middle School.
It's not you-It's WU.

Offline meteosanjuan

  • Senior Member
  • **
  • Posts: 60
    • Meteosanjuan
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #22 on: January 10, 2024, 03:57:03 PM »
El problema estaba en wxssgauges.php:

$ssgDir = './ssg/'; // set to relative directory location of the SteelSeries gauge directory

Ahora:

$ssgDir = '../ssg/'

Well I'm getting closer and what's wrong now is that it indicates that customclientraw needs to be updated. I have viewed the file and of course it is...

https://www.meteosanjuan.com/wxssgauges.php

What can be?
« Last Edit: January 10, 2024, 04:23:41 PM by meteosanjuan »

Offline ConligWX

  • Forecaster
  • *****
  • Posts: 843
  • #conligwx
    • conligwx.org
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #23 on: January 10, 2024, 04:33:21 PM »

the repo I have always used is here:

https://github.com/mcrossley/SteelSeries-Weather-Gauges
Am I supposed to place the folders exactly as they appear there?

Thank you

the only folders and file you should need would be the web server on

https://github.com/mcrossley/SteelSeries-Weather-Gauges/tree/master/web_server
Regards Simon
Davis Vantage Pro2 Plus (6162UK) • Daytime FARS • WeatherLink Live • AirLink • PurpleAir PA-II-SD • CumulusMX •


Offline meteosanjuan

  • Senior Member
  • **
  • Posts: 60
    • Meteosanjuan
Re: Saratoga templates and Steel Series Gauges .. now fully work
« Reply #24 on: January 10, 2024, 04:39:09 PM »

the only folders and file you should need would be the web server on

https://github.com/mcrossley/SteelSeries-Weather-Gauges/tree/master/web_server

That's how I have it, it was a route problem. Now the error is that it tells me that customclientraw.txt is not updated when it is. I am certainly desperate

https://www.meteosanjuan.com/wxssgauges.php