Author Topic: Atkins web template problem  (Read 7794 times)

jace

  • Storm
  • *****
  • Posts: 812
    • DW9675
    • ISuffolk62
    • Yoxford weather site.
  • Station Details: Davis Vantage Pro2, with Mac USB Data Logger. 2.4 GHz Intel Core 2 Duo MacBook, with 8 GB 1033 MHz DDR3 Memory, running Mac OSX Version 10.10.1 (Yosimite).
Atkins web template problem
« on: March 30, 2012, 06:08:33 PM »
Ok, I seem to be extremely unlucky, or stupid when it comes to web templates or apple scripts as I can't seem to get anything working apart from Edouard's web template constructed in Sea monkey.

I've been trying to use Todd's Atkins template that he kindly provided the link for. I'm using the custom web link in the UI and it tested ok for uploading to the FTP destination.

However when I test the web pages locally i get a very plain web page that looks nothing like Todd's on his homepage (See attachment).

When I go to my web provider site to view the site there, I only get the following fault message:

Parse error: syntax error, unexpected T_STRING in public_html/index.html on line 2. I have not the foggest idea how to correct this , I think it's the line that inserts the current date " Last update: D$"  ..... any simple solutions please ?

I will not even go into the problems I got with Saratoga's AJAX/PHP template set plugin ! Suffice to say once I tried viewing the pages locally via the custom web UI. and it opened a copy of Words, another in Excel and 99 windows in textedit I took fright and retired to lick my wounds and have a restorative glass of wine !

Many thanks for any assistance folks, and sorry about asking what must be basic questions on web pages/templates.

Cheers John

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1555
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2023 Mac mini M2 Pro, 32GB RAM, Mac OS 14, WeatherCat 3.2
Re: Atkins web template problem
« Reply #1 on: March 30, 2012, 08:43:09 PM »
John,

Let me see if I can help you out. I made the following screen copy late last year, so it refers to LWC, but you should be able to figure out what I've done.



The left pane is my local directory, and the right pane is my FTP folder on my web site. I'm assuming you are starting out with nothing else in your local source location or on your destination folder on your web host site.

The index.html and wximprovedalmanac.html are the only files that go in your local folder. This is the folder that you point to in WeatherCat's References --> Online --> Custom Web --> Set HTML Source. At this time, nothing else will be in your source folder.

Your online web site folder should contain the img and js folder and the wxi.css file, and nothing else.

Once you enable WeatherCat's custom web, it will populate the local HTML files and sent them and the rest of the files to a local temporary folder. This is set in WeatherCat Preferences --> online --> Custom Web --> Set Save Path.





Then at the set interval, WeatherCat will upload the populated HTML files, graphs, gauges, etc to your web site (as indicated by the green arrows above) and you should view them by visiting www.yoursite.com/yourweatherdirectory/index.html

The wxi.css file that is online is what formats your web page. So when you look at it locally, the formatting has not yet been done.

Hopefully, that gets you up and running. Once you are, then you can add other features, such as the banner, webcam (as shown in blue) and other custom pages or third party templates (as shown in yellow.)

Let us know if that doesn't work,
Steve
Steve - Avon, Ohio, USA


CWOP: DW8454 - WU: KOHAVON11 - AWEKAS - CoCoRaHS
PWSweather - WeatherCloud - Twitter - Facebook

JosBaz

  • Strong Breeze
  • ***
  • Posts: 232
    • INBRSON2
    • Weatherstation Son en Breugel, The Netherlands
  • Station Details: Davis Vantage Pro2 Wireless, WeatherCat on Mac OS X 10.13.6
Re: Atkins web template problem
« Reply #2 on: March 30, 2012, 08:50:37 PM »
Steve's explanation is much better and detailed, but I was going to say: [goofy]

To use the template files, just put the two html files (index.html and wximprovedalmanac.html) into your WC templates directory.
Upload the img folder, the js folder, and the wxi.css file to your webserver into the same folder where you?ll be uploading your weather data. This last one is a one-off, manual process.

Good luck.

Jos

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1555
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2023 Mac mini M2 Pro, 32GB RAM, Mac OS 14, WeatherCat 3.2
Re: Atkins web template problem
« Reply #3 on: March 30, 2012, 09:16:41 PM »
Thanks for the confirmation, Jos. I can ramble on at time...

A question for you: Several of you use the very nice yr.no metoegram on your web sites. I found where to set it up for my location, but I did not find where to set imperial units. Is it metric only, or am I missing something in the translation.

Thanks,
Steve
Steve - Avon, Ohio, USA


CWOP: DW8454 - WU: KOHAVON11 - AWEKAS - CoCoRaHS
PWSweather - WeatherCloud - Twitter - Facebook

