Author Topic: DarkSky forecast script - multilingual for standalone/Saratoga templates  (Read 1536 times)

0 Members and 1 Guest are viewing this topic.

Offline ConligWX

  • Forecaster
  • *****
  • Posts: 361
  • #conligwx
    • conligwx.org
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #25 on: January 24, 2019, 03:14:00 AM »
Hi Ken.

Not sure what I have done, but my forecasts are not tabbed. just a "link" to the Daily/Hourly forecasts and both are shown on the same page.

https://www.conligwx.org/wxforecast.php

https://www.conligwx.org/DS-forecast.php

I've used a default DS-forecast (base) and only added my api key. its still the same. also an added "?>" appears at top of screen when calling DS-forecast.php directly.

 [ You are not allowed to view attachments ]
« Last Edit: January 24, 2019, 04:27:30 AM by ConligWX »

Offline smokie

  • Member
  • *
  • Posts: 33
    • Newquay Cornwall. UK
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #26 on: January 24, 2019, 06:18:56 AM »
I get the same too, no tab, and links
Newquay, Cornwall.UK  > WS2300 Operational since May 2007. New home from 6/4/08 www.newquayweather.com

Offline ConligWX

  • Forecaster
  • *****
  • Posts: 361
  • #conligwx
    • conligwx.org
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #27 on: January 24, 2019, 08:12:15 AM »
Thanks for confirming.

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1312
    • My PWS at Leuven Belgium Europe
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #28 on: January 24, 2019, 09:06:31 AM »
Thanks for confirming.
A small piece containing the CSS seems to be not available, is hould have been at the extra " ? >"
I added it in, please try this one

Wim

Development and maintenance of Leuven-Template&Scripts  at: https://support.leuven-template.eu/
Support for the HWS-template for WD http://wd34.weather-template.com/  Demo http://wd34.weather-template.com/pwsWD/
My PWS at home https://weer.sluispark.be/
And at my daughters house https://www.weerstation-herent.be/

Offline ConligWX

  • Forecaster
  • *****
  • Posts: 361
  • #conligwx
    • conligwx.org
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #29 on: January 24, 2019, 09:31:11 AM »
Thanks for the file wim. worked a treat!

Offline smokie

  • Member
  • *
  • Posts: 33
    • Newquay Cornwall. UK
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #30 on: January 24, 2019, 09:55:34 AM »
Thank you for the fix, Wim
Working now
Newquay, Cornwall.UK  > WS2300 Operational since May 2007. New home from 6/4/08 www.newquayweather.com

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6989
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #31 on: January 24, 2019, 10:45:14 AM »
Oops!  :oops:  #-o
Thanks Wim,  =D> I've updated the distribution with the missing CSS for the tabber.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Theo

  • Member
  • *
  • Posts: 38
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #32 on: January 24, 2019, 02:26:58 PM »
I have the same problem, but the updated file is not solving it for me.  I did create the wxdsforecast.php as Ken suggested:

<?php
############################################################################
#       This document uses Tab 4 Settings
############################################################################
require_once("Settings.php");
require_once("common.php");
############################################################################
$TITLE = langtransstr($SITE['organ']) . " - " .langtransstr('Sample Blank Page');
$showGizmo = true;  // set to false to exclude the gizmo
include("top.php");
############################################################################
?>
</head>
<body>
<?php
############################################################################
include("header.php");
############################################################################
include("menubar.php");
############################################################################
?>

<div id="main-copy">

  <?php
                 $doIncludeDS  = true; // handle DS-forecast include
                 include_once('DS-forecast.php'); ?>

</div><!-- end main-copy -->

<?php
############################################################################
include("footer.php");
############################################################################
# End of Page
############################################################################
?>

Any ideas?  If I directly hit DS-forecast.php it works, just not within this wrapper.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6989
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #33 on: January 24, 2019, 02:35:29 PM »
Yes.. the missing ingredient is the CSS to control the tabber/tabs display.

For wxdsforecast.php try
Code: [Select]
<?php
############################################################################
#       This document uses Tab 4 Settings
############################################################################
require_once("Settings.php");
require_once(
"common.php");
############################################################################
$TITLE langtransstr($SITE['organ']) . " - " .langtransstr('Sample Blank Page');
$showGizmo true;  // set to false to exclude the gizmo
include("top.php");
############################################################################
?>

<style type="text/css">
/*--------------------------------------------------
  tabbertab
  --------------------------------------------------*/
/* $Id: example.css,v 1.5 2006/03/27 02:44:36 pat Exp $ */

/*--------------------------------------------------
  REQUIRED to hide the non-active tab content.
  But do not hide them in the print stylesheet!
  --------------------------------------------------*/
