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

tigers

  • Gentle Breeze
  • **
  • Posts: 79
Ajaxeline AJAX and PHP template. Beta release available.
« on: April 14, 2012, 02:48:50 AM »
Here's an initial beta (alpha?) release. This template uses PHP, so your server must support that.

Highlights:
-Realtime data updated from WC without a page refresh
-Forecast, weather alerts, and radar via Weather Underground
-HTML5 and CSS3 valid
-"Easy-ish" theming

You can see the template in action here: http://wx.atkinsfamily.org
Download from here: http://atkinsfamily.org/weather-templates/

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. So unless you're planning on refreshing your page every 3 minutes or have a high traffic site, this should be fine.
2. Open submit_weather.php and edit the username and password to something of your liking.
2. Upload all the files exactly as-is to your webserver.
3. Put wctags.php into your WeatherCat template directory and set it to upload to your webserver root directory. Note this is the only file that weathercat needs to process.
4. Open WeatherCat preferences and set your custom cgi path and user/pass that you entered into the submit_weather.php file above. See screenshot below.

That's it for the initial setup. If you want to change around the theme, go to http://jqueryui.com/themeroller/ and set the colors, fonts, etc. to your liking then click the download button. Extract the downloaded zip and look in the css/custom-theme folder. You should see a file in there called jquery-ui-1.8.18.custom.css (or something similar) and a folder called images. Rename the .css file to style.sss and upload it to your sever into the folder "css". Also upload the images folder into the "css"
 folder on the server. Refresh your page and you should see your changes. DO NOT DELETE the ajaxeline.css file that's present in your server's "css" folder.

There's still work to be done on this, primarily international support but I wanted to get it out there and see what issues arise. I hope you enjoy the template.


elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 4499
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, MacBook Pro (Mid 2009)
Thanks Tigers!! (Re: Ajaxeline AJAX and PHP template. )
« Reply #1 on: April 14, 2012, 03:09:52 AM »
Hi Todd (aka Tigers!)

I'm mired in my own bugs so I'm not ready to play with this yet.

However, I certainly do appreciate your efforts!!  [bounce]

Thanks for putting this together!!

Hopefully, I'll get a chance to play with it reasonably soon!!

Cheers, Edouard  [cheers1]

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1235
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2017 27" iMac 3.8 GHz i5, 40GB RAM, Mac OS 10.12, WeatherCat
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #2 on: April 14, 2012, 04:14:06 AM »
This looks great, Todd! A little late tonight, but I'll download this and fiddle with it tomorrow. I'm eager to see how I can integrate this into my other web pages.

Thanks for your work on this!
Steve
Steve - Avon, Ohio, USA


CWOP: DW8454 • WU: KOHAVON11 • AWEKAS • CoCoRaHS • Skywarn •  UK Met Office
MWWN •PWSweather • WeatherBug • 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 #3 on: April 14, 2012, 06:47:18 AM »
Looking Good,

The wctags.php doesn't update as it doesn't have the WC web tags in it, but completed data... your data.

You didn't download this file from your web server rather than the web files folder  on your Mac that WC updates?  ;)

The live data updates properly, albeit in Imperial, due to the issue described above.

Tony

tigers

  • Gentle Breeze
  • **
  • Posts: 79
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #4 on: April 14, 2012, 11:31:29 AM »
Heh, yeah you got me. Here's the correct file. This should correct the units for you as well.

I've also updated the zip download as well.

Administrator

  • Administrator
  • Gentle Breeze
  • *****
  • Posts: 89
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #5 on: April 14, 2012, 12:20:14 PM »
Thank you Todd, I've made this topic a sticky.

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 #6 on: April 14, 2012, 01:52:15 PM »
Heh, yeah you got me. Here's the correct file. This should correct the units for you as well.

I've also updated the zip download as well.

I had he web page working before I downloaded the correct wctags.php, albeit with stale data, but once the new file was parsed and uploaded the webpage will no longer load. I have looked at the uploaded wctags.php on my web server and all of the information appears to be there except the ISO date format in the first line.