jace

  • Storm
  • *****
  • Posts: 812
    • DW9675
    • ISuffolk62
    • Yoxford weather site.
  • Station Details: Davis Vantage Pro2, with Mac USB Data Logger. 2.4 GHz Intel Core 2 Duo MacBook, with 8 GB 1033 MHz DDR3 Memory, running Mac OSX Version 10.10.1 (Yosimite).
Re: Atkins web template problem
« Reply #4 on: March 30, 2012, 10:07:47 PM »
Thank you Steve and Jos.

That is exactly what I did with the files when setting up the web template as per Todd's instructions.

When I initiate FTP upload from WeatherCat, then try to view the finished web pages in a browser or in preview in my web hosts site, all I see is the error message :

 "Parse error: syntax error, unexpected T_STRING in /home/u561298929/public_html/index.html on line 2"

I had a look at the index.html that is written with other files such as graphs etc in the web site after the weather data is uploaded via the error consule in the web developer, and  line 13 was  highlighted as having an error:

   var u,p1,p2,e;


I did not modify anything in the files, just downloaded the zip files and placed as directed, quite frustrating, especially as they seem to work for everybody else..  [banghead] [banghead] [banghead]

Cheers JC

tigers

  • Gentle Breeze
  • **
  • Posts: 79
Re: Atkins web template problem
« Reply #5 on: March 30, 2012, 11:08:01 PM »

Did you leave the file extension as HTML? It looks like your web host is trying to parse it as a PHP file instead if an HTML file. Your first screenshot looked like it was just missing the styles. Just upload the files per the screenshot in the above posts and it should work. If not, post a link to your site so I can have a look. It might be a week or so since I'm out of the country (well my country anyway).

jace

  • Storm
  • *****
  • Posts: 812
    • DW9675
    • ISuffolk62
    • Yoxford weather site.
  • Station Details: Davis Vantage Pro2, with Mac USB Data Logger. 2.4 GHz Intel Core 2 Duo MacBook, with 8 GB 1033 MHz DDR3 Memory, running Mac OSX Version 10.10.1 (Yosimite).
Re: Atkins web template problem
« Reply #6 on: March 30, 2012, 11:11:44 PM »
Cheers tiger, I'll start again tomorrow and see if it works for me then.

Thanks JC

HairyMcLeary

  • Strong Breeze
  • ***
  • Posts: 164
    • DW5912
    • INORTHOT6
  • Station Details: LaCrosse WS2355, iMac 2.66 Ghz Core 2 Duo, 8 GB RAM, Mountain Lion
Re: Atkins web template problem
« Reply #7 on: March 30, 2012, 11:21:47 PM »
Thanks for the confirmation, Jos. I can ramble on at time...

A question for you: Several of you use the very nice yr.no metoegram on your web sites. I found where to set it up for my location, but I did not find where to set imperial units. Is it metric only, or am I missing something in the translation.

Thanks,
Steve

I'm pretty sure there isn't an Imperial version of this. I could be wrong.

The thinking is that it is financed by the Norwegian Tax Payers who don't use Imperial. There are also several very good forecasting pages on their site... all in Norwegian, and they explain in one of their FAQs that will not be translating them as they would then become too popular and the cost would be borne by the Norwegians. Fair enough when you think about it.

By the way, I have found their Meteograms to be very accurate

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1555
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2023 Mac mini M2 Pro, 32GB RAM, Mac OS 14, WeatherCat 3.2
Re: Atkins web template problem
« Reply #8 on: March 31, 2012, 02:58:10 AM »
Thanks Tony, seems fair to me, too.

John, what is your web site so we can take a look at the source files? Maybe we can tell something from that.

Steve
Steve - Avon, Ohio, USA


CWOP: DW8454 - WU: KOHAVON11 - AWEKAS - CoCoRaHS
PWSweather - WeatherCloud - Twitter - Facebook

JosBaz

  • Strong Breeze
  • ***
  • Posts: 232
    • INBRSON2
    • Weatherstation Son en Breugel, The Netherlands
  • Station Details: Davis Vantage Pro2 Wireless, WeatherCat on Mac OS X 10.13.6
Re: Atkins web template problem
« Reply #9 on: March 31, 2012, 09:50:33 AM »

A question for you: Several of you use the very nice yr.no metoegram on your web sites. I found where to set it up for my location, but I did not find where to set imperial units. Is it metric only, or am I missing something in the translation.


It is metric only (when will you people move to this standard? ;)). The reasoning behind it is shown here: http://om.yr.no/verdata/free-weather-data/

Best regards,

Jos

