Author Topic: New Saratoga AJAX/PHP template plugin for WeatherCat now available  (Read 110598 times)

jf-i2r

  • Strong Breeze
  • ***
  • Posts: 150
  • Station Details: vantage pro2 wireless with solar sensor ; weatherlink-ip ;mac mini 1,6ghz 2go ram El Capitan
Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
« Reply #60 on: October 31, 2014, 10:46:50 AM »
hi Ken

since the update for WU-forecast.php i've this message : Warning: Division by zero in /home/jfi2r/www/WU-forecast.php on line 790

my check-fetch-times.php : all is update http://www.jf-i2r.com/check-fetch-times.php?show=versions

is it a problem with WU ?

thks

jean fred
There has been another change in the WU pages and Ken is rewriting the scripts.
Discussions on
http://www.weather-watch.com/smf/index.php/topic,61907
http://www.wxforum.net/index.php?topic=24217

Wim

thanks Wim  [tup]

jf-i2r

  • Strong Breeze
  • ***
  • Posts: 150
  • Station Details: vantage pro2 wireless with solar sensor ; weatherlink-ip ;mac mini 1,6ghz 2go ram El Capitan
Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
« Reply #61 on: November 01, 2014, 08:04:50 AM »
hi

update script    WU-forecast.php (ML) Version 3.00 - 31-Oct-2014 

i create a ID key

i modify the settings.php

Quote
add to Settings.php a line with:
//    $SITE['WUAPIkey'] = 'your-api-key-here';

i think all is ok  [tup]

Quote
// Settings ---------------------------------------------------------------
//REQUIRED: a WU API KEY.. sign up at http://www.wunderground.com/weather/api/
$WUAPIkey = '1xxxxxxxxxxxxxx1'; // use this only for standalone / non-template use
// NOTE: if using the Saratoga template, add to Settings.php a line with:
//    $SITE['WUAPIkey'] = 'your-api-key-here';
// and that will enable the script to operate correctly in your template
//
$iconDir ='./forecast/images/';   // directory for carterlake icons './forecast/images/'
$iconType = '.jpg';            // default type='.jpg'
//                                  use '.gif' for animated icons from http://www.meteotreviglio.com/
//$iconDir ='';               // set to '' to use the Wunderground icons instead
//
//
$WU_URL = 'http://www.wunderground.com/cgi-bin/findweather/getForecast?query=46.15261459,-1.33283246&sp=IPOITOUC29';
//
// The optional multi-city forecast .. make sure the first entry is for the $WU_URL location
// The contents will be replaced by $SITE['WUforecasts'] if specified in your Settings.php

