Sandaysoft

Support forum for Cumulus weather station software
It is currently Fri May 24, 2013 11:01 am
Please click here before posting. Help me to help you!
Useful Links: Cumulus FAQ • Enhancement requests • Wiki (documentation)
Please put your approximate location into your profile
Add your web site to the Cumulus user map
Vantage Pro2 users with firmware 3.00 should upgrade to fw 3.12 and Cumulus 1.9.4

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: embedding Yearly Data Summary into existing site
PostPosted: Sat Mar 12, 2011 9:19 pm 
Offline
User avatar

Joined: Sun Sep 28, 2008 11:54 pm
Posts: 535
Location: Komoka, ON Canada
Weather Station: Davis Vantage Pro 2 w/Envoy USB
Operating System: Windows-8
Hi David,
I have this working ok in my http://www.komokaweather.com/weather/datasummary.php page. As well in my AJAX/PHP template page http://www.komokaweather.com/wxrecords.php but would instead like to have it in the 'Almanac' flyout-menu maintaining the AJAX/PHP heading and side menu but it is not displaying properly. I am uploading the dayfile.txt to my Godaddy remote site root/weather folder and have edited readDayfile.php this way. The datasummary.css and .php, readDayfile.php and dayfile.txt are all in both the remote root and root/weather - I have been experimenting to make this work :bash: but without success. What have I done wrong?

Paul

_________________
Davis Vantage Pro 2 - CWOP DW3930 - WU IONTARIO226 - PWS Weather KOMOKA - AWEKAS 6890
Windows-8
Cumulus v1.9.3 b.1059
www.komokaweather.ca
www.komokaweather.com
www.komokaweather.com/weather/sunrecord ... today.html
Image


Top
 Profile  
 
 Post subject: Re: embedding Yearly Data Summary into existing site
PostPosted: Sun Mar 13, 2011 12:34 pm 
Offline
User avatar

Joined: Tue Jul 29, 2008 8:00 pm
Posts: 2001
Location: Thornhill, Dumfries, UK
Weather Station: WH1081
Operating System: Mac OSx & Win 7
Paul

From what I can see on this page (http://www.komokaweather.com/wxhistorical.php) you are then opening readDayfile.php which is the raw file for simply doing the import and building the table. It does not contain any stylesheet info etc. You need your containing page to include the CSS & JS links.

I am not up to speed on your sites setup, however I would guess that in your wxhistorical.php you should include the necessary lines to pull in the CSS & JS needed

Code:
<link rel="stylesheet" type="text/css" media="screen" href="datasummary.css"  />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js" type="text/javascript"></script>


In the main section of your wxhistorical.php.... <div id="main-copy"> .... I would include the readDayfile.php within the div
Code:
<?php include('readDayfile.php');?>

_________________
David
Contact Me


Top
 Profile  
 
 Post subject: Re: embedding Yearly Data Summary into existing site
PostPosted: Mon Mar 14, 2011 9:32 pm 
Offline
User avatar

Joined: Sun Sep 28, 2008 11:54 pm
Posts: 535
Location: Komoka, ON Canada
Weather Station: Davis Vantage Pro 2 w/Envoy USB
Operating System: Windows-8
Hi David,
Thanks for your suggestion and I have tried that without success and get 'failed to open day file' message from the PHP/AJAX templates' flyout-menu, but is working fine from the direct link page. I don't actually have a grasp on how the PHP/AJAX templates flyout-menu work but have done some edit, cut and paste, and added your code to the sample newpage.php provided in Ken's templates and renamed as wxhistorical.php, but obviously not correctly. Perhaps Ken (Saratogowx) can provide some assistance on how to add it to his templates so will ask on that thread.

Thanks very much,
Paul

_________________
Davis Vantage Pro 2 - CWOP DW3930 - WU IONTARIO226 - PWS Weather KOMOKA - AWEKAS 6890
Windows-8
Cumulus v1.9.3 b.1059
www.komokaweather.ca
www.komokaweather.com
www.komokaweather.com/weather/sunrecord ... today.html
Image


Top
 Profile  
 
 Post subject: Re: embedding Yearly Data Summary into existing site
PostPosted: Mon Mar 14, 2011 9:38 pm 
Offline
User avatar

Joined: Tue Jul 29, 2008 8:00 pm
Posts: 2001
Location: Thornhill, Dumfries, UK
Weather Station: WH1081
Operating System: Mac OSx & Win 7
The 'failed to open day file' message means that you have probably not set your $dayfile variable correctly in readDayfile.php.

What do you have it set to?

It may be you have it set to a relative path, which means relative to what page is opening it, so it will work in one setup and not in the other (in this case the PHP templates you use). I usually always set it to a full path so that it works regardless of what is opening it.

_________________
David
Contact Me


Top
 Profile  
 
 Post subject: Re: embedding Yearly Data Summary into existing site
PostPosted: Mon Mar 14, 2011 11:26 pm 
Offline
User avatar

Joined: Sun Sep 28, 2008 11:54 pm
Posts: 535
Location: Komoka, ON Canada
Weather Station: Davis Vantage Pro 2 w/Envoy USB
Operating System: Windows-8
Thanks David,
Now edited from $dayfile='../weather/dayfile.txt'; to $dayfile='http ://www.komokaweather.com/weather/dayfile.txt'
and it is working. Now I'll try to do some fixing up of the heading location, etc. so everything displays properly. So simple once you know it :oops:

Paul

_________________
Davis Vantage Pro 2 - CWOP DW3930 - WU IONTARIO226 - PWS Weather KOMOKA - AWEKAS 6890
Windows-8
Cumulus v1.9.3 b.1059
www.komokaweather.ca
www.komokaweather.com
www.komokaweather.com/weather/sunrecord ... today.html
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group