Sandaysoft

Support forum for Cumulus weather station software
It is currently Wed Jun 19, 2013 5:26 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  [ 66 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Tue Jul 19, 2011 10:25 am 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1888
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
You have two different css files to edit ;)

weathermain.css - shadowed-border - width: 850px (increase to suit)

datasummary.css - table_container - width: 840px (increase to suit)

_________________
Image
......................Imagine, what you will KNOW tomorrow !


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Tue Jul 19, 2011 10:30 am 
Offline
User avatar

Joined: Wed Dec 16, 2009 2:32 am
Posts: 152
Location: Wairoa, Hawkes Bay. New Zealand.
Weather Station: La Crosse WS1081
Operating System: Windows XP, XP Pro & Win 7
beteljuice wrote:
You have two different css files to edit ;)

weathermain.css - shadowed-border - width: 850px (increase to suit)

datasummary.css - table_container - width: 840px (increase to suit)

Correct but this will only fit them across in one row. I want to add more labels so I need two rows please.
Thanks for help so far :)

_________________
Wairoa, Hawkes Bay, New Zealand Weather Station.
http://wairoa.net/weather/index.htm
Image


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Tue Jul 19, 2011 11:33 am 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1698
Location: World...
Weather Station: No weather station
Operating System: No operating system
JennyLeez wrote:
Please how can I add another row to add more labels.
Jenny, is this what you are looking for: Annual Weather Data Summary - I also have this stand-alone PHP script: Annual Weather Data Summary


Last edited by gemini06720 on Sat Oct 08, 2011 1:08 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Tue Jul 19, 2011 11:55 am 
Offline
User avatar

Joined: Wed Dec 16, 2009 2:32 am
Posts: 152
Location: Wairoa, Hawkes Bay. New Zealand.
Weather Station: La Crosse WS1081
Operating System: Windows XP, XP Pro & Win 7
gemini06720 wrote:
JennyLeez wrote:
Please how can I add another row to add more labels.
Jenny, is this what you are looking for: Annual Weather Data Summary - I also have this stand-alone PHP script: Annual Weather Data Summary

Yes thats it. Lots of labels on more than 1 row.
Can Davids readDayfile.php be written so I may do this please.
I will attach it.
many thanks for your help :)


You do not have the required permissions to view the files attached to this post.

_________________
Wairoa, Hawkes Bay, New Zealand Weather Station.
http://wairoa.net/weather/index.htm
Image


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Tue Jul 19, 2011 11:25 pm 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1888
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
The beteljuice suggests ...

Where the humble <br /> is inserted is a cosmetic rather than logical decision ie. some button 'labels' will be long - some short, so doing a simple count (say 6 labels / line) won't necessarily look good.

You already have a "data available" array which contains field names, label names and a flag to create the button.

Why not create an additional flag to create 'a new line' following that button ?
Example: (Edit: a REMark in the middle of an array won't work :oops: )
Code:
$label_items = array(
      array('maxtemp','Max Temp','Maximum Temperature',true, false),
      array('mintemp','Min Temp','Minimum Temperature',true, false),
      array('avgtemp','Avg Temp','Average Temperature',true, false),
      array('minmaxt','Min/Max Temp','Min / Max Temperature',true, false),
      array('rainfall','Rainfall','Daily Rainfall',true, false),
      array('rainrate','Rain Rate','Daily Rain Rate (mm/hr)',true, true),
      array('maxpres','Max Pressure','Maximum Sea Level Pressure',true, false),
      array('minpres','Min Pressure','Minimum Sea Level Pressure',true, false),      
      array('windgust','Wind Gust','Highest Wind Gust',true, false),
      array('windspeed','Wind Speed','Highest Average Wind Speed',true, false),
      array('windrun','Wind Run','Daily Wind Run',true, false) );

Then add a line of code to make the menu construct look like this:
Code:
   for ($i = 0; $i < count($label_items); $i++)  {
      if ($label_items[$i][3] == true) {
         $tablelayout .= '<li><a href="' . $_SERVER['PHP_SELF'] .'?year='.$tableYear .'&amp;data=' . $label_items[$i][0] . '">' . $label_items[$i][1] . '</a></li>';
         if($label_items[$i][4] == true) {$tablelayout .= '<br />';}  // Line break check
      }
   }

Should work, but I've got a few things wrong lately :o

_________________
Image
......................Imagine, what you will KNOW tomorrow !


Last edited by beteljuice on Wed Jul 20, 2011 2:12 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Wed Jul 20, 2011 6:36 am 
Offline
User avatar

Joined: Wed Dec 16, 2009 2:32 am
Posts: 152
Location: Wairoa, Hawkes Bay. New Zealand.
Weather Station: La Crosse WS1081
Operating System: Windows XP, XP Pro & Win 7
Ok tried that but it did not change anything :(

Any other ideas please.

_________________
Wairoa, Hawkes Bay, New Zealand Weather Station.
http://wairoa.net/weather/index.htm
Image


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Wed Jul 20, 2011 10:08 am 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1698
Location: World...
Weather Station: No weather station
Operating System: No operating system
Quote:
Any other ideas please.
Jenny, have a look at this page ... and check your private mail. ;)


Last edited by gemini06720 on Tue Aug 23, 2011 12:54 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Wed Jul 20, 2011 12:55 pm 
Offline
User avatar

Joined: Wed Dec 16, 2009 2:32 am
Posts: 152
Location: Wairoa, Hawkes Bay. New Zealand.
Weather Station: La Crosse WS1081
Operating System: Windows XP, XP Pro & Win 7
gemini06720 wrote:
Quote:
Any other ideas please.
Jenny, have a look at this page ... and check your private mail. ;)