.tabberlive .tabbertabhide {
 display:none;
}

/*--------------------------------------------------
  .tabber = before the tabber interface is set up
  .tabberlive = after the tabber interface is set up
  --------------------------------------------------*/
.tabber {
}
.tabberlive {
 margin-top:1em;
}

/*--------------------------------------------------
  ul.tabbernav = the tab navigation list
  li.tabberactive = the active tab
  --------------------------------------------------*/
ul.tabbernav
{
 margin:0 0 3px 0;
 padding: 0 3px ;
 border-bottom: 0px solid #778;
 font: bold 12px Verdana, sans-serif;
}

ul.tabbernav li
{
 list-style: none;
 margin: 0;
 min-height:40px;
 display: inline;
}

ul.tabbernav li a
{
 padding: 3px 0.5em;
min-height: 40px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
 margin-left: 3px;
 border: 1px solid #778;
 border-bottom: none;
 background: #DDE  !important;
 text-decoration: none !important;
}

ul.tabbernav li a:link { color: #448  !important;}
ul.tabbernav li a:visited { color: #667 !important; }

ul.tabbernav li a:hover
{
 color: #000;
 background: #AAE !important;
 border-color: #227;
}

ul.tabbernav li.tabberactive a
{
 background-color: #fff !important;
 border-bottom: none;
}

ul.tabbernav li.tabberactive a:hover
{
 color: #000;
 background: white !important;
 border-bottom: 1px solid white;
}

/*--------------------------------------------------
  .tabbertab = the tab content
  Add style only after the tabber interface is set up (.tabberlive)
  --------------------------------------------------*/
.tabberlive .tabbertab {
 padding:5px;
 border:0px solid #aaa;
 border-top:0;
overflow:auto;

}

/* If desired, hide the heading since a heading is provided by the tab */
.tabberlive .tabbertab h2 {
 display:none;
}
.tabberlive .tabbertab h3 {
 display:none;
}
</style>
</head>
<body>
<?php
############################################################################
include("header.php");
############################################################################
include("menubar.php");
############################################################################
?>


<div id="main-copy">

  <?php
                 $doIncludeDS  
true// handle DS-forecast include
                 
include_once('DS-forecast.php'); ?>


</div><!-- end main-copy -->

<?php
############################################################################
include("footer.php");
############################################################################
# End of Page
############################################################################
?>

Unfortunately, due to HTML restrictions, all <style> entries have to be in the <head>..</head> area of the page, and with the include for DS-forecast.php in the <body>..</body> there wasn't a way to do that.

When DS-forecast.php is run standalone (with a valid configuration in the settings area), it will have the proper CSS.  All including() pages have to have the added CSS inserted in them to display correctly.

The good news is the tabber JavaScript is automatically emitted into the page (since <script> can appear anywhere), so there's no extra file to worry about.

Hope this helps.. I'll update the script page docs with the note about the needed CSS in including pages.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Theo

  • Member
  • *
  • Posts: 38
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #34 on: January 24, 2019, 02:40:02 PM »
That worked perfectly, thanks again!  Great product with great support!

Offline cheffy

  • Member
  • *
  • Posts: 10
    • Mickleham Weather
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #35 on: January 26, 2019, 11:57:38 PM »
Hi,

I have just installed the new darksky forecast and it working great - thanks.

I do have a question, 2 of my days in the forecast are showing night icons.  Is there a reason for this, or is this something I have done?

The link to my site is,

https://micklehamweather.com/wxforecast.php

Thanks,
Neil


Offline ConligWX

  • Forecaster
  • *****
  • Posts: 361
  • #conligwx
    • conligwx.org
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #36 on: January 27, 2019, 05:43:06 AM »
Neil,  looks like you are also missing a few of the icons, since they are not being displayed. if you select a town from the dropdown some of them have missing forecast icons.

Tried refreshing browser cache but it didnt make a difference.


I then seen that it seems to be your calling http:// and not https:// on the script somewhere and it was being hidden from my view. once I allowed unsafe script in chrome I was able to see the icons correctly.
« Last Edit: January 27, 2019, 12:02:18 PM by ConligWX »

Online sacreyweather

  • Echo Valley Weather
  • Forecaster
  • *****
  • Posts: 1712
    • Echo Valley Weather
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #37 on: January 27, 2019, 08:12:23 AM »
Thank you, Ken!!!!! Awesome script, Sir!!!!

Working here.

John
CWOP: D2073, GR2AE, GR3, Cumulus, PWSweather,  CoCoRaHS: AR-SL-23  

Saline Weather on Twitter
Blitzortung Station 1387

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6989
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #38 on: January 27, 2019, 05:03:10 PM »
Hi,

I have just installed the new darksky forecast and it working great - thanks.

I do have a question, 2 of my days in the forecast are showing night icons.  Is there a reason for this, or is this something I have done?

The link to my site is,

https://micklehamweather.com/wxforecast.php

Thanks,
Neil


For some strange and inscrutable reason, DarkSky will sometimes specify an icon=partly-cloudy-night instead of partly-cloudy-day .. I don't know why, but.. they get to pick the icon to use, I just translate it to one of the Saratoga icons (based on the NOAA/NWS set).

You do seem to be missing the newer wind_*.jpg icons from your set.  You can download https://saratoga-weather.org/saratoga-icons-addon-2015.zip and https://saratoga-weather.org/saratoga-icons-addon-2017.zip to bring your set up-to-date. Or.. the complete, current set at https://saratoga-weather.org/saratoga-icons2.zip
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6989
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #39 on: January 27, 2019, 05:04:41 PM »
Thank you, Ken!!!!! Awesome script, Sir!!!!

Working here.

John
Nicely styled, John.  I like your presentation.
Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline cheffy

  • Member
  • *
  • Posts: 10
    • Mickleham Weather
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #40 on: January 28, 2019, 12:49:17 AM »
Quote
For some strange and inscrutable reason, DarkSky will sometimes specify an icon=partly-cloudy-night instead of partly-cloudy-day .. I don't know why, but.. they get to pick the icon to use, I just translate it to one of the Saratoga icons (based on the NOAA/NWS set).

Thanks for the explanation Ken.

I have also updated my icons.

Neil

Offline ConligWX

  • Forecaster
  • *****
  • Posts: 361
  • #conligwx
    • conligwx.org
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #41 on: February 07, 2019, 08:33:02 AM »
I getting an issue with this script on the wxforecast.php page where meteoalarm is showing two alerts, when I click on the alerts it takes me to the Northern Ireland page but there are NO warnings.

my own script in the dashboard shows no warnings too so where is DS-forecast getting the information from?

 [ You are not allowed to view attachments ]

 [ You are not allowed to view attachments ]

 [ You are not allowed to view attachments ]


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6989
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #42 on: February 07, 2019, 11:38:30 AM »
The bottom of the DarkSky forecast page shows the sources of the data for that forecast.  For Europe, I believe that Meteoalarm.eu data is used, BUT I don't know how often they collect that data and insert it into the forecast for that point.  For the USA, they use the NOAA/NWS, for Canada they use Environment Canada.  I'm not sure what they use for the other countries.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline ConligWX

  • Forecaster
  • *****
  • Posts: 361
  • #conligwx
    • conligwx.org
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #43 on: February 07, 2019, 03:36:13 PM »
I take it then there is no way of turning this off.

its ok I removed the alerts section of Darksky since it doesnt work
« Last Edit: February 07, 2019, 04:10:47 PM by ConligWX »

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6989
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #44 on: February 07, 2019, 04:40:03 PM »
I'm sorry there wasn't a built-in switch to turn off display of the warnings.  You can suppress them by changing
Code: [Select]
<?php
  
if ($DSforecastwarnings <> '') {
to
Code: [Select]
<?php
  
if (false and $DSforecastwarnings <> '') {
as the easiest disable in the current codeset.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline mkutche

  • Forecaster
  • *****
  • Posts: 839
    • GosportWx.com
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #45 on: February 07, 2019, 07:21:58 PM »
http://gosportwx.com/wxdsforecast.php the text looks like it over laps how would i fix this?
Mike K.
WS2080 - Cumulus MX v3.0.0
Gosport, Indiana
Gosportwx.com Gosportwx.com/PWS/ Gosportwx.com/j-template/ twitter.com/GosportINWX facebook.com/GosportINWX
-----------------------------------------------------------

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6989
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #46 on: February 07, 2019, 08:41:06 PM »
Can you post an annotated image of what is overlapping?  I'm looking at your page now, and I'm not seeing any overlaps...
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline mkutche

  • Forecaster
  • *****
  • Posts: 839
    • GosportWx.com
Re: DarkSky forecast script - multilingual for standalone/Saratoga templates
« Reply #47 on: February 07, 2019, 10:56:11 PM »
I'm not seeing it either now.. If I see it again i will post.
Mike K.
WS2080 - Cumulus MX v3.0.0
Gosport, Indiana
Gosportwx.com Gosportwx.com/PWS/ Gosportwx.com/j-template/ twitter.com/GosportINWX facebook.com/GosportINWX
-----------------------------------------------------------