Weather by You!

Templates and Projects support => Php templates => Topic started by: Solocielo62 on March 27, 2018, 04:10:30 AM

Title: template sky, syntax error,
Post by: Solocielo62 on March 27, 2018, 04:10:30 AM
Hi,  when I try to launch weather Sky I receive this error message:

"Parse error: syntax error, unexpected 'h' (T_STRING) in C:\xampp\htdocs\sky\wt_data_inc.php on line 486"

 can someone help me to understand what is the problem? Thank you
Riccardo
Title: Re: template sky, syntax error,
Post by: Andy9164 on April 01, 2018, 01:09:38 PM
Hi Riccardo,
What weather software are you running.

If running Cumulus please post which version and if running original Cumulus V1 (Windows PC) or Cumulus MX (on PC, Pi, Linux etc.)

There were some major changes on how Cumulus handled characters for time date etc. in MX version. I downloaded Weather Sky template and on default version Line 486 this is first time there might be a conflict due to using new formatting as it has old style "h".

 I had a similar issues on Weather Blues 2 when I changed to Cumuilus MX on a Raspberry Pi. The new formatting also caused badly formatted dates and times i other areas.

Also you could download Notepad++ (Its free and very helpful) and paste here say lines 480 to 490 and I will try and help.

As an example, here is line 486 on the original Weather Blues template

$TtempHF = $pre_time.'<#TtempH format="h'h'nn">'.$pre_date.'<#TtempH format="d ">'.$Tr_monthnames['<#TtempH format="m">'].'<#TtempH format=" yyyy">';

here is what I had to change it to

$TtempHF = $pre_time.'<#TtempH format="HH':'mm">'.$pre_date.'<#TtempH format="dd ">'.$Tr_monthnames['<#TtempH format="%M">'].'<#TtempH format="' 'yyyy">';

If you are using Cumulus MX ( I suspect you are) here is a link to the Cumulus website explaining the differences.

http://sandaysoft.com/forum/viewtopic.php?f=27&t=12908 (http://sandaysoft.com/forum/viewtopic.php?f=27&t=12908)
(Scroll down until you see yellow section)

Let me know if I can help you further as there are other changes

Also if you want to take a look at what I found

http://www.midlifedad.me.uk/WB2_unmodified/records.php (http://www.midlifedad.me.uk/WB2_unmodified/records.php) This was using the old format

http://www.midlifedad.me.uk/WB2_modified/records.php (http://www.midlifedad.me.uk/WB2_modified/records.php) This was using the new formatted version I did.



Andy

Title: Re: template sky, syntax error,
Post by: Andy9164 on April 03, 2018, 04:44:00 AM
Hi Riccardo,
I did some tests last night and downloaded Weather Sky template and loaded on to my test webserver.

I got Cumulus to process the data files and I could not see any errors, I didnt get syntax error or even any error log from my Apache server, so I am a little confused now.

I did see some things were not formatted correctly due to changes in Cumulus MX but pages loaded fine, no problem. Do you have a website address so I can take a look.

Andy