Author Topic: Ajaxeline AJAX and PHP template. Beta release available.  (Read 111825 times)

tigers

  • Gentle Breeze
  • **
  • Posts: 79
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #15 on: April 15, 2012, 06:34:25 PM »
I've updated the template to remove the journal tags from wctags.php and to add in the footer.php that was missing from the initial release zip file.

http://atkinsfamily.org/weather-templates/

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1554
    • 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: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #16 on: April 15, 2012, 11:20:03 PM »
How to use:

1. Open config.php and edit the settings there. The API key for Weather Underground is required for all the forecast and radar info, but it is free for up to 500 requests/day.

OK, this is beginning to look like I'm a complete computer newb, when in fact I've been fiddling with them for more than 30 years...

The link in the config.php script takes me to a WU documentation page that tells me a bunch of stuff I don't understand about getting an API key. Where do I get one? How do I know what choices I need to make on that huge list of options? There's a "Key Settings page, but you have to be a developer to access that. Do I actually have to apply to be a developer to be able to use the new template? This stuff is baffling me!
Steve - Avon, Ohio, USA


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

tigers

  • Gentle Breeze
  • **
  • Posts: 79
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #17 on: April 15, 2012, 11:57:12 PM »
How to use:

1. Open config.php and edit the settings there. The API key for Weather Underground is required for all the forecast and radar info, but it is free for up to 500 requests/day.

OK, this is beginning to look like I'm a complete computer newb, when in fact I've been fiddling with them for more than 30 years...

The link in the config.php script takes me to a WU documentation page that tells me a bunch of stuff I don't understand about getting an API key. Where do I get one? How do I know what choices I need to make on that huge list of options? There's a "Key Settings page, but you have to be a developer to access that. Do I actually have to apply to be a developer to be able to use the new template? This stuff is baffling me!

Yeah, perhaps that wasn't the best link to include. Just go here http://www.wunderground.com/weather/api/ and signup for the key then just copy that key into the config.php. You can quite safely ignore all that other stuff unless you want to hack on the template!

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1554
    • 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: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #18 on: April 16, 2012, 01:02:05 AM »
OK, I've got that taken care of. Thanks, Todd

I may have shot myself in the foot with the rest of it, though. To keep these files separate from my main web site, I uploaded all the files to a subfolder at www.avon-weather.com/live, and that's where I pointed the CGI as well. But WeatherCat's FTP uploads the files to www.avon-weather.com. So I'm not populating the wctags.php file in the "live" subfolder. I can manually drag it there to see what the page looks like.

Any way to point the stuff in the "live" folder to the wctags.pho file in the root folder?

Thanks for your help,
Steve
Steve - Avon, Ohio, USA


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

tigers

  • Gentle Breeze
  • **
  • Posts: 79
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #19 on: April 16, 2012, 01:52:54 AM »
OK, I've got that taken care of. Thanks, Todd

I may have shot myself in the foot with the rest of it, though. To keep these files separate from my main web site, I uploaded all the files to a subfolder at www.avon-weather.com/live, and that's where I pointed the CGI as well. But WeatherCat's FTP uploads the files to www.avon-weather.com. So I'm not populating the wctags.php file in the "live" subfolder. I can manually drag it there to see what the page looks like.

Any way to point the stuff in the "live" folder to the wctags.pho file in the root folder?

Thanks for your help,
Steve

Yeah, you can create symlink and it should work.

Login to a command prompt on your server via ssh or telnet and go into your /live folder and issue the following command:

Code: [Select]
ln -s ../wctags.php wctags.php

This assumes that the /live folder is a folder underneath your webroot folder where WC is uploading the wctags.php

Also, it looks like your missing all the other php files as well. Make sure you upload all the files onto your server (into the /live folder in your case) and just have WC process the wctags.php. Once you add the symlink everything should start working.

xtommo

  • Gentle Breeze
  • **
  • Posts: 48
  • Station Details: LaCrosse WS2355 on iMac 2.66GHz Intel Core 2 Duo
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #20 on: April 16, 2012, 02:48:43 AM »
Thanks

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1554
    • 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: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #21 on: April 16, 2012, 02:53:23 AM »
Yeah, you can create symlink and it should work.

Login to a command prompt on your server via ssh or telnet and go into your /live folder and issue the following command:

Code: [Select]
ln -s ../wctags.php wctags.php

This assumes that the /live folder is a folder underneath your webroot folder where WC is uploading the wctags.php

Also, it looks like your missing all the other php files as well. Make sure you upload all the files onto your server (into the /live folder in your case) and just have WC process the wctags.php. Once you add the symlink everything should start working.

Thanks Todd,

All the files are where they are supposed to be in the /live folder.



As far as creating a symlink, I'm again over my head. I vaguely remember using Telnet on a teletype over a shared mainframe back in the early '70s, but that's all hazy to me now. I downloaded ZOC6, a telnet application, but I can't figure out how to connect to my server, which is a shared hosting company.

I guess I'll just move all the files from the /live folder to the root folder.

Thanks!
Steve
Steve - Avon, Ohio, USA


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

tigers

  • Gentle Breeze
  • **
  • Posts: 79
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #22 on: April 16, 2012, 03:06:41 AM »
It's pretty easy. Open up a terminal prompt on your mac, then type

Code: [Select]
ssh -l yourloginnameforyourserver yourservername.com.

