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

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 #75 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


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/

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 #76 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.
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


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 #77 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
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 #78 on: May 24, 2015, 09:03:34 PM »
Thanks a lot KEN!!!

with your suggest i solved the issue!!!

THANKS AGAIN!!!!

MARZIO

nineback

  • Gentle Breeze
  • **
  • Posts: 10
    • KQ5S-13
    • KALALBER13
  • Station Details: Davis Vantage Pro with Solar
Page not Auto-Updating
« Reply #79 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

Thanks,

Tom

wvdkuil

  • Strong Breeze
  • ***
  • Posts: 151
    • DW8113 (D8113)
    • IVLAAMSG47
    • Weatherstation Wilsele/Leuven/Belgium
  • Station Details: VantagePro2+ UV,Solar - Macbook/Mini
Re: Page not Auto-Updating
« Reply #80 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

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
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/

nineback

  • Gentle Breeze
  • **
  • Posts: 10
    • KQ5S-13
    • KALALBER13
  • Station Details: Davis Vantage Pro with Solar
Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
« Reply #81 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.  I wish the alternate dashboard supported WCT.

Thanks again.

Tom

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 #82 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.

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 #83 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.
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

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 #84 on: September 22, 2019, 07:44:36 PM »
Have a great cruise! :)
And thank you if you can check it out someday!!

Dave13

  • Gentle Breeze
  • **
  • Posts: 63
    • CW7890
    • KTNPARSO2
    • ParsonsWeather.com
  • Station Details: Davis VP2
Re: New Saratoga AJAX/PHP template plugin for WeatherCat now available
« Reply #85 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',

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 #86 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:-)