Trixology

WeatherCat => WeatherCat Web Templates => Topic started by: saratogaWX on March 25, 2012, 02:19:55 AM

Title: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX on March 25, 2012, 02:19:55 AM
With Stu's release of WeatherCat V0.95, Build 152, the AJAX/PHP template set plugin is now available

http://saratoga-weather.org/wxtemplates/install.php to download the WCT-plugin (and Base if you need it).

Users of the V3 template set with (shudder) another software package should also run the updates tool (http://saratoga-weather.org/wxtemplates/updates.php) for their Base to get the 5 files changed there for WeatherCat support.

Best regards,
Ken
Title: Thanks Ken!! (Re: New Saratoga AJAX/PHP template plugin)
Post by: elagache on March 25, 2012, 03:28:04 AM
Hi Ken and WeatherCat fans!

Still trying to dig myself out of my own programming miseries, but definitely want to wish you a big thank you for all this work!! (http://www.macweather.net/images/smilies/thankyou.gif)

Greatly appreciated!!  [tup]

Cheers, Edouard  [cheers1]
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: HairyMcLeary on March 25, 2012, 03:36:47 AM
Wow! Awesome, thank-you very much.

I still have a little tweaking to do

www.oamaruweather.net.nz (http://www.oamaruweather.net.nz)

Tony
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: WCDev on March 25, 2012, 10:32:50 AM
Nice work Ken!

Is it OK to link to the template set plugin in the documentation and on our site?

(I'm guessing yes, but I have to ask  :) )

Many thanks,
Stu.
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: HairyMcLeary on March 25, 2012, 02:38:22 PM
I'm not sure where is the best place to post. Here or over on the WX Forum?

All went smooth enough, just 2 minor niggles:

When not using a METAR an image placeholder is left in the dashboard
Yesterdays temps have 2 decimal places, today's only have one.

Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX on March 25, 2012, 03:57:56 PM
Nice work Ken!

Is it OK to link to the template set plugin in the documentation and on our site?

(I'm guessing yes, but I have to ask  :) )

Many thanks,
Stu.

Yes, I'd be honored to have the links from your site  ;D

Thanks!

I'm not sure where is the best place to post. Here or over on the WX Forum?

All went smooth enough, just 2 minor niggles:

When not using a METAR an image placeholder is left in the dashboard
Yesterdays temps have 2 decimal places, today's only have one.



I'll have to look at using the built-in conditions string to set the icon in lieu of a METAR.

The temps should have only 1 decimal place AFAIK...

Best regards,
Ken
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX on March 25, 2012, 08:47:40 PM
I'm not sure where is the best place to post. Here or over on the WX Forum?

All went smooth enough, just 2 minor niggles:

When not using a METAR an image placeholder is left in the dashboard
Yesterdays temps have 2 decimal places, today's only have one.

Did an update to WCT-defs.php (V1.01 - 25-Mar-2012) to use the CC$ text for current conditions (and pick an icon based on that) if no METAR is specified (i.e. the $SITE['conditionsMETAR'] line in Settings-weather.php is commented out).

Use the updates page (http://saratoga-weather.org/wxtemplates/updates.php) to get the update (25-Mar-2012).

Thanks for the suggestion .. WeatherCat is one of the few weather software programs to provide this independently.. glad I could use the CC$ field for folks far-away from a METAR station.  :)

Best regards,
Ken
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: HairyMcLeary on March 25, 2012, 10:05:07 PM
Thanks for the quick work, the update works fine. My site is now showing the my CC$ tag as a current condition icon.  [woohoo]

Tony
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: Administrator on April 14, 2012, 12:19:38 PM
Thank you Ken, I've made this topic a sticky.

Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: nowait on July 09, 2012, 02:43:04 AM
I been working steadily to migrate from my html pages to the php pages from the Saratoga templates.

One thing I have not been able to figure out is how to have the title of each page contain the current temperature and time of last update like I have on my html site (http://nowaitweather.com).

I had several of my daily users check out the new php pages and each noted that they really missed the title having this information in it.  It is important to them because - if you minimize your browser window, you can still see the current conditions without bringing the full page up again.  Its like having a mini outdoor thermometer on your task bar.  I'd like to do the same using the php pages from the Saratoga templates.  Any ideas on how to do this?

nowait
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX on July 09, 2012, 05:58:08 PM
It's possible to do that :)

Edit your top.php to change
Code: [Select]
if( isset ($TITLE) ) {
echo "    <title>" . $TITLE . "</title>\n";
} else {
echo "    <title>" . langtransstr($SITE['organ']) . "</title>\n";
}
to
Code: [Select]
$dispTUOM = '&deg;'.strtoupper(preg_replace('|[^CF]+|i','',$uomtemp));
if( isset ($TITLE) ) {
echo "    <title>$temperature$dispTUOM -" . $TITLE . "</title>\n";
} else {
echo "    <title>$temperature$dispTUOM -" . langtransstr($SITE['organ']) . "</title>\n";
}

and the current temperature will appear as the first thing in the title of each page on the site.

Best regards,
Ken

BTW.. that's the beauty of a modular site design with common code chunks used on each page.. change in one place and it's changed everywhere on the website :)
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: nowait on July 10, 2012, 02:15:34 AM
Thats Awesome!  Exactly what I wanted.

Love the templates.  Thanks for all the help.

nowait
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: nowait on August 18, 2012, 02:35:12 AM
I'd like to add a few more WX Records to my site but I can't seem to find them in the list when I do a Dump on my site:
http://www.nowaitweather.com/WCTtags.php?sce=dump

I'm looking for wx records for Lowest windchill of all time,  highest Heatindex of all time, and a few wxrecent table entries yesterday's values.

Is there a way for me to add these values to the tags so I can use them in my web pages?

Thanks

Nowait
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX on August 18, 2012, 04:41:45 AM
Yes, there is an easy way to add those tags.

With the distribution WCT-plugin.zip came two files:

WeatherCat-webtags.txt
gen-WCTtags.php

You can add tags to the WeatherCat-webtags.txt using an ASCII text editor and this format with one tag per line:

wvar<tab><WeatherCat tag><tab><optional comment>

<tab> is the Tab character which is used as a field delimiter in the Weather-Cat-webtags.txt file.

You can add something like
Code: [Select]
wvar STAT$WINDCHILL:MIN:ALLTIME$ Lowest wind chill alltime
wvar STAT$WINDCHILL:MIN:ALLTIME:TIME$ Time of lowest wind chill alltime
and repeat for the other variables you'd like to add. 

Save and upload the WeatherCat-webtags.txt to your website.
Then view gen-WCTtags.php?comments=y on your website to generate a WCTtags template file.  Save the file over your current WCTtags template.

Then you can refer to the values as

$WX['STAT:WINDCHILL:MIN:ALLTIME']  and
$WX['STAT:WINDCHILL:MIN:ALLTIME:TIME']

in your PHP code.

Hope this helps...

Best regards,
Ken
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: nowait on August 21, 2012, 02:12:05 AM
Are there some additional includes that aren't in the newsamplepage.php?
I can't seem to print out any of the new variables or the existing ones?

I also tried adding the additional variables using the station records page?. and get nothing but the $STRECORDS contents?

I'm missing something (probably something basic) :)
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX on August 21, 2012, 04:41:58 AM
Sorry for the difficulties.. would you mind copying the contents of your wxnewpage in a post (the area bounded by <div id="main-copy'> ... </div><!-- end main-copy -->) and I'll take a look.

Additional include()s are not needed .. all the data comes from the WCTtags.php into the global $WX[] array.
The WCT-defs.php is automatically included to map SOME of the $WX[] values to $wdvariablenames used in the template, but you can always refer to the $WX[] entries directly in any wx....php page that is based on a copy of wxnewpage.php.

Use http://www.nowaitweather.com/WCTtags.php?sce=dump to see all the $WX[] values available for use.

Best regards,
Ken
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: nowait on August 21, 2012, 12:36:53 PM
My rough test page is http://nowaiitweather.com/wxnewpage_test.php

<div id="main-copy">


  <?php
   
   include_once($SITE['WXtags']);
      
    echo($WX['STAT:TEMPERATURE:CURRENT']);
    echo($WX['STAT:WINDCHILL:CURRENT']);
    echo($WX['STAT:HEATINDEX:24HRSAGO']);
    echo($WX['STAT:EXTHUMIDITY:DELTA24']);
    echo($WX['STAT:WINDCHILL:MIN:ALLTIME']);
    echo($WX['STAT:WINDCHILL:MIN:ALLTIME:TIME']);

  ?>
 
 
   <h1><?php langtrans('Sample Blank Page'); ?></h1>
   
    <p>This is a sample page</p>

    <p>Copy it to a new name and use as the base for a new page on your site.</p>
 
   <?php
    echo($WX['STAT:TEMPERATURE:CURRENT']);
    echo($WX['STAT:WINDCHILL:CURRENT']);
    echo($WX['STAT:HEATINDEX:24HRSAGO']);
    echo($WX['STAT:EXTHUMIDITY:CURRENT']);
    echo($WX['STAT:WINDCHILL:MIN:ALLTIME']);
    echo($WX['STAT:WINDCHILL:MIN:ALLTIME:TIME']);

  ?>     
   
</div><!-- end main-copy -->
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX on August 21, 2012, 05:44:03 PM
That's the right idea and it is working.. just not printing out in a way to allow you to diagnose what might be having a problem.

I used a modification of your code
Code: [Select]
  <?php
   
   
include_once($SITE['WXtags']);
      
    echo 
"Current Temperature: ".$WX['STAT:TEMPERATURE:CURRENT']."<br/>\n";
    echo 
"Current WindChill: ".$WX['STAT:WINDCHILL:CURRENT']."<br/>\n";
    echo 
"Current HeatIndex: ".$WX['STAT:HEATINDEX:24HRSAGO']."<br/>\n";
    echo 
"EXTHUMIDITY:DELTA24: ".$WX['STAT:EXTHUMIDITY:DELTA24']."<br/>\n";
    echo 
"WINDCHILL:MIN:ALLTIME: ".$WX['STAT:WINDCHILL:MIN:ALLTIME']."<br/>\n";
    echo 
"WINDCHILL:MIN:ALLTIME:TIME: ".$WX['STAT:WINDCHILL:MIN:ALLTIME:TIME']."<br/>\n";

  
?>
 
which shows each variable (labeled on a separate line) and got this output
Quote
Current Temperature: 62.9
Current WindChill: 62.9
Current HeatIndex: 64.5
EXTHUMIDITY:DELTA24: 10

Notice: Undefined index: STAT:WINDCHILL:MIN:ALLTIME in /homepages/9/d141952417/htdocs/wx/wxtemplates/Test/wxnowaitwx.php on line 63
WINDCHILL:MIN:ALLTIME:

Notice: Undefined index: STAT:WINDCHILL:MIN:ALLTIME:TIME in /homepages/9/d141952417/htdocs/wx/wxtemplates/Test/wxnowaitwx.php on line 64
WINDCHILL:MIN:ALLTIME:TIME:

I got the two Notice error messages because in my test setup, I have the error_reporting() set for everything.

So the issue is that two values are not present in my WCTtags.php so they cause the Notice: Undefined index messages (and therefore print nothing because there is no value for them).

When you do a http://www.nowaitweather.com/WCTtags.php?sce=dump , you can use any of the $WX['...'] names in your own page .. picking one that is not listed will not work :)

Best regards,
Ken

Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: nowait on August 21, 2012, 05:53:58 PM
That makes sense to not print anything is it doesn't exist.
In Reply #13 of this thread, I must have missed something when you were helping me add variables (link windchill and heatindex of all time) to the list of variables...

I'll have to go back through the steps and check again.


Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: nowait on August 22, 2012, 12:38:37 AM
Yep.  Wrong WCTtags.php file on my weather cat server.  It works much better when the server updates the correct file and uploads it to the website.  Now the "new" values I added to the WCTtags.php are available!

Is there a function that will parse the date and time out of this?
WINDCHILL:MIN:ALLTIME:TIME: "2010-12-11T22:09:00" to "2010 DEC 11 at 22:09:00"?

See http://nowaitweather.com/wxnewpage_test.php

Thanks for all your help.  I'm learning a lot!
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX on August 22, 2012, 06:23:04 AM

For a time format like that ( "2010-12-11T22:09:00" ), you can use strtotime() to get it into a time format useable by date()
to create 2010 DEC 11 at 22:09:00
For your specific one, something like
Code: [Select]
<?php
$utime 
strtotime($WX['WINDCHILL:MIN:ALLTIME:TIME']);
$pdate date("Y M d",$utime) . ' at ' date("H:i:s",$utime);
echo 
$pdate;
?>

Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: nowait on August 22, 2012, 12:25:08 PM
That helps but the time converted looks like the beginning of computer time (epoc)...

1969 Dec 31 at 18:00:00

http://nowaitweather.com/wxstationrecords.php
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX on August 25, 2012, 11:08:54 PM
Looks like you fixed it
http://nowaitweather.com/wxstationrecords.php
is now showing valid date/times
Quote
Lowest Recorded Wind Chill: -27.4 on 2010 Dec 11 at 21:09:00

Highest Recorded Heat Index: 118.9 on 2011 Aug 01 at 15:09:00

The 'yyyy-mm-ddThh:mm:ss' format (ISO) is one that should be processed correctly by PHP strtotime() function.

Best regards,
Ken
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: nowait on August 27, 2012, 01:21:40 AM
Yes its correct now.  I needed to add "STAT" to the variable name in your example.

Thanks for all your help.  Slowly but surely, I'm getting things figured out!
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: jf-i2r on March 29, 2013, 10:04:07 AM
hi

for information :
all datas uploaded from weathercat are in : /meteo-jf2/
all files for Saratoga Templates are on http://www.jf-i2r.com/meteo-jf2/saratoga/

i need your help :

 why " NaN " for some datas :

(http://img163.imageshack.us/img163/1549/capturedcran20130329105.jpg) (http://imageshack.us/photo/my-images/163/capturedcran20130329105.jpg/)
(http://img96.imageshack.us/img96/2216/capturedcran20130329110.jpg) (http://imageshack.us/photo/my-images/96/capturedcran20130329110.jpg/)


http://www.jf-i2r.com/meteo-jf2/saratoga/wxindex.php

i send you my WCTags.php and WCT_realtime.txt from my server

thanks
jean frederic
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX on March 29, 2013, 04:29:23 PM
Hi Jean,

The problem is with the data in /meteo-jf2/WCT_realtime.txt

29/03/13|17:19:20|11,7|92|10,4|6|5|237|0,0|4,8|1000,4|OSO|-|Knots|&#176;C|mb|mm|111,47|

The numbers inside must use a period as the decimal point and not the European convention of using a comma as a decimal point.  The JavaScript
is unable to process the numbers with commas as decimal points and so show NaN (meaning Not a Number) instead.  Have WeatherCat emit the WCT_realtime.txt file using periods as decimal point and the AJAX script should work properly.

Best regards,
Ken
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: jf-i2r on March 29, 2013, 05:01:08 PM
thanks Ken

is it possible to me to setup weathercat to use periods as décimal ?

or Stu can do it ?

cheers

jean frederic
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: WCDev on March 29, 2013, 08:02:04 PM
Unfortunately there's no quick fix for this one as the decimal separator is provided by the OS (from settings made in the Language & Text System Preferences). It'll probably need a tag to override the OS settings to turn it off for that particular file whilst it's being processed.
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX on March 29, 2013, 10:04:08 PM
I think I found a quick fix for you to try...

Change ajaxWCTwx.js code
Code: [Select]
    var realtime = x.responseText.split('|');
to
Code: [Select]
var rttext = x.responseText;
if(decimalComma) {
rttext = rttext.replace(/(\d)\,(\d)/g,"$1.$2");
}
    var realtime = rttext.split('|');

That should find all the numbers with comma decimal points and replace the comma with a period so normal math can be done by JavaScript.

The script already had a mechanism to convert from decimal points to comma decimals built-in, just not a mechanism to do the reverse.

Best regards,
Ken
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: jf-i2r on March 30, 2013, 09:30:15 AM
Hi

i setup that in ajaxWCTwx.js

Quote
var decimalComma = true;    // =false for '.' as decimal point, =true for ',' (comma) as decimal point

and it's seem ok http://www.jf-i2r.com/meteo-jf2/saratoga/index.php

****  but i've another problem with date and update , Saratoga template don't find the WCT_realtime.txt i think ; have you an idea?  i'm lost

in http://www.jf-i2r.com/meteo-jf2/saratoga/wxstatus.php 

Quote
WeatherCat weather data   NOT Current   379070:25:12    > 0:05:15
01/01/1970 01:00


(http://img24.imageshack.us/img24/5103/capturedcran20130330152.jpg) (http://imageshack.us/photo/my-images/24/capturedcran20130330152.jpg/)

can you verify my ajaxWCTwx.js  and settings files ?   


all datas uploaded from weathercat are in : /meteo-jf2/
all files for Saratoga Templates are on http://www.jf-i2r.com/meteo-jf2/saratoga/

http://www.jf-i2r.com/meteo-jf2/saratoga/index.php

(http://img594.imageshack.us/img594/9112/capturedcran20130330150.jpg) (http://imageshack.us/photo/my-images/594/capturedcran20130330150.jpg/)


(http://img833.imageshack.us/img833/9619/capturedcran20130330104.jpg) (http://imageshack.us/photo/my-images/833/capturedcran20130330104.jpg/)



thanks
jean frederic
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX on March 30, 2013, 05:27:51 PM
Try changing Settings.php from
Code: [Select]
$SITE['WDdateMDY'] = false; // for weather software date format of month/day/year.  =false for day/month/year
to
Code: [Select]
$SITE['WDdateMDY'] = true; // for weather software date format of month/day/year.  =false for day/month/year
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: jf-i2r on March 30, 2013, 06:04:36 PM
hi

 [tup] ok for date

last question : where i can setup the update page ? every 15s for example because if i reload with my browser the data for wind don't change so the WCT_realtime.txt is updating with wheather cat every 10S

for information i've make change in ajax-images for example the wr-fr-NW.png for wr-fr-NO .png all "W" to "O"

thanks

jean frederic
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX on March 30, 2013, 06:11:57 PM
Hi Jean Frederic,

Your WeatherCat is reporting the wind direction using the French abbreviations (N E S O) for cardinal directions instead of the expected English direction (N E S W).  As it says in the How Multilingual works page (http://saratoga-weather.org/wxtemplates/multilanguage.php)
Quote
Multilanguage support requires weather software to run in English

Be advised that the translation provided by the template set is FROM ENGLISH ONLY. If you run your your weather software using a language other than English, it is very likely that some of the multi-language support won't work on some features as there is currently no provision to convert from <language> to English so the English to <language> translation is not possible.

So.. in order to have your site work in all languages, the language used by WeatherCat must be in English .. sorry.

Best regards,
Ken
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: jf-i2r on March 31, 2013, 08:58:18 AM
hi ken

sorry i've not read the How Multilingual works page   ; and my English is very low and not understand all ; so that the reason i 've so many questions !


and for update page ? every 15s for example because if i reload with my browser the data for wind don't change so the WCT_realtime.txt is updating with wheather cat every 10S

(http://img208.imageshack.us/img208/2112/capturedcran20130331122.jpg) (http://imageshack.us/photo/my-images/208/capturedcran20130331122.jpg/)

i'm sure that my saratoga web site don't use ajaxWCTwx.js
if i rename ajaxWCTwx.js  to ajaxWCTwxA.js  i see the same home web site nothing change

all datas uploaded from weathercat are in : /meteo-jf2/
all files for Saratoga Templates are on http://www.jf-i2r.com/meteo-jf2/saratoga/

http://www.jf-i2r.com/meteo-jf2/WCTtags.php?sce=view
http://www.jf-i2r.com/meteo-jf2/WCT_realtime.txt

attachment ajaxWCTwx.js

I'm progressing slowly :)
thanks for your help and your patience
cheers
jean frederic
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: jf-i2r on April 03, 2013, 09:57:33 AM
hi Ken and Weathercat team

with a friend we have made some patches in ajaxWCTwx.js  ; now your template is ok (comma,date, update, gust etc.. ) when using weathercat fr , kts  : http://www.jf-i2r.com

we use Dreamweaver => cmd+f  BugsDenis

Quote
      //   BugsDenis patches here
        var value = new String(inValue);
        if(decimalComma) value = value.replace(/(\d)\.(\d)/,"$1,$2");
Quote
              // convert input wind to knots if need be
   if(rawwind == '-') {rawwind = 0.0;}   //   Patch BugsDenis
Quote
             //   BugsDenis patches here
   if (useKnots) { return new Number((rawwind * 1.0).toFixed(dpWind)); } //force usage of knots for speed
Quote
         //   BugsDenis patches here in order to see received datas

//Wind gust
      //   BugsDenis patches here (on JF directives)
      // var gust    = convertWind(realtime[40]);
      var gust    = convertWind(realtime[6]);

Quote
//   BugsDenis patches here in order to identify errors
      console.log(e);
   console.log(rttext);

if you want you can integrate my saratoga web site on your website templates :)

cheers

jean frederic
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: Toremann on April 21, 2013, 09:51:14 AM
Hello
I am brand new to this and i wander were to put the forcast icons, and is it any .php file i need to edit to get this icons operative


Best regards
Tore Olsen :D
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX on April 21, 2013, 04:19:02 PM
Hi Tore,

There are two different sets of forecast icons for use with the template sets.  The default set (called carterlake-icons) are .jpg format and an optional set (called meteotriviglio-icons) are animated .gif images.

Either (or both) sets are installed in ./forecast/images/ directory on your site.  Using the meteotriviglio-icons does require one change to the template set  in Settings.php to specify that .gif icons are to be used. 

Both sets are downloadable from the install page (http://saratoga-weather.org/wxtemplates/install.php)

Best regards,
Ken
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: jf-i2r on April 28, 2013, 03:22:34 PM
hi Ken

is possible to integrate in a futur release the tide times ? in the almanac in the home page panel

cheers
jean frédéric

Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX on April 29, 2013, 06:13:54 PM
Few of the weather software packages include tags that have tide information in them so the templates did not include it either, sorry.
Title: Try "Mr Tides?" (Re: New Saratoga AJAX/PHP template)
Post by: elagache on April 29, 2013, 10:29:44 PM
Hi Jean Frederic, Ken and WeatherCat fans,

is possible to integrate in a futur release the tide times ? in the almanac in the home page panel

I have no idea how you could get this data onto your website, but you might take a look at this shareware program: Mr. Tides

http://www.mrtides.com/ (http://www.mrtides.com/)

Perhaps it at least has the tidal information you need.  If you've got that, perhaps you can find a way to put it on your website.

Cheers, Edouard  [cheers1]
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: jf-i2r on April 30, 2013, 08:58:47 AM
hi Edouard

in my old web site i use that:

http://horloge.maree.frbateaux.net

Quote
<iframe src="http://horloge.maree.frbateaux.net/ws126" width="226" height="217" frameborder="0" scrolling="no"><a href="http://maree.info/" target="_top" rel="dofollow">Calendrier des marées - horaire, hauteur, coefficient de marée</a></iframe>

(http://img834.imageshack.us/img834/1252/capturedcran20130430095.jpg) (http://imageshack.us/photo/my-images/834/capturedcran20130430095.jpg/)

but now i use Saratoga template and integrate this in the template I am not satisfied
my site is viewed mainly by sailors

may be integrating tides  into saratoga template as WU is integrated

cheers
jean frederic
Title: Should be a way to do this. (Re: New Saratoga AJAX/PHP template plugin)
Post by: elagache on May 01, 2013, 12:04:01 AM
Hi Jean Frederic

in my old web site i use that:

http://horloge.maree.frbateaux.net

I'm sure that there are ways to grab data from one website and incorporate it into another using something like PHP.  Alas, I don't know how to do that and honestly, I'm still stuck with yet another detail in restoring  . . . . .  (http://www.canebas.org/Automotive/V8_Buick/Misc/Biquette_V8_Buick_signature.gif)

Maybe someone else can help you out with this one or perhaps searching the Internet will come up with others also trying to incorporate tide data into their website.

Cheers, Edouard  [cheers1]
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: jf-i2r on May 01, 2013, 10:53:49 AM
Hi Edouard

it is not very important to have the tide times but I think this may be an interesting option  ;)

hope Ken should integrate this option in the futur

good luck for your restoration work  :)

cheers
jean frederic
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: jace on May 01, 2013, 06:03:28 PM
Jean Fredric

You should be able to integrate the data you need from http://www.surf-forecast.com/pages/configure_feed (http://www.surf-forecast.com/pages/configure_feed) or a similar site quite easily.

JC
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: jf-i2r on April 20, 2014, 09:36:21 AM
HI

i've updated the  WU-forecast.php for new WU webpage design but it's not good i've a message in my home web site page : Warning: Division by zero in /home/jfi2r/www/WU-forecast.php on line 1171
did i ve to update another file ?

for 2014 my english stay bad like 2013 :)

thanks

jean frédéric
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX on April 20, 2014, 02:18:29 PM
Hi,

the issue is caused by your PHP 5.2.13-pl1-gentoo -- PHP versions before 5.3.x had issues with the built-in json_decode() PHP function and are unable to handle the large JSON stream (>100Kb) from the new WU pages.
You will have to upgrade the PHP to 5.3.x, 5.4.x or 5.5.x to have the script work correctly.

Best regards,
Ken
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: jf-i2r on April 20, 2014, 07:36:03 PM
Hi Ken

thanks , i update to  php5.3 ( more récent in OVH release) and it's ok for WU

but now i've this message :  Notice: Undefined offset: 1 in /home/jfi2r/www/get-USNO-sunmoon.php on line 158

i don't know why …..

thanks

jean frédéric
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX on April 21, 2014, 01:10:52 AM
Hi again :)

PHP 5.3 changed some defaults in the error_reporting so that E_STRICT, E_NOTICE and E_DEPRECATED errors are now enabled by default.  I suggest you turn them off in your php.ini for the website by using

error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED

Also, using check-fetch-times.php?show=versions indicates you have some scripts that could use updating .. you should run that query on your site, the use the recommended date/base/plugin in the query at http://saratoga-weather.org/wxtemplates/updates.php to get a customized set of scripts needing updates to bring your site to current levels :)

Best regards,
Ken
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: jf-i2r on April 21, 2014, 08:46:38 AM
hi Ken

for test i put this line in my index.php : if (version_compare(PHP_VERSION, '5.3.0') >= 0) error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);

it's ok

but the problem stay ( http://www.jf-i2r.com/wxastronomy.php)

(http://www.heberger-image.fr/data/vignettes/11650_Capture_dc_cran_2014_04_21_10.39.26.jpg) (http://www.heberger-image.fr/images/11650_Capture_dc_cran_2014_04_21_10.39.26.jpg.html)

i don't see any update for wxastronomy.php or get-USNO-sunmoon.php

i think my site is in current level

sorry Ken for all questions but i try to understand :)

thanks

best regards  [cheers1]

jean frédéric
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX on April 22, 2014, 03:08:01 PM
You can put the line
Code: [Select]
if (version_compare(PHP_VERSION, '5.3.0') >= 0) error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);in your Settings.php and it will apply to all the pages on your site.
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: jf-i2r on April 22, 2014, 06:28:52 PM
hi Ken

it's ok  [cheers1]

but it not be better to correct the error traces rather than disable error traces ?

thanks
jean frederic
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: iccb on June 13, 2014, 08:12:42 AM
Hello everybody! :)

Is there any change to get davis vp forecast to my native language (Finnish)?
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX on June 13, 2014, 05:08:29 PM
Davis provides a lot of forecast text variations (400+ as I remember) which is not suitable for the langtrans() type function to support.. you would have to enter them 1-by-1 as langlookup entries in the language-fi.txt

So... unless Davis provides Suomi as a console language option, it is unlikely to have a translation any time soon.  Sorry...

Ken
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: iccb on June 13, 2014, 10:14:28 PM
They are in Finnish language in davis console and with weather display I can use finnish texts.
But it's enough if they can translated with langlookup file. :)
Have to tryit.
Thx!
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: iccb on June 14, 2014, 06:58:58 PM
Hmmm...
I tryet to put sone of them to language-fi.txt, but they dont translate... What should I try out next?...
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: jf-i2r on June 30, 2014, 08:27:05 AM
Hi Ken

another problem with forecast, i,ve not the days

(http://www.heberger-image.fr/data/images/78806_Capture_dc_cran_2014_06_30_09.23.52.jpg) (http://www.heberger-image.fr)
(http://www.heberger-image.fr/data/images/21958_Capture_dc_cran_2014_06_30_09.23.39.jpg) (http://www.heberger-image.fr)

thanks
jean frédéric
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX on June 30, 2014, 01:24:37 PM
Hi, J F,

You are running WU-forecast.php Version 2.04 -- that issue was fixed in V2.05, so please update the script :)

You can run check-fetch-times.php?show=versions on your site to show scripts that have updates and get directions on
how to easily get the updates using my updates tool.

Best regards,
Ken

P.S. we have recently found that sites hosted on altervista.org will not be able to fix the problem (this doesn't apply to you, J F). See: http://www.wxforum.net/index.php?topic=22905.msg220929#msg220929 for more info.  The root cause was that altervista.org has a security policy that forces all scripts to use HTTP/1.0 (even if HTTP/1.1 protocol is requested), and WeatherUnderground servers respond to HTTP/1.0 requests with a page omitting the JSON data and also lacking the day-names in the raw HTML.  Sites based on altervista.org hosting must remain on V2.04 to have any WU forecast visible, but that forecast will lack the day-names.  V2.05 will not work on altervista.org sites and the problem is not fixable (except by moving the site to hosting other than by altervista.org).  Unfortunately, altervista.org hosting (free) is quite popular for Europeans, especially Italian websites so I expect that many personal weather websites may have to find new (paid) hosting to fix the issue longer term.

Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: jf-i2r on June 30, 2014, 03:21:20 PM
Hi Ken

thanks , i update the script and now all is ok  [cheers1]
i look for the check-fetch-times.php

(http://www.heberger-image.fr/data/images/67502_Capture_dc_cran_2014_06_30_16.19.50.jpg) (http://www.heberger-image.fr)

cheers

jean frederic
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: jf-i2r on October 31, 2014, 08:54:51 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
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: wvdkuil on October 31, 2014, 09:41:14 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
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: jf-i2r 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]
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: jf-i2r 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
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: wvdkuil 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
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: jf-i2r on November 01, 2014, 09:03:50 AM
thanks Wim all is ok now  [tup]
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: iccb 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 (http://kauttua.net/wxastronomy.php)
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: wvdkuil 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 (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
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: iccb 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 (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]
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: marzio2515 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??
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX 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.
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: marzio2515 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
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX 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.
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: marzio2515 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
Title: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: marzio2515 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


 
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: xairbusdriver 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]
Title: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: marzio2515 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
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: wvdkuil on May 24, 2015, 08:17: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
If you use BBEDIT there is a search function for all files at once.
Menu "Search" , second in dropdown "Multi Search . . "
If you have a backup of your website at your local Mac you could set the search for the topfolder and BBEDIT will scan all files at once.

Wim


Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: xairbusdriver on May 24, 2015, 08:21:42 PM
Oops! My slow, two-finger "typing" allowed Wim to get the Multi-File Search suggestion in ahead of me. [blush]

Sorry that didn't help. [banghead] Although I still think my edits are correct (I may not be right, but I am very stubborn!  [blush] )

Have you tried using the Multi-File Search...function (shift-command-f, or in the "Search" menu)? It may take a while, depending on how many files are in the template, but it could be in a completely different file than the one you are looking in. That search will find it in every file, so you may have to look at each one, even then. BTW, you will usually need to specify what files to search, hopefully, they will be in one directory.
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX on May 24, 2015, 08:25:14 PM
The variables are created in WCT-defs.php by
Code: [Select]
# generate the separate date/time variables by dissection of input date/time and format
list($date_year,$date_month,$date_day,$time_hour,$time_minute,$monthname,$dayname)
  = WCT_setDateTimes($date,$time,true);

With $date, $time set by
Code: [Select]
$time = $WX['t12'];
$date = $WX['de'];
earlier in the same script.
The values from WCTtags.php?sce=dump shows
Code: [Select]
$WX['t12'] = '09:18 PM'; // Time (12 hour clock)
$WX['de'] = '24/05/15'; // Date in the format of day/month/year
so the WCT_setDateTimes() function should be expecting the date in dd/mm/yy format. 

In your Settings.php you have
Code: [Select]
$SITE['WDdateMDY'] = false; // for weather software date format of month/day/year.  =false for day/month/year
which means the date is expected in dd/mm/yy format.

The problem seems to be in your copy of WCT-defs.php
Code: [Select]
list($date_year,$date_month,$date_day,$time_hour,$time_minute,$monthname,$dayname)
  = WCT_setDateTimes($date,$time,true);

Change that to
Code: [Select]
list($date_year,$date_month,$date_day,$time_hour,$time_minute,$monthname,$dayname)
  = WCT_setDateTimes($date,$time,$SITE['WDdateMDY']);

and that should fix the 1970/etc. issue.



Best regards,
Ken
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: marzio2515 on May 24, 2015, 09:03:34 PM
Thanks a lot KEN!!!

with your suggest i solved the issue!!!

THANKS AGAIN!!!!

MARZIO
Title: Page not Auto-Updating
Post by: nineback on January 21, 2016, 03:02:20 PM
Any idea why my page is not auto updating?  My realtimegaugesWC.txt is uploading. I have to manually refresh the page to get it to update.

www.kq5s.com/weather/index.php (http://www.kq5s.com/weather/index.php)

Thanks,

Tom
Title: Re: Page not Auto-Updating
Post by: wvdkuil on January 21, 2016, 03:14:16 PM
Any idea why my page is not auto updating?  My realtimegaugesWC.txt is uploading. I have to manually refresh the page to get it to update.

www.kq5s.com/weather/index.php (http://www.kq5s.com/weather/index.php)

Thanks,

Tom
These are the errors generated:
Code: [Select]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /WCT_realtime.txt was not found on this server.</p>
<hr>
<address>Apache/2.4.16 (Unix) OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 mod_fcgid/2.3.9 Server at www.kq5s.com Port 80</address>
</body></html>
The file http://www.kq5s.com/WCT_realtime.txt
is not found as it should be
http://www.kq5s.com/weather/WCT_realtime.txt?1453388855561

Solution: ajaxWCTwx.js line 59 change from
Code: [Select]
var realtimeFile = '/WCT_realtime.txt'; //  URL location of realtime.txt relative to document root of websiteto
Code: [Select]
var realtimeFile = '/weather/WCT_realtime.txt'; //  URL location of realtime.txt relative to document root of website
Warning: There can be new pieces of missing data, such as a blank thermometer. Check line 73:
Code: [Select]
var thermometer = './thermometer.php'; // script for dynamic thermometer PNG image (optional)Or missing images line 61
Code: [Select]
var imagedir = './ajax-images';  // place for wind arrows, rising/falling arrows, etc.
Success, Wim
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: nineback on January 21, 2016, 06:31:01 PM
Thanks a lot Wim.  I don't know how many times I looked at that path.  [banghead]  I looked at thermometer.php and noticed I had WD selected as the weather software.  I changed it to WC.  The thermometer was showing the correct temperature before the change so perhaps thermometer.php gets the software variable elsewhere.

I am moving over from WD and have another site that I am trying to keep going using WD and an alternate dashboard.  I find myself getting the two sites confused.

The alternate site using WD is weather.kq5s.com (http://weather.kq5s.com).  I wish the alternate dashboard supported WCT.

Thanks again.

Tom
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: iccb on September 22, 2019, 08:12:42 AM
Hmm. wxjournal.php page is showing somekind of error. Without of knowledge of php, I cannot correct it. Maybe Ken can help?
Error can see here: https://kauttua.net/wxjournal.php
Site using php 7.3.2 and newest template files.
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: saratogaWX on September 22, 2019, 07:40:19 PM
Hmm. wxjournal.php page is showing somekind of error. Without of knowledge of php, I cannot correct it. Maybe Ken can help?
Error can see here: https://kauttua.net/wxjournal.php
Site using php 7.3.2 and newest template files.


Sorry, my wife and I are on a cruise, so I have limited diagnostic tools available on the ship.  I'll take a look when we return home.
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: iccb on September 22, 2019, 07:44:36 PM
Have a great cruise! :)
And thank you if you can check it out someday!!
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: Dave13 on September 25, 2019, 02:46:12 AM
Make the following change to your wxjournal.php file:

Replace:
$jrnl = preg_replace('|<BR><B>(.*)</B><BR>|eUs',

With:
$jrnl = str_replace('|<BR><B>(.*)</B><BR>|eUs',
Title: Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
Post by: iccb on September 25, 2019, 06:32:23 PM
Make the following change to your wxjournal.php file:

Replace:
$jrnl = preg_replace('|<BR><B>(.*)</B><BR>|eUs',

With:
$jrnl = str_replace('|<BR><B>(.*)</B><BR>|eUs',

Actually the line was:
$jrnl = preg_replace_callback('|<BR><B>(.*)</B><BR>|eUs',

and I replaced that with:
$jrnl = str_replace('|<BR><B>(.*)</B><BR>|eUs',

That was easy! Thank you very much!!  ThU32:-)