Hopefully that should present you with a password prompt where you can type in your password and you'll then be at a command line for your server.

Also, who's your hosting company? It looks like your server's configuration will require another extra step or two that (I hope) is a little unique to them.

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1554
    • 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: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #23 on: April 16, 2012, 04:22:08 AM »
"Connection Refused" I tried several combinations, with and without www, using my primary domain name or subdomains. No joy.

My provider is HostDime.com I have a shared hosting account with a main domain (morrisgarage.com) and several subdomains, of which Avon-weather.com is one. So while www.avon-weather.com gets directly to my web pages, the path is www.morrisgarage.com/public_html/avon-weather.com/

Thanks
Steve
Steve - Avon, Ohio, USA


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

xtommo

  • Gentle Breeze
  • **
  • Posts: 48
  • Station Details: LaCrosse WS2355 on iMac 2.66GHz Intel Core 2 Duo
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #24 on: April 16, 2012, 08:11:03 AM »
edit: i got most of it working but i cant figure out how to get the reading into metric???

also the colophon page has a few errors which i cant figure out

my page is
http://tommo.web44.net/


another issue i am having and i dont know if this is an issue is in the Custom CGI preferances tab in WeatherCar the current status always says Error - Unexpected response from server. is this normal?



any help would be much appreciated

thanks

tigers

  • Gentle Breeze
  • **
  • Posts: 79
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #25 on: April 16, 2012, 01:01:08 PM »
edit: i got most of it working but i cant figure out how to get the reading into metric???

also the colophon page has a few errors which i cant figure out

my page is
http://tommo.web44.net/


another issue i am having and i dont know if this is an issue is in the Custom CGI preferances tab in WeatherCar the current status always says Error - Unexpected response from server. is this normal?



any help would be much appreciated

thanks

I've got to head out to work so I don't have any time right now, but it does look like you're missing the about.php file. I've attached it here so just unzip and upload it to your site and it should correct those errors.

As for the "Unexepected response...", that shouldn't be happening. It looks like the real-time data is not uploading to your site just yet. And the metric units should be appearing in your page since that setting is read from wctags.php. It'll be tonight (morning for you!) before I can look into those errors.

Thanks for testing this out for me. Hopefully as the process comes along, things will get easier.

tigers

  • Gentle Breeze
  • **
  • Posts: 79
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #26 on: April 16, 2012, 01:03:01 PM »
"Connection Refused" I tried several combinations, with and without www, using my primary domain name or subdomains. No joy.

My provider is HostDime.com I have a shared hosting account with a main domain (morrisgarage.com) and several subdomains, of which Avon-weather.com is one. So while www.avon-weather.com gets directly to my web pages, the path is www.morrisgarage.com/public_html/avon-weather.com/

Thanks
Steve

Eh...looks like hostdime charges extra for ssh access. https://desk.hostdime.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=47

I'll look into this some more tonight. Hostdime is also blocking the requests for the forecast data from wunderground. I'll look into this some more tonight and see if there are any solutions.

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1554
    • 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: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #27 on: April 16, 2012, 02:19:28 PM »
No need to worry about it on my account, Todd. I've got a perfectly good working web page now (thanks to your previous templates. :) )

I was mostly interested in the prettied up portion of the live current conditions. After I got the pages up and working, I was going to try to dissect them like I did with the wxi templates and incorporate parts into my existing site. Right now I'm using the bare bones raw data sample for live current conditions, and was going to use the modified ajaxeline template to replace that. I can do that by moving the files to the root directory easily enough and then removing what I don't need.

http://www.avon-weather.com/test_php/watch_weather.php

So don't take up your time trying to get my particular circumstances working.

Thanks,
Steve
Steve - Avon, Ohio, USA


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

HairyMcLeary

  • Strong Breeze
  • ***
  • Posts: 164
    • DW5912
    • INORTHOT6
  • Station Details: LaCrosse WS2355, iMac 2.66 Ghz Core 2 Duo, 8 GB RAM, Mountain Lion
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #28 on: April 16, 2012, 04:39:59 PM »
Thanks for the work you have put into this.

I've managed to get it working ok. There were a few issues with metric, it needed a file to be manually tweaked to get the live data to display in Metric, and WU forecast wouldn't show in metric either. I found a typo in the forecast.php - if ($UNITS == "C") - i took out one of the "=" and the forecast popped up in metric.
I'm not sure i will stick with WU forecast as they are useless down here and they don't have radar maps.

I might play around with some of the colours next.

Thanks again for the great work.

Tony

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1554
    • 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: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #29 on: April 16, 2012, 06:42:22 PM »
I'm good to go now. I contacted HostDime and they replied with the following and fixed it. No more errors from the server!

Quote
You were receiving the errors on your page because we have allow_url_fopen disabled by default. We have placed a copy of the server's php.ini file within your /home/smorris/public_html/avon-weather.com/ directory and enabled this feature

Steve

[EDIT} I was so intent on getting this to work, that I completely ignored the content. Date of update on the main page (http://www.avon-weather.com/live.php) is from three days ago before I downloaded the template, and data displayed is wrong. But the Short Term Status shows some correct and some wrong (or old) data. For instance, today the wind was at a peak of 41 mph, which shows correctly for week but wrong for today. And I've disabled the CGI feed as it shows errors every time.

I think I need to delete everything and start over. ;)
Steve - Avon, Ohio, USA


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