jace

  • Storm
  • *****
  • Posts: 812
    • DW9675
    • ISuffolk62
    • Yoxford weather site.
  • Station Details: Davis Vantage Pro2, with Mac USB Data Logger. 2.4 GHz Intel Core 2 Duo MacBook, with 8 GB 1033 MHz DDR3 Memory, running Mac OSX Version 10.10.1 (Yosimite).
Re: Atkins web template problem
« Reply #10 on: March 31, 2012, 01:33:49 PM »
Hi Steve.

I know I've followed the instructions that Todd had on his site for the use of his template, and both yourself and Jos have confirmed those instructions.

All I had on the webserver was a directory public_html into which I transferred the img folder, the js folder, and the wxi.css files. The index.html and wximprovedalmanac.html files are in a directory on my computer.

If I view using Wcat's test custom web pages test, the pages work ok, (I realise now that they are not formatted as per the finished web page).

The ftp upload works ok, as the webserver produces the files with jpg files for charts etc and a index.html and wximprovedalmanac.html files, all with up to date data.

The problem comes when I try to view the pages 'online', I always get the same error message and cannot view the web page.
 
"Parse error:  syntax error, unexpected T_STRING in /home/u561298929/public_html/index.html on line 2" for index.html

and when I try to view the wximprovedalamic.html

"Parse error: syntax error, unexpected T_STRING in /home/u561298929/public_html/wximprovedalmanac.html on line 1"
this being the same code on those two lines.     <?xml version="1.0" encoding="UTF-8"?>

Strange thing I've found another online web site (apart from yours Steve) that uses Todd's template and it has the exact
same line of code on line two of the index.html file and it obviously works as I can view it ok.

Dunno why it's not working for me though......

JC

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1555
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2023 Mac mini M2 Pro, 32GB RAM, Mac OS 14, WeatherCat 3.2
Re: Atkins web template problem
« Reply #11 on: March 31, 2012, 01:52:18 PM »
It sure sounds like you have things set up properly. Todd (tigers) can probably answer, but I'm assuming that he has not changed the templates at all since they were previously available last year on the LWC forum.
Stece
Steve - Avon, Ohio, USA


CWOP: DW8454 - WU: KOHAVON11 - AWEKAS - CoCoRaHS
PWSweather - WeatherCloud - Twitter - Facebook

jace

  • Storm
  • *****
  • Posts: 812
    • DW9675
    • ISuffolk62
    • Yoxford weather site.
  • Station Details: Davis Vantage Pro2, with Mac USB Data Logger. 2.4 GHz Intel Core 2 Duo MacBook, with 8 GB 1033 MHz DDR3 Memory, running Mac OSX Version 10.10.1 (Yosimite).
Re: Atkins web template problem
« Reply #12 on: March 31, 2012, 05:18:47 PM »
Hi Steve  [cheers1] [cheers1]

I've got it working !!!!  [woohoo]

Changed my webserver to one that advertised itself as being Mac friendly. It's not as user friendly as the one I was trying before, nothing like the tools for setting up a web site, but I've got a custom site working now using Todd's Atkins template !

 [rockon] [rockon] [rockon] [rockon] [rockon] [rockon] [rockon] [rockon] [rockon] [rockon] [rockon] [rockon] [rockon] [rockon]

JC

happy now [tup]

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1555
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2023 Mac mini M2 Pro, 32GB RAM, Mac OS 14, WeatherCat 3.2
Re: Atkins web template problem
« Reply #13 on: March 31, 2012, 05:46:47 PM »
Glad you got that sorted!

So, when do we get the link to check it out?
Steve - Avon, Ohio, USA


CWOP: DW8454 - WU: KOHAVON11 - AWEKAS - CoCoRaHS
PWSweather - WeatherCloud - Twitter - Facebook

jace

  • Storm
  • *****
  • Posts: 812
    • DW9675
    • ISuffolk62
    • Yoxford weather site.
  • Station Details: Davis Vantage Pro2, with Mac USB Data Logger. 2.4 GHz Intel Core 2 Duo MacBook, with 8 GB 1033 MHz DDR3 Memory, running Mac OSX Version 10.10.1 (Yosimite).
Re: Atkins web template
« Reply #14 on: April 01, 2012, 08:43:26 AM »
Hi Steve.

Here is the link to the page. http://www.john-carty.com/weather/. It's just Todd's template so far, so very much a work in progress, I am slowly learning how to do tiny bits of 'personalistion' to the template, so hopefully it will evolve into something bigger and better. Shame my background graphic didn't work as much as I wanted though.

I've got two links to external sites, one for my wunderground link and the other for a UK forecast site, but don't know how to link back from them to my site apart from using the 'back one page tab', that's the next bit I need to sort.

Cheers JC