Look there it is beteljuice, 2 data label lines :)
Now just how did Ray do that :) :)

_________________
Wairoa, Hawkes Bay, New Zealand Weather Station.
http://wairoa.net/weather/index.htm
Image


Last edited by JennyLeez on Wed Jul 20, 2011 1:28 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Wed Jul 20, 2011 12:59 pm 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1888
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
JennyLeez wrote:
Ok tried that but it did not change anything :( ...

I've just built a page from your posted file modified, and once I fixed what seems to be a php 4 => 5 glitch (and pasted in CSS, and linked to ridulously big jquery) - er ..

It works ! - beteljuice o/p

Edit: your response above - to me or gemini ?

_________________
Image
......................Imagine, what you will KNOW tomorrow !


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Wed Jul 20, 2011 1:34 pm 
Offline
User avatar

Joined: Wed Dec 16, 2009 2:32 am
Posts: 152
Location: Wairoa, Hawkes Bay. New Zealand.
Weather Station: La Crosse WS1081
Operating System: Windows XP, XP Pro & Win 7
beteljuice wrote:
JennyLeez wrote:
Ok tried that but it did not change anything :( ...

I've just built a page from your posted file modified, and once I fixed what seems to be a php 4 => 5 glitch (and pasted in CSS, and linked to ridulously big jquery) - er ..

It works ! - beteljuice o/p

Edit: your response above - to me or gemini ?

Thanks you Beteljuice. Thats it.
May I please have the readDayfile.php that you modified.
Much appreciated.
Jenny

_________________
Wairoa, Hawkes Bay, New Zealand Weather Station.
http://wairoa.net/weather/index.htm
Image


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Wed Jul 20, 2011 2:10 pm 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1698
Location: World...
Weather Station: No weather station
Operating System: No operating system
JennyLeez wrote:
...Look there it is beteljuice, 2 data label lines :)
Now just how did Ray do that :) :)
Ah, but that is my secret... :twisted:

As suggested by the beteljuice, I inserted a '<br />' somewhere in the code... :mrgreen: ...plus some other stuff... :D


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Wed Jul 20, 2011 2:19 pm 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1888
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
Do the code as outlined above ..

