Welcome to the forum, and you are the first one (that I'm aware of) to use the template in Hong Kong.
1) the Undefined error in line 155 in AWNtags.php is likely the cause of (2) (3) and (4) also. Try changing AWNtags.php $t = trim($d['info']['name'])."\t".trim($d['info']['location']);
to $t = trim($d['info']['name'])."\t".@trim($d['info']['location']);
to suppress that Notice error. That should fix the thermometer.php and date display at the same time.
For (5), that's a setting in ajaxAWNwx.js that turns off updates after a set number of times. In ajaxAWNwx.js, change var maxupdates = 10; // Maxium Number of updates allowed (set to zero for unlimited)
to var maxupdates = 0; // Maxium Number of updates allowed (set to zero for unlimited)
to have no automatic timeout of updates.
for (6), the exact requirements for the cron-yday.txt shell script depend heavily on your specific *nix server configuration. Specifically, the filesystem locations for your document root and for the PHP interpreter. Fortunately, the check-fetch-times.php?show=info reveals both:
PHP cmd location: /usr/bin/php
Document root: /var/www/domains/weatherhk.org/public_html
Template root: /var/www/domains/weatherhk.org/public_html/pws/saratoga
so the start of the cron-yday.txt file should read # --- begin settings
HDIR="/var/www/domains/weatherhk.org/public_html/pws/saratoga"
SCRIPT=saveYesterday.php
URL="http://weatherhk.org/pws/saratoga/$SCRIPT"
PHPcmd=/usr/bin/php
CURLcmd=/usr/bin/curl
USECMD=PHP
#USECMD=CURL
# --- end settings
Remember that the cron-yday.txt file must use Unix line endings (NL or \n or x0A) and NOT Windows line endings (CRNL or \r\n or x0D0A). If you're using Windows to edit the file, use Notepad++ and you can easily change line endings from \r\n to \n before you upload.
Your webhoster should have a control panel for your website that has a cron configuration menu .. use that after you've uploaded the cron-yday.txt as modified.
for (7), the descriptions are not easily customizable and are based in two places ajax-dashboard.php (in PHP) and ajaxAWNwx.js (JavaScript).
I hope this helps, and thanks for trying the Saratoga template with Ambientweather.net
Best regards,
Ken
My pleasure to be the first one
I appreciate your great effort in making this sophisticated and professional template for us to use!
Thanks for your quick and helpful reply. I tried to add the @ in AWNtags.php, it successfully solves problems 1,2,3. Awesome!
However, problem 4 still exists. Today I saw a more ridiculous number -19.3°C/hr ...
For problem 5, I have updated the maxupdates to be 0, but still the update paused after a while and requires reloading the page... Any ideas what's happening?
For problem 6, thank you for helping me to identify the paths. I have set up the cronjob just now, and will know whether it works at 23:58 tonight. 2 more hours to wait!
For problem 7, I have found the langHeatWords in ajaxAWNwx.js and tried to change the if-else statements in the heatColor function, but couldn't make it work. You mentioned the descriptions are also based on ajax-dashboard.php. I found the following code which should be relevant
<span class="ajax" id="ajaxheatcolorword">
<?php langtrans($heatcolourword); ?></span>
, but don't know how to edit. It seems that $heatcolourword only appears once in this PHP file?
One more question... Ambientweather.net shows the maximum temp today is 34.1C at 3:19pm while Saratoga is only 33.9C at 3:45pm. I observe that the max/min values (including temperatures, wind, UV, solar radiation) are only captured every 5 minutes at xx:x5 or xx:x0, so it cannot capture the actual max/min values which happen between the 5 minutes. Is it possible to change the frequency in order to capture the actual max/min?