Tony

tigers

  • Gentle Breeze
  • **
  • Posts: 79
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #7 on: April 15, 2012, 02:28:42 AM »
Heh, yeah you got me. Here's the correct file. This should correct the units for you as well.

I've also updated the zip download as well.

I had he web page working before I downloaded the correct wctags.php, albeit with stale data, but once the new file was parsed and uploaded the webpage will no longer load. I have looked at the uploaded wctags.php on my web server and all of the information appears to be there except the ISO date format in the first line.

Tony

Interesting. Can you post a link to your page so I can take a look?

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 #8 on: April 15, 2012, 05:05:36 AM »
what do you use to seperate the username from passoword, the red box covers the symbol, is it a comma?

is there a more in depth instruction on how to get this working? i habe never done anything like this but i think this is the best looking template out there.

currently i am using you previous template running on my mac as a server...

WCDev

  • WeatherCat Developer
  • Global Moderator
  • Storm
  • *****
  • Posts: 2735
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #9 on: April 15, 2012, 10:18:38 AM »
Check the 'Send Time As Local' tick-box in the custom CGI preferences. WeatherCat can send the time as either UTC or local, what's needed depends on the script.

For general info regarding the Custom CGI, check out the manual (page 85 in the current manual) - the username and password have to match what you've put in the script.

Cheers,
Stu.

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 #10 on: April 15, 2012, 11:37:02 AM »
Heh, yeah you got me. Here's the correct file. This should correct the units for you as well.

I've also updated the zip download as well.

I had he web page working before I downloaded the correct wctags.php, albeit with stale data, but once the new file was parsed and uploaded the webpage will no longer load. I have looked at the uploaded wctags.php on my web server and all of the information appears to be there except the ISO date format in the first line.

Tony

Interesting. Can you post a link to your page so I can take a look?

Here it is:
www.oamaruweather.net.nz/test.php

Just put of interest I uploaded your original wctags with your stale data in it, the site worked again [interesting]

Jace

  • Storm
  • *****
  • Posts: 807
    • 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: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #11 on: April 15, 2012, 11:59:28 AM »

Here it is:
www.oamaruweather.net.nz/test.php

Just put of interest I uploaded your original wctags with your stale data in it, the site worked again [interesting]

Being nosey I tried your link to the test page, nothing loading at all.

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: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #12 on: April 15, 2012, 12:35:59 PM »
PROBLEM FIXED!

I have a Journal of several hundred entries and this was being uploaded even though it had been commented out in the wctag.php. I deleted the line which mentioned the journal and the page sprung to life.

May I suggest replacing the tag with the COUNTEDJOURNT$nnnn$ tag, nnnn= the number of journal entries you want shown, 5 should do it.

Tony

tigers

  • Gentle Breeze
  • **
  • Posts: 79
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #13 on: April 15, 2012, 06:22:35 PM »
PROBLEM FIXED!

I have a Journal of several hundred entries and this was being uploaded even though it had been commented out in the wctag.php. I deleted the line which mentioned the journal and the page sprung to life.

May I suggest replacing the tag with the COUNTEDJOURNT$nnnn$ tag, nnnn= the number of journal entries you want shown, 5 should do it.

Tony

Interesting. I suspect it's not escaping some characters or something somewhere along the line and thus blowing up the template. I'm going to remove the journal tag for now since there's no accommodations in the template to display journal entries.

tigers

  • Gentle Breeze
  • **
  • Posts: 79
Re: Ajaxeline AJAX and PHP template. Beta release available.
« Reply #14 on: April 15, 2012, 06:33:30 PM »
what do you use to seperate the username from passoword, the red box covers the symbol, is it a comma?

is there a more in depth instruction on how to get this working? i habe never done anything like this but i think this is the best looking template out there.

currently i am using you previous template running on my mac as a server...

The delimeter is an & like so:
ID=XXIDXX&PASSWORD=XXPWXX