I forgot and put a remark ( // NEW Line ... ) in the middle of an array !!!!!
So if you cut 'n 'pasted it - that's why it didn't work :roll:
Code corrected now.

If you still have problems I'll zip it

_________________
Image
......................Imagine, what you will KNOW tomorrow !


Last edited by beteljuice on Thu Jul 21, 2011 11:07 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Thu Jul 21, 2011 1:47 am 
Offline
User avatar

Joined: Wed Dec 16, 2009 2:32 am
Posts: 152
Location: Wairoa, Hawkes Bay. New Zealand.
Weather Station: La Crosse WS1081
Operating System: Windows XP, XP Pro & Win 7
beteljuice wrote:
Do the code as outlined above ..

I forgot and put a remark ( // NEW Line ... ) in the middle of an array !!!!!
So if you cut 'n 'pasted it - that's why it didn't work :roll:

If you still have problems I'll zip it

Yay got it, thank you very much :)

_________________
Wairoa, Hawkes Bay, New Zealand Weather Station.
http://wairoa.net/weather/index.htm
Image


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Thu Jul 21, 2011 5:46 am 
Offline
User avatar

Joined: Wed Dec 16, 2009 2:32 am
Posts: 152
Location: Wairoa, Hawkes Bay. New Zealand.
Weather Station: La Crosse WS1081
Operating System: Windows XP, XP Pro & Win 7
Ok here is what I ended up with:

http://wairoa.net/weather/datasummary_test.php
I sorta see what you are doing but I dont understand enough to fix it.
I copied it as you posted and then added the fields.
It has dropped it down great but from there seems to have a mind of its own.
I will attach the readDayfile also.
When you have time would you please see where I have gone wrong.
Many thanks
Jenny


You do not have the required permissions to view the files attached to this post.

_________________
Wairoa, Hawkes Bay, New Zealand Weather Station.
http://wairoa.net/weather/index.htm
Image


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Thu Jul 21, 2011 11:11 am 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1888
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
It's doing what you've asked it to :D

You haven't asked for a new line until after 'hourly rainfall' - but that's too many buttons to fit your container width so it wrapped.
Then you asked for another new line after the next button (rain rate) - probably a cut 'n' paste thing.

$label_items = array(
array('maxtemp','Max Temp','Maximum Temperature',true, false),
array('mintemp','Min Temp','Minimum Temperature',true, false),
array('avgtemp','Avg Temp','Average Temperature',true, false),
array('minmaxt','Min/Max Temp','Min / Max Temperature',true, false),
array('heatdex','Heat Index','High Heat Index',true, false),
array('highapp','High App Temp','High Apparent Temperature',true, false),
array('lowapp','Low App Temp','Low Apparent Temperature',true, false),
array('highdew','High Dew Point','High Dew Point',true, false),
array('lowdew','Low Dew Point ','Low Dew Point',true, false),
array('rainfall','Daily Rainfall','Daily Rainfall',true, false),
array('rainhour','Hourly Rainfall','Highest Hourly Rainfall (mm/hr)',true, true),
array('rainrate','Rain Rate','Daily Rain Rate (mm/hr)',true, true),
array('maxpres','Max Pressure','Maximum Sea Level Pressure',true, false),
array('minpres','Min Pressure','Minimum Sea Level Pressure',true, false),
array('windchill','Wind Chill','Lowest Wind Chill',true, false),
array('windgust','Wind Gust','Highest Wind Gust',true, false),
array('windspeed','Wind Speed','Highest Average Wind Speed',true, false),
array('windrun','Wind Run','Daily Wind Run',true, false),
array('maxhum','Max Humidity','Maximum Humodity',true, false),
array('minhum','Min Humidity','Minimum Humidity',true, false) );

You may wish to rearrange the order of the array (buttons) to try and keep groups together:

Using the same order Try:

$label_items = array(
array('maxtemp','Max Temp','Maximum Temperature',true, false),
array('mintemp','Min Temp','Minimum Temperature',true, false),
array('avgtemp','Avg Temp','Average Temperature',true, false),
array('minmaxt','Min/Max Temp','Min / Max Temperature',true, false),
array('heatdex','Heat Index','High Heat Index',true, false),
array('highapp','High App Temp','High Apparent Temperature',true, false),
array('lowapp','Low App Temp','Low Apparent Temperature',true, false),
array('highdew','High Dew Point','High Dew Point',true, false),
array('lowdew','Low Dew Point ','Low Dew Point',true, true),
array('rainfall','Daily Rainfall','Daily Rainfall',true, false),
array('rainhour','Hourly Rainfall','Highest Hourly Rainfall (mm/hr)',true, false),
array('rainrate','Rain Rate','Daily Rain Rate (mm/hr)',true, false),
array('maxpres','Max Pressure','Maximum Sea Level Pressure',true, false),
array('minpres','Min Pressure','Minimum Sea Level Pressure',true, true),
array('windchill','Wind Chill','Lowest Wind Chill',true, false),
array('windgust','Wind Gust','Highest Wind Gust',true, false),
array('windspeed','Wind Speed','Highest Average Wind Speed',true, false),
array('windrun','Wind Run','Daily Wind Run',true, false),
array('maxhum','Max Humidity','Maximum Humidity',true, false),
array('minhum','Min Humidity','Minimum Humidity',true, false) );

Humidity may look a bit out of place, but you'll get the idea ;)

_________________
Image
......................Imagine, what you will KNOW tomorrow !


Last edited by beteljuice on Mon Aug 01, 2011 11:25 pm, edited 1 time in total.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 66 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC


Who is online

Users browsing this forum: Google [Bot] 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