/*

$WUforecasts = )
 // Location|forecast-URL  (separated by | characters)
'Saratoga|http://www.wunderground.com/cgi-bin/findweather/getForecast?query=95070',

thanks Ken  [cheers1]

jean fred

wvdkuil

  • Strong Breeze
  • ***
  • Posts: 151
    • DW8113 (D8113)
    • IVLAAMSG47
    • Weatherstation Wilsele/Leuven/Belgium
  • Station Details: VantagePro2+ UV,Solar - Macbook/Mini
Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
« Reply #62 on: November 01, 2014, 08:37:48 AM »
hi

update script    WU-forecast.php (ML) Version 3.00 - 31-Oct-2014 

i create a ID key

i modify the settings.php

Quote
add to Settings.php a line with:
//    $SITE['WUAPIkey'] = 'your-api-key-here';
i'm not sure if the forecast use my WU account
it uses your ID, otherwise nothing should be shown
Quote
and the forecast is only in english ,
Your forecast is in any language you want
Spanish: http://www.jf-i2r.com/wxforecast.php?lang=es
French:  http://www.jf-i2r.com/wxforecast.php?lang=fr

Quote
idon't find to setup in french .... if you've an idea  :)

. . . shortened . . .
thanks

jean fred
There is a separate thread for this new script on this forum:

http://athena.trixology.com/index.php?topic=1451.msg12216;topicseen#msg12216

Wim
Support of Leuven-Template&Scripts: https://support.leuven-template.eu/
Support and demo for the PWS_Dashboard (also for WeatherCat)  https://pwsdashboard.com/ 
My PWS at home https://weer.sluispark.be/
And at my daughters house https://www.weerstation-herent.be/

jf-i2r

  • Strong Breeze
  • ***
  • Posts: 150
  • Station Details: vantage pro2 wireless with solar sensor ; weatherlink-ip ;mac mini 1,6ghz 2go ram El Capitan
Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
« Reply #63 on: November 01, 2014, 09:03:50 AM »
thanks Wim all is ok now  [tup]

iccb

  • Gentle Breeze
  • **
  • Posts: 71
    • S??tilanne Eurassa
  • Station Details: Mac Mini (late 2018), Davis Vantage Pro2
Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
« Reply #64 on: December 16, 2014, 12:42:01 PM »
Somethink is wrong on my website, the moon times not update in wxastronomy page...
Any suggest, what to do?
http://kauttua.net/wxastronomy.php

wvdkuil

  • Strong Breeze
  • ***
  • Posts: 151
    • DW8113 (D8113)
    • IVLAAMSG47
    • Weatherstation Wilsele/Leuven/Belgium
  • Station Details: VantagePro2+ UV,Solar - Macbook/Mini
Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
« Reply #65 on: December 16, 2014, 01:00:59 PM »
Somethink is wrong on my website, the moon times not update in wxastronomy page...
Any suggest, what to do?
http://kauttua.net/wxastronomy.php
For one reason or another the script thinks you are using Weatherdisplay, not WeahterCat. 
Your setting $SITE['WXsoftware']     = 'WCT';   in Settings-weather.php is correct, that is not the problem.

But runnnig the script with debug: http://kauttua.net/wxastronomy.php?debug=y  displays a lot of  errors.  Those errors in line 77,  79 and so on come from the piece of code in the script which is specific for WeatherDisplay.

Maybe an unintentional change somewhere?
At least check line 74 in wxastronomy.php it should read:
if(isset($SITE['WXsoftware']) and $SITE['WXsoftware'] == 'WD') {

Succes, Wim
Support of Leuven-Template&Scripts: https://support.leuven-template.eu/
Support and demo for the PWS_Dashboard (also for WeatherCat)  https://pwsdashboard.com/ 
My PWS at home https://weer.sluispark.be/
And at my daughters house https://www.weerstation-herent.be/

iccb

  • Gentle Breeze
  • **
  • Posts: 71
    • S??tilanne Eurassa
  • Station Details: Mac Mini (late 2018), Davis Vantage Pro2
Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
« Reply #66 on: December 16, 2014, 05:34:44 PM »
Somethink is wrong on my website, the moon times not update in wxastronomy page...
Any suggest, what to do?
http://kauttua.net/wxastronomy.php
For one reason or another the script thinks you are using Weatherdisplay, not WeahterCat. 
Your setting $SITE['WXsoftware']     = 'WCT';   in Settings-weather.php is correct, that is not the problem.

But runnnig the script with debug: http://kauttua.net/wxastronomy.php?debug=y  displays a lot of  errors.  Those errors in line 77,  79 and so on come from the piece of code in the script which is specific for WeatherDisplay.

Maybe an unintentional change somewhere?
At least check line 74 in wxastronomy.php it should read:
if(isset($SITE['WXsoftware']) and $SITE['WXsoftware'] == 'WD') {

Succes, Wim

Hi Wim,

Super THX to U Wim! That change corrected the times!  [cheers1]  [tup]

marzio2515

  • Gentle Breeze
  • **
  • Posts: 24
    • IMARCHEU3
  • Station Details: WeaherHawk 600 series
Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
« Reply #67 on: January 15, 2015, 05:07:27 PM »
Hello everyone,

i notice this problem when clicking in the status link of main pages of saratoga template (take a look at the attached file)


what can i do to solve the issue??

saratogaWX

  • Strong Breeze
  • ***
  • Posts: 156
  • Weather website programming enthusiast
    • Saratoga-Weather.org
  • Station Details: Davis VP1 +, iMAC 21, OSX 10.6.8
Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
« Reply #68 on: January 15, 2015, 06:20:49 PM »
This is usually caused by a mismatch in the date format inside the tags file (created by WeatherCat) and the Settings.php $SITE['WDdateMDY'] setting.

The templates expect dates in either of two formats:

$SITE['WDdateMDY'] = true;   for dates like mm/dd/yyyy format

$SITE['WDdateMDY'] = false: for dates like dd/mm/yyyy format

Note that the dates MUST be in one or the other format, and that yyyy-mm-dd or mm.dd.yyyy formats are not currently supported.

It would help to have the URL to your website showing the issue .. add it to a post, or better yet, put it in your forum profile so future questions could be addressed better.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub, WeatherSnoop, WeatherCat
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

marzio2515

  • Gentle Breeze
  • **
  • Posts: 24
    • IMARCHEU3
  • Station Details: WeaherHawk 600 series
Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
« Reply #69 on: January 15, 2015, 07:04:28 PM »
Hi Ken,

Here is the link to the status page:

  http://www.urbaniameteo.it/saratoga/wxstatus.php

Thanks for your help...

Bye
Marzio

saratogaWX

  • Strong Breeze
  • ***
  • Posts: 156
  • Weather website programming enthusiast
    • Saratoga-Weather.org
  • Station Details: Davis VP1 +, iMAC 21, OSX 10.6.8
Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
« Reply #70 on: January 15, 2015, 07:41:17 PM »
The $date field (used to check the 'current/not current' status) is derived from WCTtags.php
Code: [Select]
$WX['da'] = '01/15/15'; // Date in the format of month/day/year
and processed in WCT-defs.php by
Code: [Select]
$date = $WX['da'];

The entry in your Settings.php
Code: [Select]
$SITE['WDdateMDY'] = false; // for weather software date format of month/day/year.  =false for day/month/year
is not set correctly -- that expects the date to be in d/m/y format.

Change Settings.php to
Code: [Select]
$SITE['WDdateMDY'] = true; // for weather software date format of month/day/year.  =false for day/month/year
and the issue should be resolved.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub, WeatherSnoop, WeatherCat
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

marzio2515

  • Gentle Breeze
  • **
  • Posts: 24
    • IMARCHEU3
  • Station Details: WeaherHawk 600 series
Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
« Reply #71 on: January 15, 2015, 08:03:25 PM »
Thanks so much ken!!!!

your help let me solve the issue!!!

now it works as expected!!!

Thanks again!!!

Marzio

marzio2515

  • Gentle Breeze
  • **
  • Posts: 24
    • IMARCHEU3
  • Station Details: WeaherHawk 600 series
New Saratoga AJAX/PHP template plugin for WeatherCat now available
« Reply #72 on: May 24, 2015, 04:34:06 PM »
Hello everyone,
I have a problem withe the date_month and the date_year shown in the NOOA report, it's always 01/1970

i notice that the file that shows the report is wxthismonth.php and in this file, among the others,  there are the following lines:

$stitle = trim($lines[0]) . " " . langtransstr('Summary for'). " $date_month/$date_year";

print "<p style=\"text-align: center\"><strong>$stitle</strong></p>\n";

i think that the first one generates the title and the second print it to on the browser ... but in my case the report shows: 01/1970 as u can see in the attached file...

how can i set up the right month and year?? .... which file is responsabile for the two variable: 1) $date_month and 2) $date_year ??
(now we are on 05/2015 so i need this date to be displayed  and not 01/1970)...

Thanks for your help!!!
Marzio


 

xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
« Reply #73 on: May 24, 2015, 06:35:44 PM »
What app do you use for editing the php/html/xml/etc. files? You should be able to search for those two string variables in it.

However, with my very limited and primitive "knowledge" of what appears to be php, I'd suggest editing that line a bit and see what happens. It appears to me that there are some missing quotation marks in the first line you posted; the one that constructs what is ultimately sent to the html server.
Quote
$stitle = trim($lines[0]) . " " . langtransstr('Summary for'). " $date_month/$date_year";
Try the red changes:
$stitle = trim($lines[0]) . " " . langtransstr('Summary for') . " " . $date_month . " /" . $date_year; (remove the " between $date_year and ;

"01/1970" is generally a beginning of time (as far as a computer is concerned, you may remember that the world of computers was supposed to end at 12:59:59pm, 1999 [computer] ) date. [banghead] It's basically an "erer" message trying to say "I don't understand the exact date you want, but I'm hoping this bogus one will get your attention". [rolleyes2] [lol]
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


marzio2515

  • Gentle Breeze
  • **
  • Posts: 24
    • IMARCHEU3
  • Station Details: WeaherHawk 600 series
New Saratoga AJAX/PHP template plugin for WeatherCat now available
« Reply #74 on: May 24, 2015, 08:10:31 PM »
Hello,
Thanks for your replay, but unfortunately it doesn't work, i tried to change the line u told me with this one:

$stitle = trim($lines[0]) . " " . langtransstr('Summary for')." ".$date_month."/".$date_year;

but the NOOA report shows 01/1970, it seems like if in the variable $date_month is stored 01 and in the variable $date_year is stored 1970

i have been using BBEdit for editing the file of template (XML,HTML, JS and of course PHP too) i think it's a good web editor...

i try to search for those two variables in other script (i.e.:Common.php, Setting.php...etc.. ) but with no success i did not find those variables ...

i only need someone tell me where and how this to variable are set-up ... and maybe i can find the issue in my configuration...

anyway thanks again.....

Marzio